Skip to contentSkip to conversation

iptables -- routing

DISCUSSION Hlynur Thor Olason 2 participants 2 messages Dec 11, 2003 – Dec 15, 2003

lore
Share & tools
lore
#0 lore raw

I have 2 Ethernet cards in a box.

Call them eth0 with IP address 192.168.0.1 and

eth1 with IP = 192.168..0.2

eth1= 192.168.0.2 is connected to another computer a gateway which has the IP address 192.168.0.3. This computer is then connected to an external network which is again connected to eth0=192.168.0.1 in the first box.

Now the problem is I want to get locally generated packages in the box destined for 192.168.0.2 (eth1 in the box) to leave the box and be routed trough the network to the box again.

I have been trying to use iptables but not found a solution.

Any suggestion would be welcome? / Thor

#1 lore raw
Quoted 23 lines · Hlynur Thor Olason

I have 2 Ethernet cards in a box.

Call them eth0 with IP address 192.168.0.1 and

eth1 with IP = 192.168..0.2

eth1= 192.168.0.2 is connected to another computer a gateway which has the IP address 192.168.0.3. This computer is then connected to an external network which is again connected to eth0=192.168.0.1 in the first box.

Now the problem is I want to get locally generated packages in the box destined for 192.168.0.2 (eth1 in the box) to leave the box and be routed trough the network to the box again.

Quoted 5 lines

I have been trying to use iptables but not found a solution.

Any suggestion would be welcome? / Thor

I'm not entirely sure of what you are asking but I think you will find the solution using iproute2. In my distribution (RedHat 9.0), the documentation is in /usr/share/doc/iproute-2.4.7/ip-cref.ps. There is also a slide show tutorial in the training section on
http://iscs.sourceforge.net

Signature · 9 lines
John A. Sullivan III
Chief Technology Officer
Nexus Management
+1 207-985-7880
[email protected]
---
If you are interested in helping to develop a GPL enterprise class
VPN/Firewall/Security device management console, please visit
http://iscs.sourceforge.net