add table inet istio-proxy-nat
flush table inet istio-proxy-nat
add chain inet istio-proxy-nat output { type nat hook output priority -100 ; }
add chain inet istio-proxy-nat istio-inbound
add chain inet istio-proxy-nat istio-redirect
add chain inet istio-proxy-nat istio-in-redirect
add chain inet istio-proxy-nat istio-output
add rule inet istio-proxy-nat istio-inbound meta l4proto tcp tcp dport 15008 counter return
add rule inet istio-proxy-nat istio-redirect meta l4proto tcp counter redirect to :15001
add rule inet istio-proxy-nat istio-in-redirect meta l4proto tcp counter redirect to :15006
add rule inet istio-proxy-nat output counter jump istio-output
add rule inet istio-proxy-nat istio-output oifname lo ip saddr 127.0.0.6/32 counter return
add rule inet istio-proxy-nat istio-output oifname lo meta l4proto tcp ip daddr != 127.0.0.1/32 tcp dport != 15008 skuid 1337 counter jump istio-in-redirect
add rule inet istio-proxy-nat istio-output oifname lo skuid != 1337 counter return
add rule inet istio-proxy-nat istio-output skuid 1337 counter return
add rule inet istio-proxy-nat istio-output oifname lo meta l4proto tcp ip daddr != 127.0.0.1/32 tcp dport != 15008 skgid 1337 counter jump istio-in-redirect
add rule inet istio-proxy-nat istio-output oifname lo skgid != 1337 counter return
add rule inet istio-proxy-nat istio-output skgid 1337 counter return
add rule inet istio-proxy-nat istio-output ip daddr 127.0.0.1/32 counter return
add rule inet istio-proxy-nat istio-output tcp dport 32000 counter jump istio-redirect
add rule inet istio-proxy-nat istio-output tcp dport 31000 counter jump istio-redirect
