Skip to content

Instantly share code, notes, and snippets.

@evanphx
Last active September 10, 2015 16:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evanphx/5204d175afbc00b00141 to your computer and use it in GitHub Desktop.
Save evanphx/5204d175afbc00b00141 to your computer and use it in GitHub Desktop.
Check code
root@ip-172-20-0-217:~# iptables -t nat -C POSTROUTING ! -d 10.0.0.0/8 -m addrtype ! --dst-type LOCAL -j MASQUERADE
iptables: No chain/target/match by that name.
root@ip-172-20-0-217:~# echo $?
1
Chain POSTROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 MASQUERADE all -- * !docker0 172.17.0.0/16 0.0.0.0/0
49132 3242K MASQUERADE all -- * eth0 0.0.0.0/0 !10.0.0.0/8
0 0 MASQUERADE all -- * eth0 0.0.0.0/0 !10.0.0.0/8
0 0 MASQUERADE all -- * eth0 0.0.0.0/0 !10.0.0.0/8
0 0 MASQUERADE all -- * eth0 0.0.0.0/0 !10.0.0.0/8
0 0 MASQUERADE all -- * eth0 0.0.0.0/0 !10.0.0.0/8
0 0 MASQUERADE all -- * eth0 0.0.0.0/0 !10.0.0.0/8
0 0 MASQUERADE all -- * eth0 0.0.0.0/0 !10.0.0.0/8
0 0 MASQUERADE all -- * eth0 0.0.0.0/0 !10.0.0.0/8
0 0 MASQUERADE all -- * eth0 0.0.0.0/0 !10.0.0.0/8
0 0 MASQUERADE all -- * eth0 0.0.0.0/0 !10.0.0.0/8
0 0 MASQUERADE all -- * eth0 0.0.0.0/0 !10.0.0.0/8
0 0 MASQUERADE all -- * eth0 0.0.0.0/0 !10.0.0.0/8
0 0 MASQUERADE all -- * eth0 0.0.0.0/0 !10.0.0.0/8
0 0 MASQUERADE all -- * eth0 0.0.0.0/0 !10.0.0.0/8
0 0 MASQUERADE all -- * eth0 0.0.0.0/0 !10.0.0.0/8
0 0 MASQUERADE all -- * eth0 0.0.0.0/0 !10.0.0.0/8
0 0 MASQUERADE all -- * eth0 0.0.0.0/0 !10.0.0.0/8
0 0 MASQUERADE all -- * eth0 0.0.0.0/0 !10.0.0.0/8
0 0 MASQUERADE all -- * eth0 0.0.0.0/0 !10.0.0.0/8
0 0 MASQUERADE all -- * eth0 0.0.0.0/0 !10.0.0.0/8
0 0 MASQUERADE all -- * eth0 0.0.0.0/0 !10.0.0.0/8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment