SyntaxHighlighter

2014年7月11日金曜日

CentOSでiptables、ip6tablesがnot runningなのに、GUI(system-config-firewall)上だと稼働状態に見える謎

service iptables off しても GUI(system-config-firewall)上では稼働しているように見える。どういうことじゃい!!!

ということで調べてみた。

     → GUI上でEnable/Disableを切り替えると、次の変更が行われる。
     ・Enableにする
          → /etc/sysconfig/system-config-firewallの中身でが --enabled になる
   → /etc/sysconfig/iptablesが作成される
   → /etc/sysconfig/ip6tablesが作成される
          → iptables が起動される
          → ip6tables が起動される
     ・Disabledにする
          → /etc/sysconfig/system-config-firewallの中身でが --disabled になる
   → /etc/sysconfig/iptablesが削除(rename?)される
   → /etc/sysconfig/ip6tablesが削除(rename?)される
          → iptables が終了する
          → ip6tables が終了する
なお、GUIでのEnable/Disable操作とchkconfig on/offは連動していない。。
・chkconfig offにしてからGUI上でEnableにし、OS再起動するとiptablesは起動しない。
・chkconfig onにしてからGUI上でDisableにし、OS再起動するとiptablesは起動する。

結論
・GUI上のEnabled/Disabled表示切り替えは、/etc/sysconfig/system-config-firewallを見て判断しており、実際のiptablesサービスの稼働状態を見ていない。
 
まぎらわしいぜ(T_T)

0 件のコメント:

コメントを投稿