0

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

-A OUTPUT -s 127.0.0.1/32 -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
BlackBeret
  • 123
  • 2
  • 10

2 Answers2

1

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.

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940
0

I believe you should use ip6tables instead of iptables when handling IPv6 traffic; I have not tried though if the standard iptables command can handle IPv6.

Janne Pikkarainen
  • 31,454
  • 4
  • 56
  • 78