1、# chkconfig --list:顯示開機可以自動啟動的服務
結果:iptables 0:off 1:off 2:on 3:on 4:on 5:on 6:off表示iptables開機自動開啟2、3、4、5級服務。
2、# chkconfig --add 命令名: 添加開機自動啟動命令名服務
chkconfig --add iptables:開機自動啟動iptables服務;
開機后通過命令iptables -L -n校驗是否設置成功;
3、# chkconfig --del 命令名: 刪除開機自動啟動命令名服務;
chkconfig --del iptables:開機禁止啟動iptables服務;
開機后通過命令iptables -L -n校驗是否設置成功
