Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm working on a Soekris net4801 that is running an unknown distro of Linux. The kernel is 2.4.29, and iptables is v1.3.4.

I can't work out how to save the iptables. I searched the whole system for files/folders containing the name "iptables" and got 3 results:

/user/local/lib/iptables
/sbin/iptables
/lib/iptables

I've tried iptables save, iptables-save and iptables save active.

  • "iptables save" and "iptables save active" give me an invalid argument error.
  • "iptables-save" isn't a valid command.
  • "iptables --help" gives me a list of valid switches, none of which have to do with saving.

Any ideas on how I can save the iptables?

share|improve this question

1 Answer 1

Usually you create a script (like this) that first clears all rules and then creates the rules.

These save commands were added later. I personally don't like them: you can't script.

Usually you add the script to the /etc/init.d dir. The script in the example is already an init-script. Then you have to add links to /etc/rcX.d. If you happen to have a debian-based distro the command update-rc.d will do that for you. Otherwise read this, it's the most distro-independent description I found.

Or google about rc.d and run levels.

share|improve this answer
    
Okay, so I'd need to create a script to re-write all the values currently in the tables? How do I make sure that my additions are loaded on reboot? All of the current entries seem to be static, but my additions disappear on reboot. –  Mike Morris Apr 15 '11 at 16:57
    
-> I edited the answer –  Ganwell Apr 15 '11 at 23:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.