Networking Forums

Networking Forums > Computer Networking > Linux Networking > Routing problem with 2 ethernet cards - adsl router on first andlocalnet on second

Reply
Thread Tools Display Modes

Routing problem with 2 ethernet cards - adsl router on first andlocalnet on second

 
 
D.Campagna
Guest
Posts: n/a

 
      10-26-2007, 04:51 PM
Hi all gurus,
I have the following configuration:
--------| |---------------------| |------| |--------------|
internet|---| u.s. robotics router|---|switch|---|linux box eth0|
adsl | | (192.168.1.98) | |------| |--------------|
|---------------------| | | |
| | |----------- | |------------- [win boxes]
|---------------

Linux is acting as web and SMB server, all works fine and I can connect
the Internet from any of the win machines and the Linux box.
Now in order to have some packet filtering and firewalling made by the
Linux box I want to change to:

--------| |---------------------| |------------------|
internet|---| u.s. robotics router|---|eth1 of linux box |
adsl | | (192.168.1.98) | |------------------|
|---------------------| |
|------------------|
|eth0 of linux box |
|------------------|
| |------|
|switch|
|------|
| | |----------- | |------------- [win boxes]
|---------------

I tried the above but from the win boxes I cannot ping the router.
IP Forwarding is ON. I issued:
route add 192.168.0.98 eth1 (the router)
route add default gw 192.168.0.98 eth1
The result is, the Linux box connects to the Internet and I can
navigate, but still from the win boxes I cannot ping the router, nor
access the Internet.

Before posting all my experiments with iptables, SNAT, MASQUERADING et
al. I would understand why the packets from the router are not
propagated back to the win boxes, while I'm quite sure they reach the
router. The router is doing his NAT, provided the first configuration
works fine. Is perhaps this the problem? I ask this because trying to
replicate the situation I put in place of the router another Linux box
with a bogus 'external' address and with the command:
iptbles -t nat -A POSTROUTING -j SNAT --to-source 192.168.0.97 -o eth1
or
iptbles -t nat -A POSTROUTING -j MASQUERADE -o eth1
the win machines (setting the correct gateway 192.168.0.97) were able to
navigate the bogus 172.168.0.44 of the 2nd Linux box.
I achieved the same result not issuing any iptables command but just
instructing the 2nd Linux box about the route to the first:
route add 192.168.0.0 netmask 255.255.255.0 eth0
So It seems the NATed packets from the router cannot reach the win
boxes. How do I can solve the problem?
I am sorry for the stupid question but I am not an expert of IP and
would greatly appreciate any hints.
Best regards
D. Campagna
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Routing problem with 2 ethernet cards - adsl router on first andlocalnet on second D.Campagna Linux Networking 3 10-26-2007 05:19 PM
Routing problem with 2 ethernet cards - adsl router on first andlocalnet on second D.Campagna Linux Networking 0 10-18-2007 02:30 PM
routing problem between ADSL router and wireless router anon418600J5 Wireless Internet 1 02-27-2006 06:38 PM
Routing problem with two network cards Pete Melbourne Wireless Internet 2 03-20-2005 03:49 AM
3 Network cards in one PC, Routing Problem Christian Hennrich Linux Networking 2 11-12-2003 06:19 PM



1 2 3 4 5 6 7 8 9 10 11