ubuntu中启动及关闭iptables
启动iptables
[root@localhost ~]# modprobe ip_tables
关闭iptables
[root@localhost ~]# iptalbes -F[root@localhost ~]# iptables -X
[root@localhost ~]# iptables -Z
[root@localhost ~]# iptables -P INPUT ACCEPT
[root@localhost ~]# iptables -P OUTPUT ACCEPT
[root@localhost ~]# iptables -P FORWARD ACCEPT
modprobe -r ip_tables
centos中启动及关闭iptables
查询防火墙状态:
[root@localhost ~]# service iptables status
停止防火墙:
[root@localhost ~]# service iptables stop
启动防火墙:
[root@localhost ~]# service iptables start
重启防火墙:
[root@localhost ~]# service iptables restart
永久关闭防火墙:
[root@localhost ~]# chkconfig iptables off
永久关闭后启用:
[root@localhost ~]# chkconfig iptables on
本文介绍了在Ubuntu和CentOS系统中如何启动、关闭以及管理iptables防火墙的方法。包括了查询防火墙状态、停止、启动、重启防火墙以及永久关闭和启用防火墙的具体步骤。
211

被折叠的 条评论
为什么被折叠?



