Skip to content

Instantly share code, notes, and snippets.

@developerinlondon
Created August 19, 2014 02:45
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 developerinlondon/0946497f8729df17a8f5 to your computer and use it in GitHub Desktop.
Save developerinlondon/0946497f8729df17a8f5 to your computer and use it in GitHub Desktop.
ubuntu@ip-172-31-23-17:~$ sudo iptables -L -t nat --line-numbers
Chain PREROUTING (policy ACCEPT)
num target prot opt source destination
1 lxc-nat all -- anywhere anywhere
2 DNAT tcp -- anywhere ip-172-31-23-17.ec2.internal tcp dpt:400 to:10.0.3.95:80
Chain INPUT (policy ACCEPT)
num target prot opt source destination
Chain OUTPUT (policy ACCEPT)
num target prot opt source destination
Chain POSTROUTING (policy ACCEPT)
num target prot opt source destination
1 RETURN all -- ip-192-168-122-0.ec2.internal/24 base-address.mcast.net/24
2 RETURN all -- ip-192-168-122-0.ec2.internal/24 255.255.255.255
3 MASQUERADE tcp -- ip-192-168-122-0.ec2.internal/24 !ip-192-168-122-0.ec2.internal/24 masq ports: 1024-65535
4 MASQUERADE udp -- ip-192-168-122-0.ec2.internal/24 !ip-192-168-122-0.ec2.internal/24 masq ports: 1024-65535
5 MASQUERADE all -- ip-192-168-122-0.ec2.internal/24 !ip-192-168-122-0.ec2.internal/24
6 MASQUERADE all -- ip-10-0-3-0.ec2.internal/24 !ip-10-0-3-0.ec2.internal/24
7 MASQUERADE all -- anywhere anywhere
Chain lxc-nat (1 references)
num target prot opt source destination
1 DNAT tcp -- anywhere ip-172-31-23-17.ec2.internal tcp dpt:40000 to:10.0.3.95:80
2 DNAT tcp -- anywhere ip-172-31-23-17.ec2.internal tcp dpt:400 to:10.0.3.95:80
3 DNAT tcp -- anywhere ip-172-31-23-17.ec2.internal tcp dpt:400 to:10.0.3.95:80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment