Translating iptables rule to ip6tables

BlackBeret asked:

What’s the equivalent of this iptables rule in ip6tables:

-A OUTPUT -s -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080

I tried this and it doesn’t seem to work:

-A OUTPUT -s ::1/128 -p tcp -m tcp --dport 80 -j REDIRECT --on-port 8080

My answer:

The REDIRECT target is only available for IPv4.

To redirect IPv6 traffic, you can use TPROXY (in very recent versions of netfilter), or use a userland port forwarding utility such as xinetd.

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.