Check rules
# firewall-cmd --state
Get default zone
# firewall-cmd --get-default-zone
Add allowed ports
# firewall-cmd --zone=public --add-port=50000-51000/tcp
Add permanent allowed ports
# firewall-cmd --zone=public --permanent --add-port=50000-51000/tcp
Check ports and services
# firewall-cmd --zone=public --permanent --list-services
# firewall-cmd --zone=public --permanent --list-ports
Add custom service
# firewall-cmd --zone=public --permanent --add-service=https
# firewall-cmd --zone=public --permanent --add-service=smtp
# firewall-cmd --zone=public --permanent --add-service=imap
After all changes need apply rules
# firewall-cmd --reload
# firewall-cmd --state
Get default zone
# firewall-cmd --get-default-zone
Add allowed ports
# firewall-cmd --zone=public --add-port=50000-51000/tcp
Add permanent allowed ports
# firewall-cmd --zone=public --permanent --add-port=50000-51000/tcp
Check ports and services
# firewall-cmd --zone=public --permanent --list-services
# firewall-cmd --zone=public --permanent --list-ports
Add custom service
# firewall-cmd --zone=public --permanent --add-service=https
# firewall-cmd --zone=public --permanent --add-service=smtp
# firewall-cmd --zone=public --permanent --add-service=imap
After all changes need apply rules
# firewall-cmd --reload
No comments:
Post a Comment