LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices

Reply
 
Search this Thread
Old 04-15-2008, 09:52 AM   #1
ochienged
Member
 
Registered: Oct 2007
Location: Plano, TX
Distribution: Fedora, CentOS, RHEL, Debian
Posts: 70

Rep: Reputation: 26
Save iptables rules


I set iptable rules but i cant remember the command for saving them. Someone remind me please. Regards
 
Old 04-15-2008, 10:02 AM   #2
win32sux
Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Quote:
Originally Posted by ochienged View Post
I set iptable rules but i cant remember the command for saving them. Someone remind me please. Regards
The generic way:
Code:
iptables-save > /somewhere/example.txt
As you can see, you can save the config to any text file you want, but you should probably find-out which file your distro is configured to automatically restore them from at boot time and then save to that. Usually it's something like /etc/sysconfig/iptables or similar.

The Red Hat-based distro way:
Code:
service iptables save
 
Old 04-15-2008, 10:07 AM   #3
Curtix
LQ Newbie
 
Registered: Apr 2008
Posts: 13

Rep: Reputation: 0
iptables-restore as well is the counter
Code:
iptables-restore /somewhere/whateveryousavedas
saved my butt 10 min ago.
 
  


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
iptables-save, iptables-restore, how to set up them in some script sarajevo Linux - Networking 1 03-24-2008 11:39 PM
iptables 1.27a still loading rules after installing iptables 1.3.0 yawe_frek Linux - Software 1 06-07-2007 09:50 PM
how to save iptables firewall rules permanently sunlinux Linux - Security 3 12-07-2006 11:53 AM
iptables-save, but rules don't load on boot-up kpachopoulos Debian 2 11-18-2006 10:36 PM
iptables save rules Osten Debian 1 02-10-2004 04:53 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration