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



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
.



Relevant Pages

  • Suggetsiogn need to establish a network beteen linux box and XP with access to broadband internet b
    ... I have Linksys WRT54G wirless router. ... and I am using ethernet cables to connect each PC to the router for ... internet access. ... After I install Linux in PC to be kept downstairs, ...
    (comp.os.linux.networking)
  • Re: Suggetsiogn need to establish a network beteen linux box and XP with access to broadband interne
    ... I have Linksys WRT54G wirless router. ... PC kept in UPSTAIRS office room. ... your WAN port IP is a public (ie pingable from the Internet) IP and ... After I install Linux in PC to be kept downstairs, ...
    (comp.os.linux.networking)
  • Re: networking
    ... > Really bottom line each machine will connect to the internet and each ... > Is the modem a cable or DSL modem on either PC? ... > Modem on linux is external US Robitics 56k on XP lucent PCI win modem ... >> Read the man or XP Home for details of the route statements. ...
    (alt.os.linux)
  • Re: Router
    ... > a mission critical router? ... > Linux and the BSDs very similar in speeds when it comes routing? ... We are running BGP on this machine to our Internet ...
    (comp.os.linux.networking)
  • Re: XP Home - LAN OK but unable to access internet
    ... > Who is hosting the Internet, Your ISP via a router, or Your Linux Box? ... you could try "Create a New Connection" under Network ...
    (microsoft.public.windowsxp.help_and_support)