2021-08-05 23:47:47 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# Install ufw package if needed:
|
2021-08-06 00:06:17 +02:00
|
|
|
apt-get update && apt-get install --no-install-recommends ufw && apt-get autoclean && apt-get autoremove
|
2021-08-05 23:47:47 +02:00
|
|
|
|
|
|
|
# Basic ufw firewall setup allowing ssh, http, and https:
|
|
|
|
ufw default deny incoming
|
|
|
|
ufw default allow outgoing
|
|
|
|
ufw allow ssh
|
|
|
|
ufw allow http
|
|
|
|
ufw allow https
|
2021-08-08 11:46:41 +02:00
|
|
|
ufw logging off
|
|
|
|
rm -f /var/log/ufw.log
|
2021-08-05 23:47:47 +02:00
|
|
|
ufw --force enable
|