samba thru router(s)

April 20, 2009 at 17:05:05
Specs: N/A
Hi!
First things first:
network layout:
house 1 has a dlink DI-524(router 1) router wich has WAN connected
house 2 has a dlink DWL-2100(bridge 1) running as AP-Client for router 1. It is connected to another DI-524 router(WAN) in house2
Router 2 is set up with a static WAN ip(192.168.0.5), using router 1 as a gateway to internet.
house 3 has a dlink DWL-2100(bridge 2) running as AP-Client for router 1. It is set up same as bridge 1, except it connects directly to a computer, instead of a router.(That will change soon tho..)

So basicly I have 2 LAN's (Soon 3)
house 1 LAN uses 192.168.0.1/255.255.255.0
house 2 LAN uses 192.168.10.1/255.255.255.0
hosue 3 uses same as house1, but will change once I get the last router(will be setup same as router 2, just with 192.168.100.1)

All routers is running a dhcp server, aswell as WLAN.

I have a linux server set up in house 2 running samba.
house 1 has modem connected to WAN on router, wich gives laptops WLAN access to internet(Restricted outgoing WAN ports for clients getting IP thru DHCP)

house 2 has 2+ laptops(windows), the server(linux), and an xbox(xbmc) all connected to router 2.

house 3 has 1 laptop(windows), but will get a htpc (linux\xbmc) soon.

Problem:

Internet works fine on all - But I can not get clients in houses other than house 2 to connect to the samba server.

I need a way around this which will not involve putting all computers on the same network(The bridges break with more than one client, so need NAT)

The setup should work in all houses, or it should at the very least be easy to get it working when moving from house to house.

I tried portforwarding TCP+UDP 135-139 on router2 to the computer running samba, but that would not work in house3 - As I have read now is not possible because broadcasts does not get thru.

I would prefer a solution which would not involve using vpn or a ssh tunnel
But if it is the only way I could use a ssh tunnel - If that is the case, Any ideas of a good program for the job? Preferably one which can run and start in the background, without user needing to set it up every time.

My idea would be something like this:
Make 2 batch scripts modify the hosts file to point a hostname to the server ip, depending on which house you are in..
Like if you are in house 2, it would add server 192.168.10.123
or if in house 3, it would add server 192.168.0.5(WAN address of router 2)
or alternatively use 2 scripts to enable\disable vpn or tunnel

Any ideas or thoughts?
Thanks in advance.


See More: samba thru router(s)

Report •


#1
April 20, 2009 at 17:52:35
Am I correct in assuming that the only internet connection is in house 1 through router 1 ?

Quote:
"house 2 has a dlink DWL-2100(bridge 1) running as AP-Client for router 1. It is connected to another DI-524 router(WAN) in house2"

If the DWL-2100 is acting as a bridge to/from router 1 in house 1, why is the DI-524 needed in house 2?

"Router 2 is set up with a static WAN ip(192.168.0.5), using router 1 as a gateway to internet."

That is not a WAN IP. It is a LAN IP.

It sounds like you don't need 2 routers in house 2, especially running DHCP. Your network is small enough to use static IPs all around.

How do you know when a politician is lying? His mouth is moving.


Report •

#2
April 21, 2009 at 04:52:48
Thank you for your reply, quapo.
The bridge only works for one client, thus I need a second router with NAT.
router 2 DOES have 192.168.0.5 set as WAN ip, and 192.168.0.1 as gateway\DNS.
192.168.10.1 is set as LAN ip.

That is necessary for the bridge to work, as stated in first post.

The DWL-2100 AP will ignore all but ONE when working in AP-Client mode -- AP-Repeater mode is not working at all (Causes router to reset all the time, no matter what firmware)

If you have ideas which will make samba work, please tell me.

Thanks in advance


Report •

#3
April 21, 2009 at 05:53:23
"router 2 DOES have 192.168.0.5 set as WAN ip"

No matter what you say, that's not a WAN IP. It's a LAN IP as per the RFCs (1700 & whatever supersedes it). There are too many routers running DHCP on too many subnets. Get it to work on one subnet first. Then add the others again later.

How do you know when a politician is lying? His mouth is moving.


Report •

Related Solutions

#4
April 21, 2009 at 06:45:31
As I said - That is not possible.
The bridge breaks if not using NAT

I realise router 2 is not using a real WAN ip - but it is necessary to use a LAN IP when bridging.

Thanks for trying, but If you do not know a possible solution to get samba working with CURRENT network setup, please do not post.

The network is set up like this simply because it is the only way the bridge hardware will work. And I will not replace that hardware just to get samba working - If all else fails i'll just set up a loopback tunnel from pc's in house3 to house2 server.

The bridge hardware can NOT send packets from more than 1 IP address, and that is why a router using NAT is needed.
Which also means using a mask of 255.255.0.0 is not possible solution

Here's a pic of how the net will look once I get the new router for house 3 (house 1+2 is still the same with new router)
http://img142.imageshack.us/img142/...


Report •

#5
April 21, 2009 at 06:57:56
"Thanks for trying, but If you do not know a possible solution to get samba working with CURRENT network setup, please do not post."

No one will be able to give you a solution to that with your current setup. The setup is the cause of the problem.
Bye.

How do you know when a politician is lying? His mouth is moving.


Report •

#6
April 21, 2009 at 07:13:00
I was also going to try to help you, but since you were rude to guapo, who was kind enough to use up his valuable time to try and help you, I won't.

I will say this much. Since you're obviously stumped and have come here, it would be worth your while to actually listen when someone tries to tell you something. If you actually knew what you were doing, you wouldn't be here asking us for help in the first place...


Report •

#7
April 21, 2009 at 07:37:17
It was not my intention to be rude, I was just saying if you can't help please do not post. I am however thankful for the ideas, but I have already tried them.

I just have a very specific problem that I would like help with.

I'll try explaining the network setup one more time:
house 1 network should not be able to see computers running in house 2+3.
house 2 and 3 are both connected to the router in house 1, using that as internet gateway.

The bridge hardware is DWL-2100 AP, which only has ONE mode that works - That is AP Client.
AP-Client can only deal with 1 IP address, and therefore a separate network is needed(And it's needed to be isolated from house1 anyway....)

The DWL-2100 bridge is connected with cable to the router's WAN port - And the router's WAN ip is set to 192.168.0.5(So it can talk with the router in house 1)

I do not think I can make it any clearer than this.
Sorry if I seemed rude quapo - I do appreciate the help. I just do not need to be told that having it all on ONE network would solve everything - Because that is simply not an option(bridge would break, and pc's in house 2+3 would be seen by pc's in house1 - which is bad)

Thanks!

edit:
btw I know it is possible to get this working : I'm just not sure which route to take..
Either VPN, or using a SSH tunnel with putty..
Or maybe there is a better option... This is why I posted - I wanted more ideas.

edit2:
Got it working fine using plink and portforwarding.


Report •


Ask Question