theoriginal1981
Posts: 4
Joined: Sat Aug 15, 2015 9:16 pm

VPN Help, stressed!!!

Sat Aug 15, 2015 9:24 pm

Hi people first post here, and it is a stressful one.

I bought a Raspberry Pi for the sole purpose of trying to get a VPN to work. My god, I didn't realise it would be so hard. I've been at it for hours now, and I am near about to give up. I have followed a guide on Readwrite.com and also looked at a recent one on the BBC. I think i was sucked into that one, due to the presenter Kate Russell. Moving on, the problem is it just doesn't work. When I reboot the pi, I get two fails. One on the starting virtual private network daemon: server. The second on startpar: service(s) returned failure: openvpn.

I'm with BT I don't have a static ip, but each time I've restarted the pi the ip address has been the same. Any clues as to what i am doing wrong, or any tips. The pi is the latest version. I'm hoping someone out there is a little more switched onto this than me. I've checked all the code so many times...

Many thanks

James. :o

theoriginal1981
Posts: 4
Joined: Sat Aug 15, 2015 9:16 pm

Re: VPN Help, stressed!!!

Sun Aug 16, 2015 8:10 am

Now i have slept I thought probably a bit more helpful if I uploaded the server.conf for people to see.

local 192.168.1.92 # (This is my ip of the pi, which i changed it to)
dev tun
proto udp #Some people prefer to use tcp. Don't change it if you don't know.
port 1194
ca /etc/openvpn/easy-rsa/keys/ca.crt
cert /etc/openvpn/easy-rsa/keys/matrix.crt # I put the server name in both of these.
key /etc/openvpn/easy-rsa/keys/matrix.key # SWAP WITH YOUR KEY NAME
dh /etc/openvpn/easy-rsa/keys/dh1024.pem # If you changed 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.1.92 255.255.255.0" # changed this to the pi ip address also
# 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 # Bit confused here!!
push "dhcp-option DNS 192.168.2.1" # This should already match your router address and not need$
# 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 1

User avatar
DougieLawson
Posts: 39300
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: VPN Help, stressed!!!

Sun Aug 16, 2015 9:49 am

Trim your config file down to something simpler.

Code: Select all

port 1194
dev tun
ca ca.crt
cert example.server.crt
key example.server.key  # This file should be kept secret
dh example.dh1024.pem
server 10.8.0.0 255.255.255.0
keepalive 10 120
comp-lzo
user openvpn
group openvpn
persist-key
persist-tun
status openvpn-status.log
verb 3
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

theoriginal1981
Posts: 4
Joined: Sat Aug 15, 2015 9:16 pm

Re: VPN Help, stressed!!!

Sun Aug 16, 2015 8:03 pm

Thanks for the reply, ill try again tomorrow after work, with the more efficient code let you know.

James.

Return to “Troubleshooting”