FW: Routing public IP's through a gateway

Linux Advanced Routing and Traffic Control

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

 



If understand the setup correctly based on previous emails, it looks like this:

[Internet] <-> [202.172.122.211 (eth1) {Gateway Machine} 202.172.122.74 (eth2)] <-> [202.172.122.75 (eth1) {Other Machine}]

So, according to your emails, your external (eth1) interface on the Gateway machine ** needs to be .209 not .211 or .210 ** (as this is where the ISP's 'router' is pointing the .72 subnet according to what you said), and you need to type echo 1 > /proc/sys/net/ipv4/ip_forward on the gateway machine. No route commands needed: the Gateway machine knows where the .72 subnet is, because it has an interface on it. The Gateway Machine's default gateway is set to your normal ISP's gateway.

Does that sound like your setup? If so, a few things come to mind - either your ISP is not routing .72/29 via .209, or maybe you have a firewall or routing rules in place, or you are using the wrong IP on the eth1 gateway interface.

Hope this helps!

Dan

-----Original Message-----
From: Tim Groeneveld [mailto:tim@xxxxxxx] 
Sent: 15 October 2007 13:45
To: Dan
Subject: Re:  Routing public IP's through a gateway

On Monday 15 October 2007 10:31:25 pm you wrote:
> Unless I have missed something in the question?

Well, these are the commands I issue on my gateway machine:
  > ifconfig eth1 202.172.122.210 netmask 255.255.255.248
  > ifconfig eth2 202.172.122.73 netmask 255.255.255.248
  > route add -net 202.172.122.72 netmask 255.255.255.248 eth1
  > route add default gw 202.172.122.209
  > echo 1 > /proc/sys/net/ipv4/ip_forward

They all succeed and everything, but no outside Internet locations are accessable on .72/29 machines.

What is worse, running
  > tcpdump -i eth1

Shows that the data from eth2 is being sent to the Internet, but there is no replies coming on eth2.


_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux