0

i have openvpn installed on my pi and want to run it as a client on my VPN server.

i created the Pi.crt, Pi.key and Pi.opvn file and put them in /etc/openvpn/

i renamed the Pi.opvn to client.conf and try to run it by openvpn /etc/openvpn/client.conf

it picks up the conf file and attempts to run it but i get

warning no server certificate verification method has been enabled

The same setup works phone on my laptop and android phone so I don't know why it gets that warning message?

i also get

cant load certificate file Pi.crt

Yet its in the same folder as the conf file? what have i done wrong? I don't have access to the Pi atm so can't troubleshoot any more than this at the current time, does anyone have any pointers on where to start looking?

Client.conf looks like this

client 
dev tun 
proto tcp 
remote ***myipaddress** 1194 
nobind 
persist-key 
persist-tun 
verb 4 
float 
ca ca.crt 
cert Pi.crt 
key Pi.key 
comp-lzo yes 
tun-mtu 1500 
auth SHA256 
cipher AES-128-CBC
  • Have you tried running the command as root or using sudo? You'll probably need to be root to run the openvpn client anyway. Check permissions on client.conf and Pi.crt – Charemer Oct 15 '18 at 11:36
  • I found this script on github for my Raspberry Pi. Secure OpenVPN server installer for Debian, Ubuntu, CentOS and Arch Linux github.com/Angristan/OpenVPN-install Make sure you put these lines into your client configuration (client.conf or xxxx.ovpnfile) dhcp-option DNS 1.1.1.1 dhcp-option DNS 1.0.0.1 – Ron K. Oct 15 '18 at 18:11
  • @Charemer i tried as root without sudo and still done the same thing. – B- Man Oct 16 '18 at 8:29
  • @RonK. cheers i will check that out when i have access to it next. it does look like it creates a server on the pi tho i have a server on my router at home. just looking to connect to it as a client – B- Man Oct 16 '18 at 8:30
  • 1
    Looks like you missing the tls-client directive. – Charemer Oct 16 '18 at 12:21
0

had to add the directory of the ca, key ,crt

ca /etc/openvpn/ca.crt  
cert /etc/openvpn/Pi.crt  
key /etc/openvpn/Pi.key

still have a few warnings to fix

and routing to sort but connection is made

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.