How to check firewall status in RHEL6/RHEL7

 How to check firewall status in RHEL6/RHEL7 

 
  • Check status of firewall: 
   # systemctl status firewalld
firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled)
   Active: active (running) since Thu 2014-09-04 19:18:47 EST; 3 months 28 days ago
 Main PID: 539 (firewalld)
   CGroup: /system.slice/firewalld.service
           └─539 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid

Sep 04 19:18:45 rhel7 systemd[1]: Starting firewalld - dynamic firewall daemon...
Sep 04 19:18:47 rhel7 systemd[1]: Started firewalld - dynamic firewall daemon. 
  • For checking all applied rules:
   # iptables-save
  •  Stop and Start RHEL7 firewall
# service firewalld start
Redirecting to /bin/systemctl start  firewalld.service 

  • Disable RHEL7 firewall
 # systemctl disable firewalld
rm '/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service'
rm '/etc/systemd/system/basic.target.wants/firewalld.service'
  • Enable RHEL7 firewall 
# systemctl enable firewalld
ln -s '/usr/lib/systemd/system/firewalld.service' '/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service'
ln -s '/usr/lib/systemd/system/firewalld.service' '/etc/systemd/system/basic.target.wants/firewalld.service'

 

Comments

Popular posts from this blog

[SOLVED] YUM: can not find RHNS CA file ERROR: can not find RHNS CA file: /usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT

Setting an Operating System Release During Registration

YUM Update ERROR: 28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds' Trying other mirror