Quantcast
Channel: Commands using vi
Viewing all articles
Browse latest Browse all 21

Easy IPTables management

$
0
0
$ iptables-save > iptables.current; vi iptables.current; iptables-restore iptables.current; service iptables save

These series of commands allows you all at once to make a backup of your current config, edit that config, then saves it as the running config and makes it persistent. I would advise knowing what your doing to the config before running this because if you mess up say the port 22 portion, you may get knocked off the system. ;) Don't say I didn't warn ya!

commandlinefu.com

by David Winterbottom (codeinthehole.com)


Viewing all articles
Browse latest Browse all 21

Trending Articles