PDA

View Full Version : [ubuntu] HOW_TO_connect two sub-networks for SAMBA?



demontager
September 4th, 2009, 09:12 AM
I need connect two subnetworks together in way that I can connect from Ubuntu to Windows and vice versa, main reason is files sharing, so I need SAMBA protocol
Configs
Ubuntu
IP 192.168.0.23
msk 255.255.255.0
gw 192.168.0.20 (router, connectedto 192.168.1.0 via WAN port)

Windows

IP 192.168.1.26
msk 255.255.255.0
gw 192.168.1.1(router-Internet gateway)

And router configs, which connects two networks 192.168.0.0 with 192.168.1.0:
WAN:
IP 192.168.1.20
msk 255.255.255.0
gw 192.168.1.1
LAN:
192.168.0.20
msk 255.255.255.0

PS Ping from Windows to 192.168.0.23 doesn't pass,
from Ubuntu to 192.168.1.26 does, but can't see Windows shared folders.
PPS On router which connects two networks I made port forwarding and I can connect to Ubuntu shares,
but I need to enter router’s IP(192.168.0.20) not 192.168.0.23

ID Port IP Address
3 137-139 192.168.0.23
4 445 192.168.0.23

fwre01
September 4th, 2009, 11:22 AM
Is there a reason you're using NAT on 192.168.0.20? If you can disable NAT (or technically its PAT) on 192.168.0.20 then you wouldnt need any port forwarding rules.

demontager
September 4th, 2009, 12:25 PM
The reason is- I want to hide 192.168.0.0 network from unauthorized views, so I need split forwarding rules for SAMBA. Theoretical as understand I need change default SAMBA ports, 135-137, 445. And assign its as SAMBA for other IP. Is it possible on Ubuntu?

And if yes how can I connect to Ubuntu SAMBA in Windows explorer than? \\192.168.1.20:333 ?

P.S. 333-port just for example