Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dungmanh88/51bc83dddacc7d6ece62a8c6a84178c9 to your computer and use it in GitHub Desktop.
Save dungmanh88/51bc83dddacc7d6ece62a8c6a84178c9 to your computer and use it in GitHub Desktop.
Open port firewall for ntp service and dns service
/sbin/iptables -A INPUT -i $my_interface -s 0/0 -d $my_local_ip -m state --state ESTABLISHED,RELATED -j ACCEPT
/sbin/iptables -A OUTPUT -o $my_interface -s $my_local_ip -p udp -m multiport --dport 53,123 -j ACCEPT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment