


To do this, you need to mention that particular port such as 22 if you want to establish a connection via SSH to the above-mentioned IP address. You can also allow certain ports for an IP address. For example, if you want to allow connections from the private IP address 192.168.0.104, execute the following command: sudo ufw allow from 192.168.0.104 It is also possible to specify allowed IP addresses with UFW. If the range of ports that you want to allow extends from 5000 to 5010, then you must execute the following commands for UDP and TCP in the terminal. UDP or TCP – for which the rules should apply. Here you have to specify the protocol – i.e. UFW can enable access to port ranges instead of individual ports. To allow port number 8080 in UFW, the command will be: sudo ufw allow 8080 However, you can add rules in ufw with a very simple command syntax given below: sudo ufw allow|deny|reject SERVICE This means that rules in les may overwrite those in les and rules in les those of lesĭefault rules files of UFW contains some basic rules to allow problem-free internal network traffic. var/lib/ufw/les (or /lib/ufw/les – in which the rules defined in the command line are also persisted) Ufw uses a three-level set of rules, which is stored in three configuration files. These are read and evaluated in the following order: In case you want to stop or disable your firewall then run: sudo ufw disableĪctivating the firewall without defining rules already means that all incoming connections are forbidden and all outgoing connections are allowed. To confirm UFW firewall service is working properly without any error: sudo ufw status Enable/Start firewall on Debian BullseyeĪfter setting up, the service of the firewall would not be activated by default, and to make it live, run: sudo ufw enable If after installing the Debian Linux you won’t be able to use of UFW command because of not found error then it needs to be installed first. Graphical user interface for UFW firewall on Debian 11 or 10 Install and Enable UFW firewall on Debian 11 or 10 1.
