RedHat 6 iptables port forwarding
Hi,
I am trying to use iptables on RHEL6 to forward requests on port 4443 to 443 for specific nics.
The reason - there is a feature in haproxy load balancer that allows you to have a check port different to the port you want to send to, this allows a server to stop receiving traffic without restarting haproxy.
I have had this working on RHEL5 on a single nic, but the same commands don't work on 6. SELinux is disabled, there are no other iptables rules.
The lines I used to use are:
/sbin/iptables -t nat -A OUTPUT -p tcp --dport 4443 -j REDIRECT --to-port 443
/sbin/iptables -t nat -A PREROUTING -p tcp --dport 4443 -j REDIRECT --to-port 443
Also -
With a single nic/ip address this works as expected, but with virtual nics and extra ip addresses it doesn't.
Many Thanks
Jon
Last edited by mappster; 10-11-2012 at 05:12 AM.
|