Go to /etc/sysconfig/iptables-config and change<br><br>IPTABLES_SAVE_ON_STOP="no"<br><br>to <br><br>IPTABLES_SAVE_ON_STOP="yes"<br><br>now everytime you shutdown the system your current iptables will be saved and
<br>then reloaded upon reboot.<br><br>Filippos<br><br><br><div><span class="gmail_quote">On 5/18/06, <b class="gmail_sendername">Hongwei Li</b> <<a href="mailto:hongwei@wustl.edu">hongwei@wustl.edu</a>> wrote:</span>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br><br>Based on some suggestions, I edited file /etc/sysconfig/iptables as:<br><br># Firewall configuration written by system-config-securitylevel
<br># Manual customization of this file is not recommended.<br>*filter<br>:INPUT ACCEPT [0:0]<br>:FORWARD ACCEPT [0:0]<br>:OUTPUT ACCEPT [0:0]<br>:RH-Firewall-1-INPUT - [0:0]<br>-A INPUT -j RH-Firewall-1-INPUT<br>-A FORWARD -j RH-Firewall-1-INPUT
<br>#<br>:okay - [0:0]<br>#<br>-A RH-Firewall-1-INPUT -i lo -j ACCEPT<br>-A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT<br>-A RH-Firewall-1-INPUT -p 50 -j ACCEPT<br>-A RH-Firewall-1-INPUT -p 51 -j ACCEPT<br>-A RH-Firewall-1-INPUT -p udp --dport 5353 -d 
<a href="http://224.0.0.251">224.0.0.251</a> -j ACCEPT -A<br>RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT<br>-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT<br>#<br>-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT #
<br>...<br>-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT<br>-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 25 -j ACCEPT<br>-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
<br>...<br>-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited COMMIT<br><br>Then, run service iptables start and everything work well -- I can remote<br>login ssh.  I have run<br># iptables-save<br><br>and also turn the service on:
<br><br># chkconfig iptables on<br># chkconfig --list | grep iptable<br>iptables        0:off   1:off   2:on    3:on    4:on    5:on    6:off<br><br>However, if I reboot the system, the port 22, 80 etc. are not open, I cannot
<br>remotely login ssh. I go to local terminal and run iptables -L, it only shows<br>something like "original iptables setting"(?) as:<br><br>Chain INPUT (policy DROP)<br>target     prot opt source               destination
<br>ACCEPT     tcp  --  <a href="http://wumsdns1.wustl.edu">wumsdns1.wustl.edu</a>   anywhere            tcp<br>flags:!FIN,SYN,RST,ACK/SYN<br>ACCEPT     udp  --  <a href="http://wumsdns1.wustl.edu">wumsdns1.wustl.edu</a>   anywhere
<br>...<br>Chain INBOUND (1 references)<br>target     prot opt source               destination<br>ACCEPT     tcp  --  anywhere             anywhere            state<br>RELATED,ESTABLISHED<br>ACCEPT     udp  --  anywhere             anywhere            state
<br>RELATED,ESTABLISHED<br>LSI        all  --  anywhere             anywhere<br>...<br>Chain OUTBOUND (1 references)<br>target     prot opt source               destination<br>ACCEPT     icmp --  anywhere             anywhere
<br>ACCEPT     tcp  --  anywhere             anywhere            state<br>RELATED,ESTABLISHED<br>ACCEPT     udp  --  anywhere             anywhere            state<br>RELATED,ESTABLISHED<br>ACCEPT     all  --  anywhere             anywhere
<br><br>Since port 22,80 etc. are not open, I can do nothing remotely (ssh, web,..).<br>I have to run "service iptables restart" manually, then it shows what I put in<br>the file /etc/sysconfig/iptables:<br>Chain INPUT (policy ACCEPT)
<br>target     prot opt source               destination<br>RH-Firewall-1-INPUT  all  --  anywhere             anywhere<br>...<br>ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp<br>dpt:ssh<br>ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp
<br>dpt:smtp<br>ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp<br>dpt:http<br>ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp<br>dpt:pop3<br>...<br>ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp
<br>dpt:imap<br>REJECT     all  --  anywhere             anywhere            reject-with<br>icmp-host-prohibited<br><br>Then, everything is working normally.  Although I can put "iptables restart"<br>in rc.local
 and it does work, but I am not comfortable with that.<br><br>Did I miss something?  Where is the "original setting" of iptables stored?<br>Why isn't my /etc/sysconfig/iptables loaded after reboot? How to make it
<br>loaded during booting without using rc.local?<br><br>Thanks!<br><br>Hongwei<br><br><br><br>--<br>fedora-list mailing list<br><a href="mailto:fedora-list@redhat.com">fedora-list@redhat.com</a><br>To unsubscribe: <a href="https://www.redhat.com/mailman/listinfo/fedora-list">
https://www.redhat.com/mailman/listinfo/fedora-list</a><br></blockquote></div><br>