Raspberry Pi - unable to start connection to openvpn server

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
roshan_is_mad
OpenVpn Newbie
Posts: 1
Joined: Sat Jan 16, 2016 7:42 pm

Raspberry Pi - unable to start connection to openvpn server

Post by roshan_is_mad » Sat Jan 16, 2016 8:07 pm

Please help,

I have not been able to establish a vpn connection from my devices to my vpn server (raspberry pi - raspbian, jessie)

I get the following message during bootup

Code: Select all

[FAILED] Failed to start OpenVPN connection to server.
See ' systemctl status openvpn@server.service' for details.
How do I check 'systemctl status openvpn@server.service', or otherwise debug this issue?

I think that the problem is in my openvpn/server.conf file but am not sure. Is there anything incorrect with the code below?

Thanks for your help!

Code: Select all

local 192.168.0.123 # SWAP THIS NUMBER WITH YOUR RASPBERRY PI IP ADDRESS
dev tun
proto udp
port 1194



ca /etc/openvpn/easy-rsa/keys/ca.crt
cert /etc/openvpn/easy-rsa/keys/rsppi.crt # SWAP XX WITH YOUR SERVER NAME
key /etc/openvpn/easy-rsa/keys/rsppi.key # SWAP XX WITH YOUR SERVER NAME
dh /etc/openvpn/easy-rsa/keys/dh2048.pem # IF YOU CHANGED YOUR ENCRYPTION TO 2048, CHANGE THAT HERE


server 10.8.0.0 255.255.255.0
# server and remote endpoints
ifconfig 10.8.0.1 10.8.0.2
# Add route to Client routing table for the OpenVPN Server
push "route 10.8.0.1 255.255.255.255"
# Add route to Client routing table for the OpenVPN Subnet
push "route 10.8.0.0 255.255.255.0"
# your local subnet

push "route 192.168.0.101 255.255.255.0" # SWAP THE IP NUMBER WITH YOUR RASPBERRY PI IP ADDRESS

# Set primary domain name server address to the SOHO Router

# If your router does not do DNS, you can use Google DNS 8.8.8.8
push "dhcp-option DNS 192.168.0.1" # THIS SHOULD ALREADY MATCH YOUR OWN ROUTER ADDRESS AND SHOULD NOT NEED TO BE CHANGED

# Override the Client default gateway by using 0.0.0.0/1 and
# 128.0.0.0/1 rather than 0.0.0.0/0. This has the benefit of
# overriding but not wiping out the original default gateway.

push "redirect-gateway def1"
client-to-client
duplicate-cn
keepalive 10 120
tls-auth /etc/openvpn/easy-rsa/keys/ta.key 0
cipher AES-128-CBC
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
status /var/log/openvpn-status.log 20
log /var/log/openvpn.log
verb 3

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: Raspberry Pi - unable to start connection to openvpn ser

Post by Traffic » Sat Jan 16, 2016 9:41 pm

Start openvpn like so:

Code: Select all

$ sudo openvpn --config /path/to/server.conf

Post Reply