@aliya.yundt
Ubuntu Firewall is known as UFW
(Uncomplicated Firewall). It is a frontend tool to manage iptables rules. Follow these steps to configure UFW on Ubuntu:
- Check UFW Status:sudo ufw status verbose
It will show the current status of UFW.
- Allow SSH Connections:sudo ufw allow ssh
It allows the SSH connection on port 22.
- Allow HTTP and HTTPS Traffic:sudo ufw allow http
sudo ufw allow https
It allows HTTP and HTTPS traffic on ports 80 and 443.
- Allow Specific Port:sudo ufw allow <port>/tcp
Replace <port> with the actual port number. It allows traffic on the specified port.
- Deny All Incoming Connections:sudo ufw default deny incoming
It denies all incoming connections except those that are explicitly allowed.
- Allow All Outgoing Connections:sudo ufw default allow outgoing
It allows all outgoing connections.
- Enable UFW:sudo ufw enable
It enables UFW and starts the firewall.
These are some basic commands to configure UFW on Ubuntu. You can use other UFW commands to add, delete, or modify rules as per your requirement.