1

I need to unlock only outgoing 443 and 80 port, only for navigate through internet, actually im using the rules:

ufw default deny incoming
ufw default deny outgoing
ufw allow out from any to any port 443 proto tcp
ufw allow out from any to any port 80 proto tcp
ufw enable

But unfortunally ufw blocks all internet, and the pages does not load. Do you have any solution to my problem or another alternative?

Note: With CSF config server firewall, is not necessary the incoming traffic in the 443 and 80 ports for connect to internet only the outgoing 443 and 80, but in ufw how i can do it?

  • You probably mean outgoing to those ports, – vonbrand Aug 11 '19 at 20:27
  • exactly, that's is i need vonbrand! – xixuhuw Aug 11 '19 at 20:29
0

Remove All Ports one by one by typing:

sudo ufw delete allow 'PORTNUMBER'

Then allow port 80 and 443 by typing:

sudo ufw allow '80'
sudo ufw allow '443'
  • can i disable all ports using wildcards? ufw delete allow '*' – xixuhuw Aug 11 '19 at 20:17
  • sudo ufw allow '80' it specify outgoing only, or is for both in and out? – xixuhuw Aug 11 '19 at 20:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.