Skip to content

Instantly share code, notes, and snippets.

View lechidung's full-sized avatar
⛰️
Go up and never stop....

Johnny Lê lechidung

⛰️
Go up and never stop....
  • Techbase Vietnam Company Limited
  • Ho Chi Minh City, Vietnam
  • 12:37 (UTC +07:00)
View GitHub Profile
@lechidung
lechidung / stop firewalld
Created July 15, 2018 07:51
stop firewalld
# systemctl stop firewalld
# systemctl disable firewalld
# firewall-cmd --get-zones
@lechidung
lechidung / gist:0eef117416eecd111322e0638a891753
Created July 15, 2018 07:57
firewall-cmd --get-default-zone
# firewall-cmd --get-default-zone
# firewall-cmd --get-active-zones
# firewall-cmd --set-default-zone=home
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ể:
# firewall-cmd --get-services
# firewall-cmd --zone=public --add-service=http
success
# firewall-cmd --zone=public --add-service=http --permanent
success
# firewall-cmd --zone=public --list-services
ssh dhcpv6-client http
# firewall-cmd --zone=public --remove-service=http
# firewall-cmd --zone=public --remove-service=http --permanent