LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   Follow steps to take backup and restore IPTABLES (https://www.linuxquestions.org/questions/linux-security-4/follow-steps-to-take-backup-and-restore-iptables-4175582602/)

sbabuv 06-19-2016 02:21 AM

Follow steps to take backup and restore IPTABLES
 
Dear Friends,

Please click on below link to take backup and restore of IPTABLES..

https://winlinuxtips.wordpress.com/2...tore-iptables/



Quote:

Originally Posted by hans51 (Post 2924418)
to save changes made to the iptables config file - use

iptables-save >/etc/iptables.conf

to restore from that file - use in shell:

iptables-restore </etc/iptables.conf

obviously you may run above save command to create a second backup copy in case all gets lost again ! example:
iptables-save >/etc/iptables.conf-backup


unSpawn 06-19-2016 03:31 AM

This post was pruned from the vintage 2007 thread "Need to restore iptables config". Please mind where you post, thanks.

sundialsvcs 06-20-2016 01:33 PM

Also: "Meh... I haven't hand-coded an IPTables rule-set in years now."

Take a look at tools such as Shorewall, which will process a specifications-file and issue(!) the commands necessary to implement that firewall.

It is, in other words, a "DWIW = Do What I Want" tool.

To me, the rather-enormous advantage of this approach is that the tool's configuration-files specify "what you want," leaving it up to the tool itself "to achieve that." (Such that, if it fails to do so, that's merely "a bug.")

This is vastly easier than trying to deal with command-scripts which may-or-may not "accomplish your intentions" successfully, and in which in any case do not describe what "your intentions" actually are.

TB0ne 06-20-2016 02:05 PM

Quote:

Originally Posted by sbabuv (Post 5563150)
Dear Friends,
Please click on below link to take backup and restore of IPTABLES..

Read the LQ Rules. You did this for the sole purpose of ADVERTISING YOUR OWN BLOG.

Really, if you're going to get people to read your blog, try putting something out there that's original, not ancient, and also without spelling/grammar errors. Post reported.


All times are GMT -5. The time now is 05:25 AM.