Skip to content

Instantly share code, notes, and snippets.

@codefriar
Created April 19, 2019 13:59
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 codefriar/9b60517ecaa8b6de62174a0d59913531 to your computer and use it in GitHub Desktop.
Save codefriar/9b60517ecaa8b6de62174a0d59913531 to your computer and use it in GitHub Desktop.
sudo iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
DOCKER all -- anywhere anywhere ADDRTYPE match dst-type LOCAL
DNAT tcp -- anywhere anywhere tcp dpt:2223 to:10.0.0.1:22
DNAT tcp -- anywhere anywhere tcp dpt:http to:10.0.0.1:80
DNAT tcp -- anywhere anywhere tcp dpt:https to:10.0.0.1:443
DNAT tcp -- anywhere anywhere tcp dpt:smtp to:10.0.0.1:25
DNAT tcp -- anywhere anywhere tcp dpt:imap2 to:10.0.0.1:143
DNAT tcp -- anywhere anywhere tcp dpt:submission to:10.0.0.1:587
DNAT tcp -- anywhere anywhere tcp dpt:998 to:10.0.0.1:998
DNAT tcp -- anywhere anywhere tcp dpt:sieve to:10.0.0.1:4190
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
DOCKER all -- anywhere !127.0.0.0/8 ADDRTYPE match dst-type LOCAL
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- 172.17.0.0/16 anywhere
MASQUERADE all -- anywhere anywhere
Chain DOCKER (2 references)
target prot opt source destination
RETURN all -- anywhere anywhere
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment