Thursday, February 15, 2018

OpenVPN on EC2 instance using router's OpenVPN setup (TP Link Archer C1200)

I'm trying to set up my a VPN using my router as my server. It's super simple to set up (windows setup) and access from a windows machine, but I am having issues getting it to work with a linux/ubuntu EC2 instance on AWS.

After going through getting OpeVPN downloaded and getting my config file on the machine

sudo yum install openvpn aws s3 cp s3://blah/OpenVPN-Config.ovpn ~/ 

i get the following logs:

$ sudo openvpn OpenVPN-Config_new.ovpn & [1] 4767 Wed Feb 14 03:36:25 2018 OpenVPN 2.4.4 x86_64-redhat-linux-gnu [Fedora EPEL patched] [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Nov 1 2017 Wed Feb 14 03:36:25 2018 library versions: OpenSSL 1.0.2k-fips 26 Jan 2017, LZO 2.08 Wed Feb 14 03:36:25 2018 WARNING: No server certificate verification method has been enabled. See http://openvpn.net/howto.html#mitm for more info. Wed Feb 14 03:36:25 2018 TCP/UDP: Preserving recently used remote address: [AF_INET]my_home_ip_address:open_port Wed Feb 14 03:36:25 2018 UDP link local: (not bound) Wed Feb 14 03:36:25 2018 UDP link remote: [AF_INET]my_home_ip_address:open_port Wed Feb 14 03:36:26 2018 [server] Peer Connection Initiated with [AF_INET]my_home_ip_address:open_port Wed Feb 14 03:36:27 2018 TUN/TAP device tun0 opened Wed Feb 14 03:36:27 2018 do_ifconfig, tt->did_ifconfig_ipv6_setup=0 Wed Feb 14 03:36:27 2018 /sbin/ip link set dev tun0 up mtu 1500 Wed Feb 14 03:36:27 2018 /sbin/ip addr add dev tun0 local 10.8.0.6 peer 10.8.0.5 RTNETLINK answers: File exists Wed Feb 14 03:36:27 2018 ERROR: Linux route add command failed: external program exited with error status: 2 RTNETLINK answers: File exists Wed Feb 14 03:36:27 2018 ERROR: Linux route add command failed: external program exited with error status: 2 Wed Feb 14 03:36:27 2018 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this Wed Feb 14 03:36:27 2018 Initialization Sequence Completed 

from what i can see and what i was able to google (example), i need to modify the server's config file. Since this is configured by my router and i don't have access to these files, i'm not sure what i can do.

Looking through tp-link's FAQ also doesn't open up much help because they don't show open source OS's on their setup (link to FAQ query). I'm not sure if this is because it can't work or if it's just not the typical user so they don't build out that support.

My requirements are:

1) I must route all traffic from my EC2 instance through my local IP

My questions are:

1) can i solve this by modifying my client.ovpn file?

2) are there routers that can set up a server as simple as the one on this router but work with Linux machines or should I instead build a server through a raspberry pi?



No comments:

Post a Comment