LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 02-15-2006, 09:30 PM   #1
ricnoah
Member
 
Registered: May 2005
Location: philippines
Posts: 102

Rep: Reputation: 15
how to save iptables


i am learning how to configure the firewall in RH9 using the konsole,but it's so funny i do not know the command how to save the alteration i had made, what is the command to save the alteration, like ctrl s in windows

thank you.
 
Old 02-15-2006, 09:40 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
You can use iptables-save to dump out the contents of your firewall and redirect it to a file:
Code:
iptables-save > firewall.log
You can then retrieve it with:
Code:
iptables-restore < firewall.log
I tend to build the rules in a script and start it at boot time, rather than use the above method. It just depends which suits the way you're working...

Last edited by gilead; 02-15-2006 at 09:41 PM.
 
Old 02-16-2006, 05:05 AM   #3
whencat
Member
 
Registered: Aug 2003
Location: Pondicherry,India
Distribution: Fedora Core 3, RedHat 9.0, SUSE 8.1 Personal,
Posts: 49

Rep: Reputation: 15
service iptables save
I think the above also is a valid choice.
 
Old 02-16-2006, 06:35 AM   #4
doublejoon
Member
 
Registered: Oct 2003
Location: King George, VA
Distribution: RHEL/CentOS/Scientific/Fedora, LinuxMint
Posts: 370

Rep: Reputation: 44
Quote:
Originally Posted by whencat
service iptables save
I think the above also is a valid choice.
or /etc/init.d/iptables save will work also
 
Old 02-16-2006, 07:44 PM   #5
43r05p4c3
Member
 
Registered: Mar 2005
Location: Ontario, Canada
Distribution: Mandrake 10.0/XP Dual Boot Desktop & Gentoo 2005.1 Laptop
Posts: 79

Rep: Reputation: 15
Which (if any) of these commands will enable the saved options on boot?

If none (warning newbish question follows), where/how do I save a script to run on boot?

Thanks,

Steve
 
Old 02-16-2006, 08:42 PM   #6
ricnoah
Member
 
Registered: May 2005
Location: philippines
Posts: 102

Original Poster
Rep: Reputation: 15
gilead

thanks a lot you gave me an idea
 
Old 02-16-2006, 08:50 PM   #7
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Glad to hear it - it's Friday afternoon here and I'm fresh out of ideas for this week
 
Old 02-19-2006, 07:32 PM   #8
ricnoah
Member
 
Registered: May 2005
Location: philippines
Posts: 102

Original Poster
Rep: Reputation: 15
can anyone who can tell me how to start iptables everytime i boot my pc?
 
Old 02-19-2006, 10:48 PM   #9
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
In /etc/init.d is the a file called iptables or rc.iptables? It needs to be executable and modified to start up your iptables rules. If there isn't a file call that, you can add the commands to /etc/init.d/rc.local.
 
  


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
Save iptables filters yhus Red Hat 3 07-30-2005 04:01 AM
Where should I save this iptables? wardialer Linux - Newbie 2 02-12-2005 04:10 AM
iptables save rules Osten Debian 1 02-10-2004 04:53 PM
Iptables-save ??? gruger Linux - Security 3 05-23-2003 06:23 PM
iptables-save doen't! Smerk Linux - General 4 03-13-2003 10:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 08:09 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