Reload firewall after making changes: firewall-cmd --reload

List open firewall ports: firewall-cmd --list-port

List the blocked ip's in the drop zone: firewall-cmd --zone=drop --list-all

Add port xxxx permanently as tcp type: firewall-cmd --zone=public --permanent --add-port=xxxx/tcp

Temporarily block the x.x.x.x ip: firewall-cmd --zone=drop --add-source=x.x.x.x

Temporarily unblock the x.x.x.x ip: firewall-cmd --zone=drop --remove-source=x.x.x.x

Block a port. Substitute xxxx for port number: firewall-cmd --zone=drop --remove-port=xxxx/tcp

Block a port permanently. Substitute xxxx for port number: firewall-cmd --zone=public --remove-port=xxxx/tcp --permanent

Posted: 09/30/2017 10:09:02 AM by: Jamie category: General