Solved Attempt to install UFW

Solved issue

Terminal Velocity

Well-Known Member
Joined
Oct 13, 2021
Messages
745
Reaction score
544
Credits
5,324
I use Debian 11, I found this guide:

At the beginning of the guide has this warning:

''Warning: If you are configuring over SSH, you may wish to allow SSH before enabling the firewall. If your connection gets interrupted before allowing SSH you may be locked out of your system. ''

I got scared, since I don't understand what they talking about I stopped there. Any help is welcomed
 


I got scared, since I don't understand what they talking about I stopped there. Any help is welcomed
They are talking about that if you are installing and configuring it over an ssh connection and you enable ufw/firewall there is a chance that your ssh connection will be dropped because the ssh port is probably not open by default with the Debian ufw package. If you are locked out, as long as you have physical access to your system you can still regain access to your system.
 
I use Debian 11, I found this guide:
whats wrong with the firewall in the synaptic package manager? [at least you will know it will work with your installation]
 
Just install gufw from syanptic and your good to go. If you are remotely accessing your machine then the caution they mention is important, if not then no need to worry.
 
After you install UFW run the following command and you should be good.
Code:
sudo ufw allow ssh

That will prevent the firewall from blocking ssh. Or you can just allow specific connections from devices within your network.
Code:
sudo ufw allow out to 192.168.0.109 from 192.168.0.101
Code:
sudo ufw allow in to 192.168.0.109 from 192.168.0.101
That seems to work for me so far.

Worst case scenario just disable UFW.
Code:
sudo ufw disable

You can also reset the firewall rules if needed.
Code:
sudo ufw reset
 
Guys Thanks, I just installed a GUI firewall (gufw) and this is what I was looking for as an old Xwindows user, It looks neat

1) I guess that if Firewall blocks my internet I can always just disable it from the GUI... Am I correct?

2) I use Transmission for torrents, does this require a special rule in the firewall?

3) Will the OS update normally with the firewall enabled?
 
Last edited:
Guys Thanks, I just installed a GUI firewall (gufw) and this is what I was looking for as an old Xwindows user, It looks neat

1) I guess that if Firewall blocks my internet I can always just disable it from the GUI... Am I correct?

2) I used Transmission for torrents, does this require a special rule in the firewall?

3) Will the OS update normally with the firewall enabled?
GUFW is the GUI for UFW so you can also disable it using the command I listed on my previous post as well. Yes the OS will update normally if you enable the firewall with its default rules. I used it on Debian 11 and 12.
 
Last edited:
I guess that if Firewall blocks my internet I can always just disable it from the GUI... Am I correct?
you usually have options, something like Home, Office, public, each will set a higher restriction, at home i actually use office setting but my lappy [which goes everywhere with me] is set for public
 
In gufw if you use the default setting you should have no problems with internet access everything will work.
Good luck.
 
GUFW should be preinstalled in Debian and enabled by default, it's an excellent piece of software. It lists all the connections and logging all the events and you can easily point and click everything. Pity all those years I didn't knew about it. It allows everything I do on the internet and my computer is now firewalled!
 

Members online


Top