View Firewalld
[Email protected] sysconfig]# systemctl status Firewalld.service
firewalld.service-firewalld-dynamic Firewall daemon
Loaded:loaded (/usr/lib/systemd/system/firewalld.service; enabled)
Active: Active (running) since quad 2015-07-02 15:19:05 CST; 1 Day 10h ago
Main pid:901 (FIREWALLD)
CGroup:/system.slice/firewalld.service
└─901/usr/bin/python-es/usr/sbin/firewalld--nofork--nopid
July 15:19:04 wode006 systemd[1]: Starting firewalld-dynamic firewall .....
July 15:19:05 wode006 systemd[1]: Started firewalld-dynamic firewall D...N.
Hint:some lines were ellipsized, use-l to show on full.
[Email protected] sysconfig]#
Close Firewalld
[Email protected] sysconfig]# Systemctl stop Firewalld.service
[Email protected] sysconfig]# systemctl status Firewalld.service
firewalld.service-firewalld-dynamic Firewall daemon
Loaded:loaded (/usr/lib/systemd/system/firewalld.service; enabled)
Active:inactive (dead) since six 2015-07-04 01:29:24 CST; 2s ago
Main pid:901 (code=exited, status=0/success)
July 15:19:04 wode006 systemd[1]: Starting firewalld-dynamic firewall .....
July 15:19:05 wode006 systemd[1]: Started firewalld-dynamic firewall D...N.
July 01:29:23 wode006 systemd[1]: Stopping firewalld-dynamic firewall .....
July 01:29:24 wode006 systemd[1]: Stopped firewalld-dynamic firewall D...N.
Hint:some lines were ellipsized, use-l to show on full.
[Email protected] sysconfig]#
Disable Boot Firewalld
[Email protected] sysconfig]# systemctl disable Firewalld.service
RM '/etc/systemd/system/dbus-org.fedoraproject.firewalld1.service '
RM '/etc/systemd/system/basic.target.wants/firewalld.service '
[Email protected] sysconfig]# systemctl status Firewalld.service
firewalld.service-firewalld-dynamic Firewall daemon
loaded:loaded (/usr/lib/systemd/system/firewalld.service; disabled)
Active:inactive (Dead)
July 15:19:04 wode006 systemd[1]: Starting firewalld-dynamic firewall .....
July 15:19:05 wode006 systemd[1]: Started firewalld-dynamic firewall D...N.
July 01:29:23 wode006 systemd[1]: Stopping firewalld-dynamic firewall .....
July 01:29:24 wode006 systemd[1]: Stopped firewalld-dynamic firewall D...N.
Hint:some lines were ellipsized, use-l to show on full.
[Email protected] sysconfig]#
Installing Iptables
[email protected] sysconfig]# Yum install iptables-services
Loaded plugins: Fastestmirror, LangPacks
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository Extras is listed more than once in the configuration
Repository Centosplus is listed more than once in the configuration
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository Extras is listed more than once in the configuration
Repository Centosplus is listed more than once in the configuration
Loading mirror speeds from cached hostfile
Resolving dependencies
--Checking transactions
---> Package iptables-services.x86_64.0.1.4.21-13.el7 will be installed
--Resolve dependency completion
Configure Iptables
[Email protected] sysconfig]# Vi/etc/sysconfig/iptables
[Email protected] sysconfig]#
# allowed SSH
-A input-p tcp-m state--state new-m TCP--dport 22-j ACCEPT
Restarting the firewall
[Email protected] sysconfig]# service iptables restart
Redirecting To/bin/systemctl restart Iptables.service
[Email protected] sysconfig]# systemctl restart Iptables.service
[Email protected] sysconfig]#
"CentOS 7.1" configuration firewall