# Windows 10 連接非445port samba

**於services.msc關閉server服務**

[![image.png](https://note.homesitetw.com/uploads/images/gallery/2025-07/scaled-1680-/8nGimage.png)](https://note.homesitetw.com/uploads/images/gallery/2025-07/8nGimage.png)

**重啟電腦，netstat -ano | findstr 445 確認無pid 4 系統占用**

**cmd(系統管理員)，新增轉發**

**netsh interface portproxy add v4tov4 listenport=445 listenaddress=127.0.0.1 connectport=remote-port connectaddress=remote-ip**

**remote-port = 遠端服務port**

**remote-ip = 遠端ip**

**輸入netsh interface portproxy show all，確認端口轉發**

[![image.png](https://note.homesitetw.com/uploads/images/gallery/2025-07/scaled-1680-/4niimage.png)](https://note.homesitetw.com/uploads/images/gallery/2025-07/4niimage.png)

**連接網路磁碟使用127.0.0.1代替遠端ip即可連接**

[![image.png](https://note.homesitetw.com/uploads/images/gallery/2025-07/scaled-1680-/ZXVimage.png)](https://note.homesitetw.com/uploads/images/gallery/2025-07/ZXVimage.png)

**刪除轉發**

```
 netsh interface portproxy delete v4tov4 listenport=445 listenaddress=127.0.0.1
```