Skip to content

Instantly share code, notes, and snippets.

@j-zimnowoda
Created September 30, 2019 10:34
Show Gist options
  • Save j-zimnowoda/11a04cac52b29b8b5679a6880d03e172 to your computer and use it in GitHub Desktop.
Save j-zimnowoda/11a04cac52b29b8b5679a6880d03e172 to your computer and use it in GitHub Desktop.
$ sudo iptables -nvL -t nat|grep <n-port>
pkts bytes target prot opt in out source destination
0 0 KUBE-SVC-4N57TFCL4MD7ZTDA tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:<n-port>
$ sudo iptables -nvL KUBE-SVC-4N57TFCL4MD7ZTDA -t nat
Chain KUBE-SVC-4N57TFCL4MD7ZTDA (2 references)
pkts bytes target prot opt in out source destination
0 0 KUBE-SEP-MY5A6PB7BTRKZPFB all -- * * 0.0.0.0/0 0.0.0.0/0 statistic mode random probability 0.50000000000
0 0 KUBE-SEP-SVLVCUBUSSLYUQIN all -- * * 0.0.0.0/0 0.0.0.0/0
$ sudo iptables -nvL KUBE-SEP-MY5A6PB7BTRKZPFB -t nat
Chain KUBE-SEP-MY5A6PB7BTRKZPFB (1 references)
pkts bytes target prot opt in out source destination
0 0 DNAT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp to:<p-ip1>:<p-port>
$ sudo iptables -nvL KUBE-SEP-SVLVCUBUSSLYUQIN -t nat
Chain KUBE-SEP-SVLVCUBUSSLYUQIN (1 references)
pkts bytes target prot opt in out source destination
0 0 DNAT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp to:<p-ip2>:<p-port>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment