Can iptables create alias IP for another box?

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

 



An SNAT & a DNAT rule didn't work for me, and I'm too dumb to know what to do next.

Behind our firewall which NATs everything, I have a server (A) with one IP 1.2.3.4 that needs to be reachable also thru a second IP like 10.5.6.7.  The application won't support adding an alias IP.

If I give the second IP to box B's eth0, can iptables make box B emulate an alias IP for box A?  It only has to work for port 80 traffic but be nice if it did more.

I was trying to do something like this on box B (from error-prone memory, with B's address 10.5.6.7):

> iptables -t nat -A PREROUTING -d 10.5.6.7 -p tcp --dport 8080 -j DNAT --to 1.2.3.4:80

> iptables -t nat -A POSTROUTING -d 1.2.3.4 -p tcp --dport 80 -j SNAT --to 10.5.6.7

any ideas will be appreciated.

Paul
NJ Dept of Health & Senior Services




[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux