OpenVPN connection fails from RHEL 7.3 client on EC2

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
amphibient
OpenVpn Newbie
Posts: 2
Joined: Wed Feb 08, 2017 9:09 pm

OpenVPN connection fails from RHEL 7.3 client on EC2

Post by amphibient » Wed Feb 08, 2017 9:11 pm

I have a working OpenVPN configuration on Windows 7. I am able to connect to it via the GUI as well as from the command line (openvpn --config .\openvpn.ovpn).

I copied all my config files over to an EC2 instance of RHEL 7.3 and installed openvpn. However, when I try to run sudo openvpn --config ./openvpn.ovpn), the trace ends up showing

Code: Select all

Wed Feb  8 14:52:27 2017 Restart pause, 5 second(s)
Wed Feb  8 14:52:32 2017 WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
Wed Feb  8 14:52:32 2017 Socket Buffers: R=[87380->87380] S=[16384->16384]
Wed Feb  8 14:52:32 2017 Attempting to establish TCP connection with [AF_INET]<OPENVPN_IP>:443 [nonblock]
Wed Feb  8 14:52:42 2017 TCP: connect to [AF_INET]<OPENVPN_IP>:443 failed, will try again in 5 seconds: Connection timed out
Wed Feb  8 14:52:57 2017 TCP: connect to [AF_INET]<OPENVPN_IP>:443 failed, will try again in 5 seconds: Connection timed out
Wed Feb  8 14:53:13 2017 TCP: connect to [AF_INET]<OPENVPN_IP>:443 failed, will try again in 5 seconds: Connection timed out
Wed Feb  8 14:53:28 2017 TCP: connect to [AF_INET]<OPENVPN_IP>:443 failed, will try again in 5 seconds: Connection timed out
Wed Feb  8 14:53:43 2017 TCP: connect to [AF_INET]<OPENVPN_IP>:443 failed, will try again in 5 seconds: Connection timed out
Wed Feb  8 14:53:58 2017 TCP: connect to [AF_INET]<OPENVPN_IP>:443 failed, will try again in 5 seconds: Connection timed out
Please note that the EC2 instance is just an openvpn client, not a server. I am trying to establish a connection from it to a server, which is what the above log placeholder is the IP of.

Why does the same configuration fail on the cloud VM that succeeds locally on Windows 7 and what should I do to fix it?

This question has also been asked here: http://serverfault.com/questions/831431 ... ent-on-ec2.

TinCanTech
OpenVPN Protagonist
Posts: 11139
Joined: Fri Jun 03, 2016 1:17 pm

Re: OpenVPN connection fails from RHEL 7.3 client on EC2

Post by TinCanTech » Wed Feb 08, 2017 9:33 pm

How about you paste the config file :roll:

amphibient
OpenVpn Newbie
Posts: 2
Joined: Wed Feb 08, 2017 9:09 pm

Re: OpenVPN connection fails from RHEL 7.3 client on EC2

Post by amphibient » Wed Feb 08, 2017 9:43 pm

Here is the config file:

## acme.ovpn ##
client
proto tcp
dev tun
persist-key
persist-tun
ca ca.crt
cert mycert.crt
key mykey.key
remote <REMOTE_IP> 443
route <SOME_OTHER_IP> 255.255.255.0
resolv-retry infinite
status openvpn-status.log
verb 3

User avatar
ShelLuser
OpenVpn Newbie
Posts: 2
Joined: Wed Feb 08, 2017 8:10 am

Re: OpenVPN connection fails from RHEL 7.3 client on EC2

Post by ShelLuser » Thu Feb 09, 2017 6:35 am

When you say you're able to connect to it, what do you mean? Do you connect locally or remotely?

Post Reply