Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Security
User Name
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.


  Search this Thread
Old 09-24-2004, 02:27 PM   #1
LQ Newbie
Registered: Mar 2002
Location: coimbatore
Posts: 1

Rep: Reputation: 0
May I use variables inside /etc/sysconfig/iptables file?

I want to know if there is a way tu put variables inside the /etc/sysconfig/iptables file...
I want to migrate my ipchains script (i have lots of variables) to an iptables file... not as script, but as the iptables config file itself.
Thank you
Old 09-24-2004, 04:38 PM   #2
LQ Guru
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
ipchains and iptables are quite different... you would be re-creating the sirewall rules....
its only a 2 minute job if you know how... and if u dont, get someone who does know or use an automated tool like firestarter.
Old 09-24-2004, 09:26 PM   #3
Senior Member
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
It's also not advisable to manually edit the /etc/sysconfig/iptables file. The best way is to migrate your script to iptables format, then just run the script at boot or alternatively, you can run the script once and use the following command:

iptables-save > /etc/sysconfig/iptables

Sounds like your on a Redhat-ish system, so the rules should then get loaded automatically at boot by iptables-restore.


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
iptables inside client to inside host with outside DNS or IP - Help! linuxhelp2 Linux - Networking 1 10-15-2005 06:19 AM
iptables -P vs :OUTPUT in /etc/sysconfig/iptables TomF Linux - Security 2 04-14-2005 10:50 PM
etc/sysconfig/iptables file explinations Junior24 Linux - General 3 12-07-2004 01:35 PM
IPTABLES - rules in /etc/sysconfig/iptables The_JinJ Linux - Newbie 6 11-20-2004 01:40 AM
My iptables script is /etc/sysconfig/iptables. How do i make this baby execute on boo ForumKid Linux - General 3 01-22-2002 07:36 AM > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 03:50 AM.

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