Bash scripting 24 – firewalls
I am still experimenting with gopher, however this got me thinking about system security, so I have installed.
If you are not sure what you are doing with this, please consult the man page
man ufw
So this describes ufw as
ufw - program for managing a netfilter firewall
As I am ssh'd in to the pi, then the firewall needs to be enabled, however, first make sure that that port 22 (or which ever port you are using for ssh) is allowed. I have to do this as being logged in via ssh, emabling the firewall could block ssh preventing access.
sudo ufw allow 22
Then check the status
sudo ufw status
Status: active
To Action From
-- ------ ----
22 ALLOW Anywhere
22 (v6) ALLOW Anywhere (v6)
To confirm that port 22 is allowed, then enable
sudo ufw enable
Links
Tags
#Bash,#Bashscripting,#BashScripting#Security,#Firewall
Mastodon | ShellLabs | Join Mastodon |