changing destination address after routing
- From: jois.de.vivre@xxxxxxxxx
- Date: Thu, 29 May 2008 14:06:46 -0700 (PDT)
This is my situation, I have 2 NICs, eth0, and eth1 that are both
connected to the internet.
I want to access eth0 through subnet 192.168.1.0/24 and eth1 through
subnet 192.168.2.0/24. This would allow me to have, say, www.foo.com
available on eth0 through 192.168.1.1 and on eth1 through
192.168.2.1.
To achieve this I wanted to set up a route to eth0 on the
192.168.1.0/24 subnet and to eth1 on the 192.168.2.0/24 subnet in the
routing tables.
However, for it to make sense to the gateway after routing has
occurred, I would have to substitute in the IP of www.foo.com after
the routing has occurred.
I'm wondering if it's possible to have a destination address
translation after routing. The iptables man page seems to indicate
that this is not possible as you can only combine DNAT with PREROUTING
and OUTPUT, and POSTROUTING with SNAT. Why is this?
Is there another way to achieve what I am trying to do?
Thanks in advance.
.
- Follow-Ups:
- Re: changing destination address after routing
- From: Pascal Hambourg
- Re: changing destination address after routing
- From: David Schwartz
- Re: changing destination address after routing
- Prev by Date: Re: (socket) send transmits data on same packet
- Next by Date: Newbie setting up home network - uk
- Previous by thread: newbie, shorewall question
- Next by thread: Re: changing destination address after routing
- Index(es):
Relevant Pages
|
|