Deploy: Add install-firewall.sh script
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
parent
4b58ff3c2a
commit
b09cc0433f
1 changed files with 15 additions and 0 deletions
15
scripts/dist/install-firewall.sh
vendored
Executable file
15
scripts/dist/install-firewall.sh
vendored
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Install ufw package if needed:
|
||||
sudo apt-get update
|
||||
sudo apt-get -qq install --no-install-recommends ufw
|
||||
|
||||
# Basic ufw firewall setup allowing ssh, http, and https:
|
||||
sudo ufw default deny incoming
|
||||
sudo ufw default allow outgoing
|
||||
sudo ufw allow ssh
|
||||
sudo ufw allow http
|
||||
sudo ufw allow https
|
||||
sudo ufw logging off
|
||||
sudo rm -f /var/log/ufw.log
|
||||
sudo ufw --force enable
|
Loading…
Reference in a new issue