How to connect to SAMBA server on different subnet to client

Charlie_30

Commendable
Apr 30, 2016
10
0
1,520
Hi, i have recently set up an old pc as a samba server. It is located in a different part of my house and connect to the wifi router via ethernet. The wifi router is then connected by ethernet to my internet/wifi router in the main part of the house. Some research tells me that SAMBA does not connect to devices on different subnets and I will need to set up port forwarding. The wifi router is a Dlink Dir 615. I can acess the webpage for the router to change settings, I am just not sure what udp/tcp settings etc I need to set.


Server-------Router---------------------------Internet Router---------PC Clients





Your help would be greatly appreciated.
 
Solution
OR, don't use different subnets and all that jazz and setup the two routers to work together.

Router 1, gets internet into house, is set to say 192.168.0.1 or whatever. Everything turned on, etc.

Router 2 is connected to router 1, has an IP of say 192.168.0.2 or something not the same as the first AND not in the DHCP range of the first router. Also turn off DHCP on the second router.
OR, don't use different subnets and all that jazz and setup the two routers to work together.

Router 1, gets internet into house, is set to say 192.168.0.1 or whatever. Everything turned on, etc.

Router 2 is connected to router 1, has an IP of say 192.168.0.2 or something not the same as the first AND not in the DHCP range of the first router. Also turn off DHCP on the second router.
 
Solution
Just take the cable plugged into your router on the left of your diagram, and plug it straight into your server.

In theory, port 445 is enough. In practice you also have to forward ports 137-139, because Windows uses those for NetBIOS name resolution. Without them, you can only access the SMB server by its IP address. But Windows name distribution has always been something of a black art, mysteriously working or failing based on other factors like Windows domain membership. You can end up spending days trying to track down obscure problems like that.

Or you can just take the cable plugged into the left router, and plug it straight into your server to put everything on the same subnet.
 


Awesome thanks, I moved the ethernet cable connecting the two routers to one of the LAN ports (it was previously in the WAN port) on the second router, changed it's IP address to one up from the main router and disabled DHCP (on the secondary router), and it worked! Internet still works on devices connected to the secondary router and SAMBA now works because they are on the same subnet!
 


Good stuff. I have about 4-5 routers in my house like this. Why get rid of an old router when it works as a switch and wifi spot. I don't care to have all my WIFI things on the same network so I setup different SSID's. One for all the chromecast/media devices, another 5G one for high speed, a low speed one for my harmony hubs and other things that aren't as intensive.