LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   iptables rules lost upon rebooting (https://www.linuxquestions.org/questions/slackware-14/iptables-rules-lost-upon-rebooting-103159/)

tigerflag 10-12-2003 04:10 PM

iptables rules lost upon rebooting
 
First off, I searched and read a lot of threads about this in the forums, but nothing that worked for Slackware; the configuration files/locations mentioned were all different and I'm just learning Slackware.

I have a stand-alone box on a dial-up connection. I like to add this rule:

As root, I type: iptables
Then: /usr/sbin/iptables -A INPUT -p tcp --syn -j DROP

When I do this my ports show up as Stealth or Blocked in the grc.com and sygate.com probes. But when I reboot the settings are lost. How do I save the settings? How do I even check to see if iptables is running?

Suggestions or pointers are appreciated.
TIA,
Siri Amrit

rotvogel 10-12-2003 07:18 PM

There are several ways to activate iptables rules at boot.
- use a rc.firewall script (/etc/rc.d/rc.firewall) . This will be started automaticly from rc.inet2;
- use 'iptables-save > anyfile' once and place a iptables-restore command in rc..local
- add your iptables command to rc.local

All these three ways will automaticly load your rules at boot .

You can check iptables rules with the command iptables -L .

tigerflag 10-12-2003 07:48 PM

quote:

"- use 'iptables-save > anyfile' once..."

What would I put in place of "anyfile"? I don't quite understand...

Thanks,
Siri Amrit

rotvogel 10-12-2003 07:59 PM

man iptables-save and man iptables-restore will be a great help. You dump the ruleset of iptables once to a file using iptables-save and restore the settings reading that file with iptables-restore. But that's all in the manual pages :)

tigerflag 10-13-2003 12:43 AM

Thanks, Rotvogel.
Hi Ho! Hi Ho! It's off to read I go!
Siri Amrit


All times are GMT -5. The time now is 05:07 AM.