查看防火墙配置(需要root权限)
[plain]view plaincopyprint?
1. [root@localhost ~]# service iptables status
2. Redirecting to /bin/systemctl status iptables.service
3. iptables.service - IPv4 firewall with iptables
4. Loaded: loaded (/usr/lib/systemd/system/iptables.service; disabled)
5. Active: inactive (dead)
[root@localhost ~]# service iptables status
Redirecting to /bin/systemctl status iptables.service
iptables.service - IPv4 firewall with iptables
Loaded: loaded (/usr/lib/systemd/system/iptables.service; disabled)
Active: inactive (dead)
关闭防火墙(需要root权限)
[plain]view plaincopyprint?
1. [root@localhost ~]# service iptables stop