zone { localhost public } prerouting { # Use lower 8 bits to mark tproxy traffic mark_match -0x00/0xff # Anti-loop protection # Specific IPv4 port only. My own IP is 192.168.0.1 so that # sysctl net.ipv4.conf.eth0.route_localnet=1 is not needed. tcp 8888 tproxy 192.168.0.1:18888 mark_set 0x01/0xff # All IPv4 TCP traffic, does not match IPv6 tcp tproxy 192.168.0.1:12345 mark_set 0x02/0xff # All IPv4 and IPv6 TCP traffic tcp tproxy 192.168.0.1:42424 [::1]:42424 mark_set 0x03/0xff }