- web app running on an EC2 box
- REST API running on an onprem box
For one reason or another I am unable to expose the on-prem box externally so have created a site-to-site configuration on OpenVPN for the web app to communicate with the on-prem box.
I am successfully able to connect the client (on prem) to the server (ec2) and verified they can communicate with eachother using netcat.
Problem is I'm unable to get my web app to connect to the REST API as the browser isn't able to see the on-prem server.
port 1194 proto udp dev tun user nobody group nogroup persist-key persist-tun keepalive 10 120 topology subnet server 10.8.0.0 255.255.255.0 ifconfig-pool-persist ipp.txt push "dhcp-option DNS 188.8.131.52" push "dhcp-option DNS 184.108.40.206" push "redirect-gateway def1 bypass-dhcp" <!-- omitted cert config lines --> status /var/log/openvpn/status.log verb 3
client proto udp remote ec2ipaddress 1194 dev tun resolv-retry infinite nobind persist-key persist-tun # do not use default gateway (makes client inaccessible) pull-filter ignore redirect-gateway <!-- cert config lines omitted -->