Professional Documents
Culture Documents
Prac 8
Prac 8
Theory:
To install and set up the Uncomplicated Firewall (UFW) on an Ubuntu
server, follow these steps:
Before installing any software, ensure your system is up to date. Run the
following commands:
```bash
sudo apt update
sudo apt upgrade
```
```bash
sudo ufw enable
```
You'll receive a prompt asking if you want to proceed; type 'y' and press
Enter.
```bash
sudo ufw default deny incoming
sudo ufw default allow outgoing
```
```bash
sudo ufw allow OpenSSH
```
To allow other services, you can specify the port number and protocol.
For instance, to allow HTTP (port 80) and HTTPS (port 443):
```bash
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
```
```bash
sudo ufw status
```
You can modify or delete rules as necessary. For example, if you need to
delete a rule:
```bash
sudo ufw delete RULE
```
```bash
sudo ufw reload
```