I have configured a webserver locally. I am running an Ubuntu 18.04 EC2 instance which is configured as an openvpn server. My webserver is successfully connecting/tunneling to my OpenVPN Ubuntu server Instance, and serving web requests on ports 80 (http) and ports 443 (Https). My openvpn client (the web server) is connecting to my openvpn server instance on port 1194/UDP. Without UFW or any firewall whatsoever, my webserver is properly serving traffic through my openvpn instance on EC2. However, on the EC2 instance, when I apply UFW rules to allow for ssh, and allow incoming traffic on ports 443 and 80 for the webserver, my webserver is no longer accessible from the outside. My default incoming rules are deny, and default outgoing rules are allow. Below is my UFW configuration on my openvpn EC2 instance:
To Action From
-- ------ ----
22/tcp ALLOW IN Anywhere
43219 ALLOW IN Anywhere
1194 ALLOW IN Anywhere
80/tcp ALLOW IN Anywhere
Anywhere ALLOW IN 123.124.1my.1ip
443/tcp ALLOW IN Anywhere
22 ALLOW IN 123.224.1my.2ip
Anywhere ALLOW IN 10.8.0.0/24
22/tcp (v6) ALLOW IN Anywhere (v6)
43219 (v6) ALLOW IN Anywhere (v6)
1194 (v6) ALLOW IN Anywhere (v6)
80/tcp (v6) ALLOW IN Anywhere (v6)
443/tcp (v6) ALLOW IN Anywhere (v6)
This configuration is somehow blocking traffic to my webserver through the vpn. So my question is what am i doing wrong? What exactly do I need to unblock in order to get my webserver to pass through the vpn tunnel, out to the rest of the world?
0 Answers