annotate content/Linux/compiling-shrewsoft-vpn-on-pi.md @ 112:cf31bf5fce72 default tip

Author of the blog post as mail header for efficient spam filtering
author Dirk Olmes <dirk.olmes@codedo.de>
date Tue, 06 Sep 2022 07:04:11 +0200
parents 1d9382b0329b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
19
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
1 Title: Compiling the Shrew Soft VPN client on Raspberry Pi
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
2 Date: 2013-11-04
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
3 Lang: en
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
4
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
5 At work we deploy our software on machines that are located at customers sites. To access these machines we have created a VPN infrastructure that allows us to access the machines, deploy updates etc.
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
6
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
7 I use [Shrewsoft's VPN client](https://www.shrew.net/software) to connect to the VPN infrastructure. This works so well on Linux that we recently began to replace the commercial VPN client used on Mac OS X with the Shrew Soft client - but that's a different story.
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
8
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
9 Part of our infrastructure is a [Zabbix](https://www.zabbix.org/wiki/Main_Page) installation which is used to monitor our software via JMX. Zabbix features nice [screens](https://www.zabbix.com/documentation/2.0/manual/config/visualisation/screens) that can be used to create a dashboard-style overview over the current state of all hosts.
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
10
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
11 To give everyone in the office more visibility on how our software is doing I'd like to display custom Zabbix screens on a big display located in the office. A [Raspberry Pi](http://www.raspberrypi.org/) looks like the perfect machine for powering the display - it's cheap, doesn't use much power and should even have a chrome browser to run in kiosk mode.
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
12
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
13 Sounds like an interesting pet project so I ordered a Pi and some equipment. When it finally arrived I flashed the standard [NOOBS](http://downloads.raspberrypi.org/NOOBS_latest) starter pack. The main hurdle will be getting the Shrew Soft VPN client to run, I don't want to fiddle with the Linux distro right now. That'll be a hobby project for another day.
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
14
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
15 Before attempting to compile the source all prerequisites must be installed:
98
1d9382b0329b Specify the syntax on markdown blocks to avoid broken output that has class=err
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 19
diff changeset
16
1d9382b0329b Specify the syntax on markdown blocks to avoid broken output that has class=err
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 19
diff changeset
17 :::shell
19
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
18 apt-get install cmake
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
19 apt-get install flex
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
20 apt-get install bison
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
21 apt-get install libedit-dev
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
22 apt-get install libssl-dev
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
23
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
24 I did not install Qt and friends - the basic command line client will be sufficient for my setup. Connecting to the VPN will be fully automated anyway.
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
25
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
26 The next step is to download the sources, unpack the tarball and compile the source. This turned out to be quite smooth using
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
27
98
1d9382b0329b Specify the syntax on markdown blocks to avoid broken output that has class=err
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 19
diff changeset
28 :::shell
19
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
29 cmake -DCMAKE_INSTALL_PREFIX=/usr -DETCDIR=/etc -DNATT=YES
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
30
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
31 followed by the typical
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
32
98
1d9382b0329b Specify the syntax on markdown blocks to avoid broken output that has class=err
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 19
diff changeset
33 :::shell
19
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
34 make
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
35 make install
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
36
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
37 sequence.
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
38
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
39 Now that the VPN client is installed, I exported the VPN settings from my Linux desktop machine and tried to run the command line client
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
40
98
1d9382b0329b Specify the syntax on markdown blocks to avoid broken output that has class=err
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 19
diff changeset
41 :::shell
1d9382b0329b Specify the syntax on markdown blocks to avoid broken output that has class=err
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 19
diff changeset
42 ikec -r vpn
19
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
43
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
44 I should have been warned by the smooth compile. Of course the VPN client does not work out of the box, it crashes with
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
45
98
1d9382b0329b Specify the syntax on markdown blocks to avoid broken output that has class=err
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 19
diff changeset
46 :::shell
19
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
47 *** glibc detected *** ikec: double free or corruption (out): 0x0191fa70 ***
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
48 Aborted
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
49
0d4d403418d0 add blog post
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
50 Seems like I have to start digging the code. But that's another story for another day. Stay tuned.