I use Ubuntu’s Uncomplicated firewall because it is available on Ubuntu and it's very simple.
if ufw is not installed by default be sure to install it first.
| #!/bin/bash | |
| # Original : https://raw.githubusercontent.com/Microsoft/linux-vm-tools/master/arch/install-config.sh | |
| ############################################################################### | |
| # Update our machine to the latest code if we need to. | |
| # | |
| if [ "$(id -u)" -ne 0 ]; then | |
| echo 'This script must be run with root privileges' >&2 | |
| exit 1 |