0

Network case:

Source--Routers ...   eth0=LINUX=eth1      ---- some routers.. -- Destination
2.2.2.2            10.0.0.1      192.168.0.1                      1.1.1.1

and 1.1.1.0/24 via 192.168.0.100 dev eth1

Packet coming to eth0 interface with src:2.2.2.2 and dst:1.1.1.1, need to be forwarded onto eth1 interface.

After some tests, I found that with "net.ipv4.ip_forward=1", LINUX can forwards only to local reachable destination (that can be reachable via same broadcast domains, eg:192.168.0.2), but not remote destinations.

This is not the case of NAT and packets are not destined to IP on local interfaces.

This is the case of a regular Router behavior, doing routing (not only forwarding).

I suppose that is can be done somehow with iptables rules.

Any suggestion would help. Thanks

2
  • Erm ... add a route ?
    – user9517
    Oct 30, 2015 at 6:50
  • It has a static route "and 1.1.1.0/24 via 192.168.0.100 dev eth1" Oct 30, 2015 at 6:56

0

You must log in to answer this question.

Browse other questions tagged .