Re: IP aliases and iptables forwarding
- From: Andy Furniss <firstname.lastname@xxxxxxxxxxxxx>
- Date: Fri, 28 Apr 2006 23:14:47 +0100
Yejjou wrote:
Hello every body
I made one linux red hat server with only 1 ethernet interface eth0
and 2 ip aliases, something like that :
eth0 -> 10.0.0.1
eth0:1 -> 10.0.0.10
eth0:2 -> 10.0.0.20
i want to redirect a trafic on my network as :
if destination ip is 10.0.0.10 ---> forward to 10.8.0.1
and if destination ip is 10.0.0.20 ---> forward to 10.16.0.1
I try that :
iptables -t nat -A PREROUTING -d 10.0.0.10 -j DNAT --to-destination
10.8.0.1
but it doesnot work can some one help me ?
tanx
If your subnet is /8 then you need to do more because 10.8.0.1 will try to reply directly.
http://www.faqs.org/docs/iptables/targets.html#DNATTARGET
Andy.
.
- References:
- IP aliases and iptables forwarding
- From: Yejjou
- IP aliases and iptables forwarding
- Prev by Date: Is this a wise configuration?
- Next by Date: Re: Is this a wise configuration?
- Previous by thread: IP aliases and iptables forwarding
- Next by thread: how to implement spf algorithm(dijikstra's or bellman ford) in networks?
- Index(es):