Route packets from an interface to another

vinod K D vinodpiravom at
Mon Sep 10 14:18:48 CEST 2007

First of all, I'll explain my network setup.
 My gateway has two network interfaces: eth0 & eth1. 
 eth0 ( is connected to public network and
eth1( is connected to LAN.
 MyServer, which is in the LAN, has ip
 I created a virtual interface eth0:0 ( in
the gateway.
 Using ipvsadm, I can route the packets, destined for
this IP address and a port,  to myServer.
 And in myServer, I enabled ip_forwarding and assigned for the loopback interface. 
 So my server application receives and serves the
packets properly. 
 The problem is in the return path. (Remember the
packets have source addres While they
reach the gateway, the packets are being dropped. 
 (I think, the reason is nothing but the address is assigned to the gateway. Hence router
assumes the packets are traversing though a loop.)
 I can't use masquerading, because I need to get the
source & destination IPs of the packets.
 Can anyone suggest a way to redirect packets from an
interface to another (ie, eth1 to eth0) without making
any change in the packet header.
 PS: The latest versions of netfilter doen't have
inbuilt ipt_ROUTE module. Else my life would be cool.

Sick sense of humor? Visit Yahoo! TV's 
Comedy with an Edge to see what's on, when.

More information about the netfilter mailing list