I have a file with all the iptable settings. How do I load this into my server? [on hold]

Tag: unix Author: qingjizhao Date: 2009-09-12

My system admin gave me a file with iptables rules. What command do I type in to load this?

I heard people can do this in one line?

Something like...iptables > thefile.dat ????

check www.serverfault.com

Best Answer

You can save your current iptables using iptables-save as in

iptables-save >thefile.dat

and later load it with

cat thefile.dat | iptables-restore


Umm, why use cat instead of simply iptables-restore < thefile.dat?
Out of habit, no other reason.