This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# systemctl stop firewalld | |
# systemctl disable firewalld |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# firewall-cmd --get-zones |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# firewall-cmd --get-default-zone |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# firewall-cmd --get-active-zones |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# firewall-cmd --set-default-zone=home |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Liệt kê toàn bộ các quy tắc của các zones: | |
# firewall-cmd --list-all-zones | |
Liệt kê toàn bộ các quy tắc trong zone mặc định và zone active | |
# firewall-cmd --list-all | |
Liệt kê toàn bộ các quy tắc trong một zone cụ thể, ví dụ home | |
# firewall-cmd --zone=home --list-all | |
Liệt kê danh sách services/port được cho phép trong zone cụ thể: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# firewall-cmd --get-services |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# firewall-cmd --zone=public --add-service=http | |
success | |
# firewall-cmd --zone=public --add-service=http --permanent | |
success |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# firewall-cmd --zone=public --list-services | |
ssh dhcpv6-client http |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# firewall-cmd --zone=public --remove-service=http | |
# firewall-cmd --zone=public --remove-service=http --permanent |