I currently have an EC2 server with OpenVPN installed that I spun up using the official OpenVPN Access Server AMI.

I went through the OpenVPN setup process with all default values selected and I've been able to connect to my instance using the Windows client I downloaded from the VPN server.

My purpose is to use the VPN server to connect to the internet. I will be going to a country where certain websites and services are blocked and need the VPN server to bypass the firewalls in place. I do not plan on using the VPN server to access any private networks.

I have updated my OpenVPN Access Server settings to force it to route all internet traffic and to have its clients use the same DNS servers as the access server host:

enter image description here

I have also enabled IP forwarding on my EC2 instance with the following command:

echo 'net.ipv4.ip_forward=1' | sudo tee -a /etc/sysctl.d/99-sysctl.conf

With the above settings, I am unable to connect to the internet when I am connected to my VPN. If I turn off Should client internet traffic be routed through the VPN, I can connect to the internet, but I would be connected through my original ISP IP address.

What else do you need to do here to enable OpenVPN to route all internet traffic?

  • Can you check after connecting to vpn server, if the client routing table get successfully updated? If you don't see a default route pointing to the vpn server, then there is a problem. – Diamond May 9 '19 at 7:38
  • Any news on this? I have a same problem here. btw as @Bruce mentioned you need to disable "Change Source/Destination Check" on your instance. – Shnd Jul 3 '19 at 8:55

On AWS Web Console, select your OpenVPN Access Server instance, then select "Actions", then select "Networking" then disable "Change Source/Destination Check"

  • Same problem here. Well that is an extra step that should be done, but even with disabling that option I can't connect to internet through my OpenVPN server. – Shnd Jul 3 '19 at 8:53

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.