Re: A weird routing question.
- From: Balwinder S Dheeman <bsd.SANSPAM@xxxxxxxxxxxxxxxxx>
- Date: Fri, 28 Sep 2007 11:02:37 +0530
On 09/28/2007 09:44 AM, Ken Sims wrote:
Hi -
On Thu, 27 Sep 2007 19:36:35 +0200, none <""testr\"@(none)"> wrote:
On a linux box 'A' which has interfaces eth0, eth1, eth2, eth3, I would
like to do a special treatment on packets incoming via eth0 and whose
source is <some-network>.
I would like these packets be unconditionaly redirected unmodified for
output via interface eth1.
That is:
- even if they were targeted (destination IP) at my box 'A', they will
be re-emitted through eth1.
- even if they would have been forwarded through eth2 or eth3, they
will be re-emitted through eth1 too.
If they would be forwarded anyway, advanced routing can be used to
force them out a specific interface.
For packets whose destination is 'A', I think you would need to do
something with netfilter to get the packets on to the forwarding
chain, but I don't know how without changing the destination IP
address.
If forwarding is enable, which indeed should be, on this machine
acting/imitating as router, I on Redhat like machines shall create an
alias eth1:0, whereas on Debian and, or Ubuntu I shall use
iproute/iprute2 as follows:
# ip addr add dev eth1 local net.wo.rkX.host/ne.tm.as.kX
I OTOH, am curious to know, how netfilter/iptables can forward packets?
Do we have kind of some FORWARD target for PREROUTING chain?
--
Dr Balwinder S "bsd" Dheeman Registered Linux User: #229709
Anu'z Linux@HOME Machines: #168573, 170593, 259192
Chandigarh, UT, 160062, India Gentoo, Fedora, Debian/FreeBSD/XP
Home: http://cto.homelinux.net/~bsd/ Visit: http://counter.li.org/
.
- Follow-Ups:
- Re: A weird routing question.
- From: none
- Re: A weird routing question.
- References:
- A weird routing question.
- From: none
- Re: A weird routing question.
- From: Ken Sims
- A weird routing question.
- Prev by Date: Problems with autofs and .hidden files
- Next by Date: netfilter & SIP
- Previous by thread: Re: A weird routing question.
- Next by thread: Re: A weird routing question.
- Index(es):
Relevant Pages
|