Skip to content

Instantly share code, notes, and snippets.

@houming818
Created January 10, 2019 02:35
Show Gist options
  • Save houming818/0db5631652ef66a8f7e7004f74a42b78 to your computer and use it in GitHub Desktop.
Save houming818/0db5631652ef66a8f7e7004f74a42b78 to your computer and use it in GitHub Desktop.
Iptables settings
root@pc01 /root$iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT udp -- anywhere anywhere udp dpt:domain
ACCEPT tcp -- anywhere anywhere tcp dpt:domain
ACCEPT udp -- anywhere anywhere udp dpt:bootps
ACCEPT tcp -- anywhere anywhere tcp dpt:bootps
Chain FORWARD (policy ACCEPT)
target prot opt source destination
DOCKER-USER all -- anywhere anywhere
ACCEPT all -- anywhere 192.168.122.0/24 ctstate RELATED,ESTABLISHED
ACCEPT all -- 192.168.122.0/24 anywhere
ACCEPT all -- anywhere anywhere
REJECT all -- anywhere anywhere reject-with icmp-port-unreachable
REJECT all -- anywhere anywhere reject-with icmp-port-unreachable
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ACCEPT udp -- anywhere anywhere udp dpt:bootpc
Chain DOCKER-USER (1 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