0
  • 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.

server.conf

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 1.0.0.1"
push "dhcp-option DNS 1.1.1.1"
push "redirect-gateway def1 bypass-dhcp"
<!-- omitted cert config lines --> 
status /var/log/openvpn/status.log
verb 3

client.conf

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 -->

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.