#author("2018-08-03T09:35:58+09:00","","")

[[コマンド]]

#author("2018-08-05T11:18:32+09:00","","")

[[CentOS7]]


*firewalld インストール [#z11b4ba1]
**IPTABLES停止 [#k3a32700]
|BGCOLOR(black):COLOR(white):|c
|[root@centos ~]# systemctl stop iptables|
|[root@centos ~]# systemctl disable iptables|
|[root@centos ~]# systemctl is-enabled iptables|

**firewalldインストール [#pb26eec5]
|BGCOLOR(black):COLOR(white):|c
|[root@centos ~]# yum -y install firewalld|
|[root@centos ~]# systemctl start firewalld|
|[root@centos ~]# systemctl enable firewalld|
|[root@centos ~]# systemctl is-enabled firewalld|
|enabled|
|[root@centos ~]# firewall-cmd --list-all &color(lime){←設定を確認};|
|public (default) &br;  interfaces: &br;  sources: &br;  services: dhcpv6-client ssh &br;  ports:  &br;  masquerade: no &br;  forward-ports: &br;  icmp-blocks: &br;  rich rules:|

**ポート開放 [#h246992d]
|BGCOLOR(black):COLOR(white):|c
|[root@centos ~]# firewall-cmd --permanent --zone=public --add-service=http &color(lime){←httpを開放};|
|[root@centos ~]# firewall-cmd --permanent --zone=public --add-service=https &color(lime){←httpsを開放};|
|[root@centos ~]# firewall-cmd --permanent --zone=public --add-service=smtp &color(lime){←smtpを開放};|
|[root@centos ~]# firewall-cmd --permanent --zone=public --add-service=pop3s &color(lime){←pop3sを開放};|
|[root@centos ~]# firewall-cmd --permanent --zone=public --add-service=imaps &color(lime){←imapsを開放};|
|[root@centos ~]# firewall-cmd --permanent --zone=public --add-service=smtps &color(lime){←smtpsを開放};|
|[root@centos ~]# firewall-cmd --reload &color(lime){←設定を反映};|

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS