ufw

ufw is firewall in Ubuntu.

To enable

To list available apps, run

To see the status, run

To see firewall rules in a numbered format

Stop ufw

Start ufw

Open Ports

Here are some commands to open ports.

Following command open tcp ports 8000 to 9000.

Disable all other ports by default for incoming and allow all outbound traffic

Whitelist an IP

To allow an IP to access all services

To allow to specific PORT

Enable Logging

To enable logging, run

By default ufw logs to /var/log/kern.log.

To log to differnt file, edit

Uncomment the line

rstart rsyslog

Allow cloudflare IP in ufw

See firewall

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *