Save iptables settings to be persistent on reboot

Save iptables settings to be persistent on reboot

By default, any modification to the iptables rules are not automatically automatically saved, this is how to change that.
Continue reading Save iptables settings to be persistent on reboot

Running everything as root without sudo on every line

Running everything as root without sudo on every line

If you have a list of commands that needs to be executed as root, without having to put sudo on every line, or, if you have commands that uses “>” character to redirect standarad output to a file that require root to write to, like this

echo "text" > /root/some-file.txt

You can do this:

sudo -s

Continue reading Running everything as root without sudo on every line

Reset iptables to default (accept all) without restart

If you haven’t done anything to preserve iptables settings on reboot, a restart could clear out all settings, but if you do not want to restart, you can use this:
Continue reading Reset iptables to default (accept all) without restart