いつもiptablesのシェルを読み直すでやってるけど、
一つだけ削除したい時は↓の方が便利かも。。。
方法1.
iptables -D チェイン ルール番号
ルール番号は↓のコマンドで調べられる
iptables -L --line-numbers
方法2.
iptables -D チェイン ルール内容
例えば
iptables -D INPUT -p tcp -s 192.168.1.1 --dport ssh -j DROP
・方法1.
[root@centos ~]# setup
ファイヤウォールの設定⇒セキュリティレベルを「無効」を選択
ファイヤウォールの設定⇒SELinuxを「無効」を選択
・方法2.
[root@centos ~]# /etc/rc.d/init.d/iptables stop
[root@centos ~]# chkconfig iptables off
[root@centos ~]# chkconfig --list iptables
iptables 0:off 1:off 2:off 3:off 4:off 5:off 6:off
[root@centos ~]# vi /etc/sysconfig/selinux
SELINUX=enforcing
↓
SELINUX=disabled
最近のコメント