CentOS7 以éã®ã極åè¨å®ãã¡ã¤ã«ã触ãããªããæãã®ã¢ã¬ãéµå®ããå ´åãfirewall-cmd åãã¦ãªãæã©ãããã®çãªã¢ã¬ã
firewalld ãåãã¦ãã確èªãã
åãã¦ã¾ããããããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã® ens32 ã public ã¨ããååã® zone ã«æå±ãã¦ãã¾ãã
[root@localhost ~]# systemctl status firewalld â firewalld.service - firewalld - dynamic firewall daemon Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled) Active: active (running) since æ 2016-05-16 19:35:48 JST; 7min ago Main PID: 13414 (firewalld) CGroup: /system.slice/firewalld.service ââ13414 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid 5æ 16 19:35:48 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon... 5æ 16 19:35:48 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon. [root@localhost ~]# firewall-cmd --list-all public (default, active) interfaces: ens32 sources: services: dhcpv6-client ssh ports: masquerade: no forward-ports: icmp-blocks: rich rules:
firewalld ãåæ¢ãã
firewalld ãåæ¢ãã¦ãã©ããªããè¦ã¦ã¿ã¾ããã
[root@localhost ~]# systemctl stop firewalld [root@localhost ~]# systemctl status firewalld â firewalld.service - firewalld - dynamic firewall daemon Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled) Active: inactive (dead) 5æ 16 13:10:42 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon... 5æ 16 13:10:47 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon. 5æ 16 14:53:13 localhost.localdomain systemd[1]: Stopping firewalld - dynamic firewall daemon... 5æ 16 14:53:14 localhost.localdomain systemd[1]: Stopped firewalld - dynamic firewall daemon. 5æ 16 19:35:48 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon... 5æ 16 19:35:48 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon. 5æ 16 19:44:10 localhost.localdomain systemd[1]: Stopping firewalld - dynamic firewall daemon... 5æ 16 19:44:11 localhost.localdomain systemd[1]: Stopped firewalld - dynamic firewall daemon.
--state ã§ç¶æ ãåå¾ãã¦ã¿ã
not running ( åä½ãã¦ããªã ) ã¨è¿äºãããã¾ããããã¯å¤§ä½æ³åã§ãããã¨æãã¾ãã
[root@localhost ~]# firewall-cmd --state not running
åä½ãã¦ããªãç¶æ ã§ãµã¼ãã¹ã追å ããã
åçã«è¿½å ã§ããï¼ã¨ãè¨ããã¦ããfirewalld ãèµ·åããã許å¯ããããµã¼ãã¹ä»¥å¤é®æããã¦ã¾ãããâ¦â¦ï¼ã»ããªãåæ¢ä¸ã«è¿½å ããã°ããããï¼ï¼
[root@localhost ~]# firewall-cmd --add-service=http --zone=public FirewallD is not running [root@localhost ~]# firewall-cmd --list-all FirewallD is not running
firewalld ãèµ·åãã¦ãªãããã ãã ããã¨è¨ããã¾ããlist ããéãã¾ãããå°ã£ããã
å¸ä»¤å®ï¼firewall-offline-cmd ããããããªãï¼
ã¡ããã¨ããã±ã¼ã¸ãç¨æããã¦ã¾ããã
--list-all ãã¦ã¿ã
ã¨ããã
[root@localhost ~]# firewall-offline-cmd --list-all public (default) interfaces: sources: services: dhcpv6-client ssh ports: masquerade: no forward-ports: icmp-blocks: rich rules:
--add-service ãã¦ã¿ã
add ã§ããã
[root@localhost ~]# firewall-offline-cmd --add-service=http --zone=public success [root@localhost ~]# firewall-offline-cmd --list-all public (default) interfaces: sources: services: dhcpv6-client http ssh ports: masquerade: no forward-ports: icmp-blocks: rich rules:
firewall-offline-cmd ããä½æ¥ããçµæãå®éã«ç¢ºèªãã
ã¨ãã訳ã§ä»¥ä¸ã®ããã«ãèµ·åããå¾ãã¡ããã¨åæ ããã¦ãã¾ããã
[root@localhost ~]# systemctl start firewalld [root@localhost ~]# systemctl status firewalld â firewalld.service - firewalld - dynamic firewall daemon Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled) Active: active (running) since æ 2016-05-16 20:44:26 JST; 21s ago Main PID: 14069 (firewalld) CGroup: /system.slice/firewalld.service ââ14069 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid 5æ 16 20:44:26 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon... 5æ 16 20:44:26 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon. [root@localhost ~]# firewall-cmd --list-all public (default, active) interfaces: ens32 sources: services: dhcpv6-client http ssh ports: masquerade: no forward-ports: icmp-blocks: rich rules:
ã¤ã¾ãï¼
firewall-offline-cmd ã使ãã°è§£æ±ºãã¾ãï¼ãã£ããï¼ï¼
ããã
åçã«è¿½å ã§ããªãç°å¢ãªãæåããã¡ããã¨è¨è¨ãã¾ããããã¨ãããææã¯ããã£ã¨ãã§ããâ¦â¦ãã¾ãä»ã©ãã¯ãã£ã¡ããæ軽㪠GUI ã¤ãããã¡ã¤ã¢ã¦ã©ã¼ã«ã¨ããAWS ã®ã»ãã¥ãªãã£ã°ã«ã¼ãããããããã¾ã§ç¥çµè³ªã«ãªããªãã¦ãããã®ããªæããã