Route packets from an interface to another

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



First of all, I'll explain my network setup.
 
 My gateway has two network interfaces: eth0 & eth1. 
 
 eth0 (192.168.1.1) is connected to public network and
eth1(10.0.1.1) is connected to LAN.
 
 MyServer, which is in the LAN, has ip 10.0.1.2.
 
 I created a virtual interface eth0:0 (192.168.1.2) 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
192.168.1.2 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 192.168.1.2). While they
reach the gateway, the packets are being dropped. 
 
 (I think, the reason is nothing but the address
192.168.1.2 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.
 
 Thanks,
 Vinod


       
____________________________________________________________________________________
Sick sense of humor? Visit Yahoo! TV's 
Comedy with an Edge to see what's on, when. 
http://tv.yahoo.com/collections/222


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux