How to properly set firewall on Ubuntu server?

Next-generation cloud-hosted OpenVPN business solution.
Post Reply
krave
OpenVpn Newbie
Posts: 4
Joined: Mon Oct 31, 2022 9:54 am

How to properly set firewall on Ubuntu server?

Post by krave » 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.

Code: Select all

ufw disable
I have tried to allow http and https by ufw:

Code: Select all

ufw allow http

Code: Select all

ufw allow https
But that just can't work.

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)

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.

Post Reply