I have a 4G router connected to the NIC of a Ubuntu 18.04 server. I need to be able to use the public IP of the router to access the webpage hosted on the server. I have correctly configured port forwarding on the router (confirmed this by connecting a non-ubuntu device and port forwarding successfully to it) and still unsuccessful. The default route on the server is configured to the IP of the router. Using ufw
I have dropped the firewall restrictions completely to the point where any connection should be able to be made.
/etc/default/uwf:
# /etc/default/ufw #
# Set to yes to apply rules to support IPv6 (no means only IPv6 on loopback
# accepted). You will need to 'disable' and then 'enable' the firewall for
# the changes to take affect.
IPV6=yes
# Set the default input policy to ACCEPT, DROP, or REJECT. Please note that if
# you change this you will most likely want to adjust your rules.
DEFAULT_INPUT_POLICY="ACCEPT"
# Set the default output policy to ACCEPT, DROP, or REJECT. Please note that if
# you change this you will most likely want to adjust your rules.
DEFAULT_OUTPUT_POLICY="ACCEPT"
# Set the default forward policy to ACCEPT, DROP or REJECT. Please note that
# if you change this you will most likely want to adjust your rules
DEFAULT_FORWARD_POLICY="ACCEPT"
# Set the default application policy to ACCEPT, DROP, REJECT or SKIP. Please
# note that setting this to ACCEPT may be a security risk. See 'man ufw' for
# details
DEFAULT_APPLICATION_POLICY="SKIP"
# By default, ufw only touches its own chains. Set this to 'yes' to have ufw
# manage the built-in chains too. Warning: setting this to 'yes' will break
# non-ufw managed firewall rules
MANAGE_BUILTINS=no
root@server:/etc/ufw# ufw status verbose
Status: active
Logging: on (low)
Default: allow (incoming), allow (outgoing), allow (routed)
New profiles: skip
To Action From
-- ------ ----
Anywhere ALLOW IN 10.20.0.0/24
80 ALLOW IN Anywhere
80/tcp ALLOW IN Anywhere
22/tcp ALLOW IN Anywhere
22 ALLOW IN Anywhere
8088 ALLOW IN Anywhere
80 (v6) ALLOW IN Anywhere (v6)
80/tcp (v6) ALLOW IN Anywhere (v6)
22/tcp (v6) ALLOW IN Anywhere (v6)
22 (v6) ALLOW IN Anywhere (v6)
8088 (v6) ALLOW IN Anywhere (v6)
Any suggestions on changes to allow port forwarding?