How to block all incoming and outgoing traffic except outgoing of 80 port and 443 in ufw?
1
vote
2
answers
6468
views
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?
Asked by xixuhuw
(11 rep)
Aug 11, 2019, 08:07 PM
Last activity: Jun 10, 2025, 09:10 PM
Last activity: Jun 10, 2025, 09:10 PM