tags:

views:

34

answers:

1

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 ????

+2  A: 

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
Marko Teiste
Umm, why use `cat` instead of simply `iptables-restore < thefile.dat`?
ephemient
Out of habit, no other reason.
Marko Teiste