mapexmbirch
Posts: 9
Joined: Sun Aug 12, 2012 5:29 pm

Has anyone set up a VPN client on their Raspberry Pi?

Mon Sep 10, 2012 5:36 pm

Not a server, a client. So my Raspberry Pi can connect to a BTguard server and torrent discreetly.

I have been trying for about a week, and I haven't found anything that works. I tried http://www.cyberciti.biz/tips/howto-con ... lient.html and found the kernel is not compatible.
I have tried gnome network manager and adding a VPN through that but it just said "never connected" and didn't tell me why.
Now I have installed network manager with a different command and it won't let me click on Add VPN. I says there is no VPN plugin.

Can anyone help?
Thanks

Bladerunner1973
Posts: 2
Joined: Sun Sep 09, 2012 7:30 pm

Re: Has anyone set up a VPN client on their Raspberry Pi?

Mon Sep 10, 2012 6:08 pm

Yes I have, I connect to a UK based VPN server, just have not got the routing figured out yet, follow this guide http://pptpclient.sourceforge.net/howto-debian.phtml

Benja
Posts: 20
Joined: Wed Sep 21, 2011 1:28 pm
Location: Denmark

Re: Has anyone set up a VPN client on their Raspberry Pi?

Mon Sep 10, 2012 6:16 pm

Which OS are you using? Not all of them have the necessary kernel modules unless you build it yourself. I know recent Raspbian builds do, not sure about any others.

mapexmbirch
Posts: 9
Joined: Sun Aug 12, 2012 5:29 pm

Re: Has anyone set up a VPN client on their Raspberry Pi?

Mon Sep 10, 2012 6:40 pm

Thanks for the quick replies, I will have a go at that PPTP client tonight.

I am using Debian.

mapexmbirch
Posts: 9
Joined: Sun Aug 12, 2012 5:29 pm

Re: Has anyone set up a VPN client on their Raspberry Pi?

Mon Sep 10, 2012 8:37 pm

No luck.
What did you enter for the authentication domain ($DOMAIN)?

I get this from the debug

Code: Select all

root@raspberrypi:/home/pi# pon BTGuard debug dump logfd 2 nodetach
pppd options in effect:
debug           # (from command line)
nodetach                # (from command line)
logfd 2         # (from command line)
dump            # (from command line)
noauth          # (from /etc/ppp/options.pptp)
name mapexmbirch                # (from /etc/ppp/peers/BTGuard)
remotename PPTP         # (from /etc/ppp/peers/BTGuard)
                # (from /etc/ppp/options.pptp)
pty pptp vpn.btguard.com --nolaunchpppd         # (from /etc/ppp/peers/BTGuard)
crtscts         # (from /etc/ppp/options)
                # (from /etc/ppp/options)
asyncmap 0              # (from /etc/ppp/options)
lcp-echo-failure 4              # (from /etc/ppp/options)
lcp-echo-interval 30            # (from /etc/ppp/options)
hide-password           # (from /etc/ppp/options)
ipparam BTGuard         # (from /etc/ppp/peers/BTGuard)
nobsdcomp               # (from /etc/ppp/options.pptp)
nodeflate               # (from /etc/ppp/options.pptp)
require-mppe-128                # (from /etc/ppp/peers/BTGuard)
noipx           # (from /etc/ppp/options)
using channel 2
Using interface ppp1
Connect: ppp1 <--> /dev/pts/2
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x90862c63> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x90862c63> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x90862c63> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x90862c63> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x90862c63> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x90862c63> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x90862c63> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x90862c63> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x90862c63> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x90862c63> <pcomp> <accomp>]
Script pptp vpn.btguard.com --nolaunchpppd finished (pid 2474), status = 0x0
Modem hangup
Connection terminated.

gamarga
Posts: 4
Joined: Sun Feb 23, 2014 1:47 am

Re: Has anyone set up a VPN client on their Raspberry Pi?

Wed Mar 26, 2014 9:38 am

Hi,

I am wondering about this too. I read the guide on http://pptpclient.sourceforge.net/howto-debian.phtml but am not sure what I would put for $DOMAIN. Would I need to set one up of can I proceed without stipulating it?

mapexmbirch
Posts: 9
Joined: Sun Aug 12, 2012 5:29 pm

Re: Has anyone set up a VPN client on their Raspberry Pi?

Wed Mar 26, 2014 9:53 am

I didn't get a VPN running in the end, I used a netbook and used the Pi to SSH into the netbook whilst it was connected to the VPN. I think I read some where that the version of Debian running on the Pi doesn't support VPN's. I think it could be to do with the Kernel not supporting AES encryption. I could be totally wrong and please correct me if I am. And they may have fixed that it was more than two years ago when I last tried.

lg21
Posts: 2
Joined: Tue Apr 01, 2014 12:24 am

Re: Has anyone set up a VPN client on their Raspberry Pi?

Tue Apr 01, 2014 12:32 am

Hello,

OpenVPN works as fine as on any other laptop (tested on Windows, Debian, Ubuntu, Mac OS X), with the following configuration:

VPN server:

Code: Select all

dev tap
port 443
proto tcp
group openvpn
ca ca.crt
cert server.crt
key server.key
dh /etc/openvpn/dh1024.pem
server 10.3.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
client-config-dir /etc/openvpn/ccd
keepalive 10 120
comp-lzo
persist-key
persist-tun
verb 3
client-to-client
tun-mtu 1500
mssfix 1400
log-append /var/log/openvpn/openvpn.log
status /var/log/openvpn/openvpn-status.log
VPN client:

Code: Select all

client
dev tap
remote SERVER-HOST 443
proto tcp
ca ca.crt
cert laptop.crt
key laptop.key
resolv-retry infinite
nobind
persist-key
persist-tun
mute-replay-warnings
ns-cert-type server
comp-lzo
verb 3
log-append /var/log/openvpn/openvpn.log
status /var/log/openvpn/status.log
regards,
lg

snowman4839
Posts: 26
Joined: Sat Mar 08, 2014 10:51 pm

Re: Has anyone set up a VPN client on their Raspberry Pi?

Thu Apr 03, 2014 10:37 pm

Openvpn works fine for me. I just use the .ovpn file my vpn provider gives me and run "openvpn --config config.ovpn daemon &" and it boots right up. Had to open up ports through the vpn service and make ssh and http run on 1000+ ports though but it works great.

a23
Posts: 3
Joined: Sun Apr 27, 2014 4:24 pm

Re: Has anyone set up a VPN client on their Raspberry Pi?

Sun Apr 27, 2014 4:47 pm

I run my pi headless and only connect to it via ssh when needed. I've successfully connected to my vpn service from my pi by manually running the appropriate 'openvpn' command from the shell. However, I don't want to have to do that all the time so is there a way that I can make the openvpn client run as a daemon so that it always connects automatically and stays permanently connected??

Thanks in advance

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

Re: Has anyone set up a VPN client on their Raspberry Pi?

Sun Apr 27, 2014 8:10 pm

You could
1. add a line to your crontab
@reboot /usr/bin/openvpn --funky_parms_to_run_it here

2. add a line to /etc/rc.local
/usr/bin/openvpn --funky_parms_to_run_it_here & # the & is needed to run in the background

3. create an /etc/init.d/script to start it as the system starts (that's the usual way to start OpenVPN when it runs as a server) you may be able to hack the script from your OpenVPN server to simply run a new set of funky parms.
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.

Thiruu
Posts: 1
Joined: Wed Sep 20, 2017 4:37 am

Re: Has anyone set up a VPN client on their Raspberry Pi?

Wed Sep 20, 2017 4:44 am

Dear All,

Has anyone used Cisco Anyconnect ( OpenConnect) client installed in Raspberry Pi 3 and successfully connect to VPN server?
I have successfully installed Openconnect NetworkManager Applet v1.4.4 and upon giving VPN Connection details and when I try to login with valid credentials , I am getting below error message.

Response was invalid [1]: (ISAKMP_N_INVALID_EXCHANGE_TYPE)

Any suggestions would be greatly appreciated.

P.S : Basically I want to connect my Raspberry Pi ( whcih has VPN client installed ) to an VPN Server.

Return to “Networking and servers”