LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   LAN to LAN Router (http://www.linuxquestions.org/questions/linux-networking-3/lan-to-lan-router-558136/)

corerouter0 05-31-2007 07:42 PM

LAN to LAN Router
 
Hi Guys,

I'm trying to setup a router to route traffic between two lan segments. Here is my setup below:

existing 10.0.0.0 network
Wireless bridge 10.0.0.5
eth0 10.0.0.21 255.255.255.0

box debian 3.1

eth1 192.168.0.1 255.255.255.0
switch

I have set the gateway on eth0 as my existing 10.0.0.20 router and can ping the gateway from the box via eth0 via the wireless bridge.

I've enabled ip forwarding. When I try to ping 10.0.0.20 from 192.168.0.2laptop which is connected via the switch to eth1 I cannot get any traffic to the 10.0.0.0 network where the 10.0.0.20 router is sat.

I have spent hours googling but am not able to get it working. The only way I can is to setup a smoothwall box between the 192.168.0.0 and 10.0.0.0 network and am able to ping from the 192.168.0.0 network.

If advice and help would be apprieciated.

Daniel

camh 05-31-2007 09:41 PM

What are your current firewall settings on the box? You have forwarding enabled, but it might be default DROP.

corerouter0 06-01-2007 05:20 AM

Hi camh,

Iptables is not imstalled and there are no rules.

Daniel

camh 06-01-2007 05:49 PM

The issue is probably within the routing table. Your 192.168.0.2 laptop doesn't know a way to get to your 10.x network. You might need to add a route to your laptop specifying how to get to the 10.x network.
Eg. route add -net 10.0.0.0/24 netmask 255.255.255.0 gw 192.168.0.1
or try possibly specifying 192.168.0.1 as the default gw on your laptop.

However, without a firewall on the debian box you have nothing protecting your 10.0.0.0 network from the 192.168 network and visa-versa (not a big deal if it's a home network.. but if it's a company, this would be an issue.)

Hope this helps.

corerouter0 06-02-2007 05:06 AM

Hi,

Thanks for your reply. It is a local home network so a firewall is not needed. I've spent some time since my last post trying to get this to work. Basically I just need to route traffic between the two networks and be able to access the machines via each address range.

On the router box I added three routes telling it which interfaces the ip ranges are on and then a default route sat on the 10.0 network.

I have ip_forward set to 1 so thats on. I tried setting up iptables with masquerading and that seems to work however access from 10.0 to 192.168 is not possible.

Daniel


All times are GMT -5. The time now is 02:46 AM.