I'm trying to automate the setup of UFW on an Ubuntu 16.04 instance. However when I type:
sudo ufw enable
I get prompted to enter yes or no, is there a way to feed it yes or set it automatically to start without getting stuck with a prompt?
$ echo "y" | sudo ufw enable
You could use:
$ sudo ufw --force enable
yes allows you to answer all questions from a program with
yes | sudo ufw enable