0

I am trying to configure UFW (uncomplicated firewall) so that is will deny all ports exept port 443 and 4444. How do i do this?

2
Contributors
4
Replies
7
Views
5 Years
Discussion Span
Last Post by MasterHacker110
0

Basically run:

sudo ufw default deny
sudo ufw enable
sudo ufw allow 443/tcp
sudo ufw allow 4444/tcp

and also udp if you need to enable that too. You can list all rules by using:

sudo ufw status

You can read more by using man ufw or reading this document: https://help.ubuntu.com/community/UFW

0

Aaa thanks, i am kinda new to the linux and setup a firewall thing... So that will make it only eccept connection that hopefully match presefined rules on port 443 and 4444?

0

Yes, you can also enable a specific IP or a range:

sudo ufw allow from 192.168.0.1 to tcp port 443

Anyway, the link I posted above gives you all the information you need about UFW.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.