Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-25-2009, 01:15 AM   #1
Registered: Mar 2008
Posts: 183

Rep: Reputation: 31
system-config-security and custom iptable rules, where?

Fedora and Redhat folks,
When writing custom iptable rules, where do you place them and how do you make it coexist with the rules created by system-config-security? do you disable it completely? Where is the correct place to restore your rules after a reboot?
Old 05-25-2009, 02:39 AM   #2
Registered: Sep 2003
Location: Sydney Australia
Distribution: Redhat, Centos, Solaris, Ubuntu, SUSE
Posts: 282

Rep: Reputation: 45
To save your rules /etc/init.d/iptables save. This will add your rules to the rule set and ensure they are re-loaded on system boot.
So add your rules as normal and when finished save them. Never used system-config-security so not sure, but I would take a backup of the configuration file just in case. Check /etc/init.d/iptables for the config file.

Last edited by FragInHell; 05-25-2009 at 02:41 AM. Reason: typo
Old 06-18-2009, 11:49 AM   #3
Senior Member
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
AFAIK, iptables does not have a config file per se; instead custom iptables rules are implemented by a script. This script must then be stored w/ the other initialization scripts in the appropriate directory on your system.

The "book" can be found at:
Old 06-18-2009, 07:39 PM   #4
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,417

Rep: Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397
For RH systems,

service iptables save

stores the rules in /etc/sysconfig/iptables. I recommend taking a backup before editing, and leave a root xterm open so you can put it back.


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
iptable rules, your opinions linuxcbon Linux - Security 7 08-16-2008 06:54 PM
iptable rules for new VPS piforever Fedora 10 06-22-2007 08:02 PM
IPTable rules RecoilUK Linux - Security 1 05-27-2005 08:25 PM
Verifying IPTable rules... Ateo Linux - Networking 1 02-02-2005 04:33 PM
Help with IPtable Rules aqoliveira Linux - Security 3 12-10-2003 11:00 AM > Forums > Linux Forums > Linux - Newbie

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

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