My system admin gave me a file with iptables rules. What command do I type in to load this?
I watched him do it before, and he did it in 1 line! Something like...iptables > thefile.dat ????
My system admin gave me a file with iptables rules. What command do I type in to load this?
I watched him do it before, and he did it in 1 line! Something like...iptables > thefile.dat ????
You load an iptables configuration file using iptables-restore
This has effect immediately. However for this settings to be persistent over system reboot they must be saved. On most distributions this can be done with.
As mentioned in other answers the configuration can be saved using
The file itself is a text file and can be edited with any texteditor and then reloaded into iptables using the iptables-restore command.
To import an iptables script into your ruleset