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?

Recommended Answers

All 4 Replies

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

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?

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.