LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 03-02-2007, 10:05 AM   #1
andrewz
LQ Newbie
 
Registered: Jan 2007
Location: Chicago
Distribution: rhel3, rhel4, centos3, centos4
Posts: 8

Rep: Reputation: 0
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
 
Old 03-02-2007, 10:36 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
VLC - Only commandline? worldgnat Linux - Software 3 05-20-2006 12:06 AM
commandline help needed soldan Linux - Newbie 2 03-19-2006 11:42 AM
X!! Fowarding using commandline cvcrud Red Hat 3 06-26-2005 04:22 PM
Remote CommandLine moejoe Linux - Networking 1 12-28-2004 10:40 AM
Commandline in SUSE Aiza Sarah Linux - Newbie 2 09-27-2004 05:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 02:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration