Re: IP forwarding



On 23 Feb 2006 17:34:31 -0800, "manoj" <manoj23@xxxxxxxxx> wrote:

I am trying to setup IP forwarding in linux 2.6.15.
I have done 'echo 1 > /proc/sys/net/ipv4/ip_forward' to enable
forwarding and also turned on IP_ADVANCED_ROUTER in config options.

The IP addresses of eth1 and eth2 are 192.168.0.2 and 192.168.1.2
respectively. I want packets to be forwarded from eth1 to eth2.The
netmask is 255.255.255.0 for both.I am trigerring traffic on eth1.
Then I did
'route add -net 192.168.1.0 netmask 255.255.255.0 dev eth2'.

I don't see the packets being forwarded. What am I doing wrong?

Forgot to say something about the gateway?

An eth1 box needs a gateway statement in its route table so it knows
how to find eth2 boxen, and vice versa. You might also need to add
FORWARD rules in iptables if you have the FORWARD policy set to DROP.

Grant.
--
.... The computer scientist, who had listened to all of this said,
"Yes, but where do you think the chaos came from?"
.



Relevant Pages

  • Re: A weird routing question.
    ... like to do a special treatment on packets incoming via eth0 and whose ... be re-emitted through eth1. ... For packets whose destination is 'A', I think you would need to do ... If forwarding is enable, which indeed should be, on this machine ...
    (comp.os.linux.networking)
  • Re: A weird routing question.
    ... like to do a special treatment on packets incoming via eth0 and whose ... be re-emitted through eth1. ... For packets whose destination is 'A', I think you would need to do ... something with netfilter to get the packets on to the forwarding ...
    (comp.os.linux.networking)
  • IP forwarding
    ... I am trying to setup IP forwarding in linux 2.6.15. ... forwarding and also turned on IP_ADVANCED_ROUTER in config options. ... netmask is 255.255.255.0 for both.I am trigerring traffic on eth1. ... I don't see the packets being forwarded. ...
    (comp.os.linux.networking)
  • Re: Port forwarding versus permit
    ... :SMTP port 25 on TCP being forwarded to an e-mail server on the inside LAN. ... :forwarding take place? ... If the packets arrive with a destination IP and port for which there ... happens to be an active translation to an inside machine (possibly ...
    (comp.dcom.sys.cisco)
  • Re: Querying directly a nameserver works, while forwarding not
    ... My next move would be to look for issues in the network, ... I would look for packets with errors. ... Wireshark shows me outcoming queries and incoming responses ... Or consider not doing forwarding, ...
    (comp.protocols.dns.bind)