LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   iptables on the commandline (https://www.linuxquestions.org/questions/linux-security-4/iptables-on-the-commandline-533919/)

andrewz 03-02-2007 10:05 AM

iptables on the commandline
 
Hi,

Is there a way to run iptables on the command line to permanently add rules? I am able to add a rule through the command line but it does write to the /etc/sysconfig/iptables file and therefore if iptables is restarted then it will go away.

thanks
Andrew

acid_kewpie 03-02-2007 10:36 AM

iptables is not there to do anything permenantly. that's up to a service script. generally redhat recently added iptables as a service too (which is potentially confusing) you can normally run /etc/init.d/iptables save to pull the config out and commit to a startup file, which is probably really what you're after. this isn't actually iptables though, but redhat writing wrapper scripts.


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