How to properly set firewall on Ubuntu server?
Posted: Fri Jan 27, 2023 11:04 pm
I have a Ubuntu 22.04.1 LTS server provided by vultr.
I have set up a network to connect with in OpenVPN Cloud with the Ubuntu server set as a connector.
After some trials, I found that I can only access public internet websites when the firewall on the connector is disabled.
I have tried to allow http and https by ufw:
But that just can't work.
Now my firewall rules look like:
How can I have both firewall enabled and Internet Access available?
By the way, when ufw enabled, I am able to ping google etc. But websites filed to be opened. All browsers refused to work.
I have set up a network to connect with in OpenVPN Cloud with the Ubuntu server set as a connector.
After some trials, I found that I can only access public internet websites when the firewall on the connector is disabled.
Code: Select all
ufw disable
Code: Select all
ufw allow http
Code: Select all
ufw allow https
Now my firewall rules look like:
Code: Select all
Status: active
To Action From
-- ------ ----
22/tcp ALLOW Anywhere
80/tcp ALLOW Anywhere
443 ALLOW Anywhere
1194 ALLOW Anywhere
22/tcp (v6) ALLOW Anywhere (v6)
80/tcp (v6) ALLOW Anywhere (v6)
443 (v6) ALLOW Anywhere (v6)
1194 (v6) ALLOW Anywhere (v6)
By the way, when ufw enabled, I am able to ping google etc. But websites filed to be opened. All browsers refused to work.