You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -p tcp --dport 80:89 -j ACCEPT
iptables -A INPUT -s 192.168.0.1 -j ACCEPT
iptables -A INPUT -s 192.168.0.0/24 -j ACCEPT
iptables -A INPUT -s 192.168.0.0/255.255.255.0 -j ACCEPT
iptables -A INPUT -s 192.168.0.2 -m mac --mac-source 00:12:AB:CD:99:A1 -j ACCEPT
delete all policy defined in chain
iptables -F
restart iptables
service iptables restart
CentOS 7.x
firewalld
print lists
# previous defined
firewall-cmd --get-zones
# all zones
firewall-cmd --list-all-zones
# default lists
firewall-cmd --get-default-zone
# active list
firewall-cmd --get-active-zone
# service lists
firewall-cmd --get-services
add policy
# port
firewall-cmd --permanent --zone=public --add-port=80/tcp
# ip and port
firewall-cmd --permanent --zone=public --add-source=192.168.1.0/24 --add-port=22/tcp
# service
firewall-cmd --permanent --zone=public --add-service=http