首页 > 其他 > 详细

rhel7 之firewall

时间:2018-02-19 10:21:11      阅读:76      评论:0      收藏:0      [点我收藏+]

标签:pri   etc   rhel7   wal   erp   dha   emctl   cat   aip   

常用的命令要背住,要专业。不能你是啥都百度,啥都知道,就是记不住。

1、版本

[root@roidb01 ~]# uname -a
Linux roidb01 3.10.0-123.el7.x86_64 #1 SMP Mon May 5 11:16:57 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux
[root@roidb01 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.0 (Maipo)
[root@roidb01 ~]# 

2、常规操作

[root@roidb01 ~]# systemctl status firewalld
firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled)
   Active: inactive (dead)   ##关闭状态

Feb 19 06:48:42 roidb01 systemd[1]: Starting firewalld - dynamic firewall daemon...
Feb 19 06:48:43 roidb01 systemd[1]: Started firewalld - dynamic firewall daemon.
Feb 19 06:50:19 roidb01 systemd[1]: Stopping firewalld - dynamic firewall daemon...
Feb 19 06:50:19 roidb01 systemd[1]: Stopped firewalld - dynamic firewall daemon.
Feb 19 06:50:40 roidb01 systemd[1]: Stopped firewalld - dynamic firewall daemon.
[root@roidb01 ~]# 

##打开防火墙操作
[root@roidb01 ~]# 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‘
[root@roidb01 ~]# 
[root@roidb01 ~]# systemctl start firewalld
[root@roidb01 ~]# systemctl status firewalld
firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled)
   Active: active (running) since Mon 2018-02-19 08:00:45 CST; 7s ago
 Main PID: 18764 (firewalld)
   CGroup: /system.slice/firewalld.service
           └─18764 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid

Feb 19 08:00:45 roidb01 systemd[1]: Started firewalld - dynamic firewall daemon.
[root@roidb01 ~]# 

###关闭防火墙操作
[root@roidb01 ~]# systemctl stop firewalld
[root@roidb01 ~]# systemctl status firewalld
firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled)
   Active: inactive (dead) since Mon 2018-02-19 08:01:47 CST; 8s ago
  Process: 18764 ExecStart=/usr/sbin/firewalld --nofork --nopid $FIREWALLD_ARGS (code=exited, status=0/SUCCESS)
 Main PID: 18764 (code=exited, status=0/SUCCESS)

Feb 19 08:00:45 roidb01 systemd[1]: Started firewalld - dynamic firewall daemon.
Feb 19 08:01:46 roidb01 systemd[1]: Stopping firewalld - dynamic firewall daemon...
Feb 19 08:01:47 roidb01 systemd[1]: Stopped firewalld - dynamic firewall daemon.
[root@roidb01 ~]# systemctl disable firewalld
rm ‘/etc/systemd/system/basic.target.wants/firewalld.service‘
rm ‘/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service‘
[root@roidb01 ~]# 
[root@roidb01 ~]# systemctl status firewalld
firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled)
   Active: inactive (dead)

Feb 19 06:48:42 roidb01 systemd[1]: Starting firewalld - dynamic firewall daemon...
Feb 19 06:48:43 roidb01 systemd[1]: Started firewalld - dynamic firewall daemon.
Feb 19 06:50:19 roidb01 systemd[1]: Stopping firewalld - dynamic firewall daemon...
Feb 19 06:50:19 roidb01 systemd[1]: Stopped firewalld - dynamic firewall daemon.
Feb 19 06:50:40 roidb01 systemd[1]: Stopped firewalld - dynamic firewall daemon.
Feb 19 08:00:43 roidb01 systemd[1]: Starting firewalld - dynamic firewall daemon...
Feb 19 08:00:45 roidb01 systemd[1]: Started firewalld - dynamic firewall daemon.
Feb 19 08:01:46 roidb01 systemd[1]: Stopping firewalld - dynamic firewall daemon...
Feb 19 08:01:47 roidb01 systemd[1]: Stopped firewalld - dynamic firewall daemon.
[root@roidb01 ~]# 

rhel7 之firewall

标签:pri   etc   rhel7   wal   erp   dha   emctl   cat   aip   

原文:http://blog.51cto.com/roidba/2071857

(0)
(0)
   
举报
评论 一句话评论(0
0条  
登录后才能评论!
© 2014 bubuko.com 版权所有 鲁ICP备09046678号-4
打开技术之扣,分享程序人生!
             

鲁公网安备 37021202000002号