LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   iptables won't remember rules (https://www.linuxquestions.org/questions/linux-software-2/iptables-wont-remember-rules-486530/)

pwc101 09-24-2006 01:04 PM

iptables won't remember rules
 
I'm trying to get azureus to work in conjunction with iptables. Using the commands given on the azureus wiki (http://www.azureuswiki.com/index.php...es_.28Linux.29) to allow traffic through a designated port. After issuing the commands, I can see that they have been added from the output of iptables -L
Code:

Chain INPUT (policy ACCEPT)
target    prot opt source              destination       
ACCEPT    udp  --  anywhere            anywhere            udp dpt:52151 state NEW
ACCEPT    tcp  --  anywhere            anywhere            tcp dpt:52151 flags:SYN,RST,ACK/SYN state NEW

Chain FORWARD (policy ACCEPT)
target    prot opt source              destination       

Chain OUTPUT (policy ACCEPT)
target    prot opt source              destination

However, when I restart my computer, the rules have been forgotten. Is there a command which I have to run to save the rules?

Thanks in advance,

Andrew Benton 09-24-2006 02:00 PM

Put the commands you want to run in a script that gets run every time your computer boots. The obvious script to use would be the bootscript that sets up your firewall.

pwc101 09-24-2006 04:11 PM

ah, something so simple! I'm not sure if I put it in the right script (/etc/rc.d/rc.modules?) but it seems to have worked.

Thanks :)


All times are GMT -5. The time now is 01:27 PM.