Server Installation 2021

A project to provide VPN access to the River System Raspberry Pis to allow WMT Volunteers and Staff to log in from home. Triggered by the COVID19 lockdown
Post Reply
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Server Installation

Post by TerryJC »

As discussed at viewtopic.php?p=5377#p5377, I purchased a Raspberry Pi 4 to replace the Raspberry Pi 0 currently in use and over the past couple of days I've installed PiStrong and swanStrong on it.

This morning I was able to successfully log in to the Server from my laptop with the Pi connected to my network. The laptop was connected to the Internet via a hotspot on my phone (so not directly through my internal network).

I now need to regenerate the CA Cert with the WMT's IP Address instead of my own and then I'll have to generate new Client Certs. I'm assuming the Hamish and Patrick will need new Certs, but I'm not sure about Penri. Did you use the VPN Server login Penri?

Once the final tasks are complete I'll take the new server to WMT for Penri to plug in. Assuming that works, I'll distribute the Client Certs.

Any comments?
Terry
hamishmb
Posts: 1891
Joined: 16/05/2017, 16:41

Re: Server Installation

Post by hamishmb »

Sounds good to me.

Shall I try to do some benchmarks before and after so we can determine if the speed issues are due to the Pi 1 being slow, or the internet connections?

Hamish
Hamish
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Server Installation

Post by TerryJC »

Not a bad idea.
Terry
Penri
Posts: 1284
Joined: 18/05/2017, 21:28

Re: Server Installation

Post by Penri »

Terry

I was set up to use the VPN but never have, so not need to implement for me at the moment.

Penri
hamishmb
Posts: 1891
Joined: 16/05/2017, 16:41

Re: Server Installation

Post by hamishmb »

Okay, will do benchmarks this evening and post results.
Hamish
hamishmb
Posts: 1891
Joined: 16/05/2017, 16:41

Re: Server Installation

Post by hamishmb »

NB: Did you also install my update script into /root and root's crontab? I think that was added into the installation spec but good time to add it if not.

"Before" benchmarks

Pinging Sump Pi:

Code: Select all

PING 192.168.0.2 (192.168.0.2) 56(84) bytes of data.
64 bytes from 192.168.0.2: icmp_seq=1 ttl=63 time=156 ms
64 bytes from 192.168.0.2: icmp_seq=2 ttl=63 time=78.3 ms
64 bytes from 192.168.0.2: icmp_seq=3 ttl=63 time=77.3 ms
64 bytes from 192.168.0.2: icmp_seq=4 ttl=63 time=76.6 ms
64 bytes from 192.168.0.2: icmp_seq=5 ttl=63 time=79.9 ms

--- 192.168.0.2 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4007ms
rtt min/avg/max/mdev = 76.647/93.572/155.797/31.131 ms
speedtest-cli from Sump Pi:

Code: Select all

Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Cerberus Networks Ltd (London) [278.81 km]: 26.54 ms
Testing download speed................................................................................
Download: 7.74 Mbit/s
Testing upload speed......................................................................................................
Upload: 8.66 Mbit/s
Not very impressive speeds!

Transferring a 50MiB zero-filled file from and to Sump Pi (/tmp to avoid SD card limitations):

From Sump Pi:

Code: Select all

zero.img                                      100%   50MB 493.3KB/s   01:43    
To Sump Pi:

Code: Select all

zero.img                                      100%   50MB 595.2KB/s   01:26    
Not very impressive either, and slower than the internet connection.

Note: My SSH connection to the VPN server Pi all but dropped out and locked up until this was done, but the load average was suddenly very high for the last few minutes, so I think we are indeed CPU bottlenecked on the Pi 1.
Hamish
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Server Installation

Post by TerryJC »

hamishmb wrote: 29/11/2021, 17:32NB: Did you also install my update script into /root and root's crontab? I think that was added into the installation spec but good time to add it if not.
I wasn't involved in that and I don't believe I've seen it in the Installation Spec for either the Servers or the River System.

Can you point me at the code?
hamishmb wrote: 29/11/2021, 17:32"Before" benchmarks[/b
Not very impressive speeds!

Transferring a 50MiB zero-filled file from and to Sump Pi (/tmp to avoid SD card limitations):

From Sump Pi:

Code: Select all

zero.img                                      100%   50MB 493.3KB/s   01:43    
To Sump Pi:

Code: Select all

zero.img                                      100%   50MB 595.2KB/s   01:26    
Not very impressive either, and slower than the internet connection.

Note: My SSH connection to the VPN server Pi all but dropped out and locked up until this was done, but the load average was suddenly very high for the last few minutes, so I think we are indeed CPU bottlenecked on the Pi 1.
I don't think the new server Pi could be any worse!
Terry
hamishmb
Posts: 1891
Joined: 16/05/2017, 16:41

Re: Server Installation

Post by hamishmb »

Agreed.

Code is here: https://gitlab.com/hamishmb/raspberry-pi-updater-script

Would recommend you put in /root, make executable with

Code: Select all

chmod +x
, and put the following in root's crontab (sudo crontab -e):

Code: Select all

30 05   *   *  1,3,6   /root/update.sh
That should run it at a time where it won't interfere with anything else using the internet connection.
Hamish
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Server Installation

Post by TerryJC »

Hamish,

OK. Will do.
Terry
hamishmb
Posts: 1891
Joined: 16/05/2017, 16:41

Re: Server Installation

Post by hamishmb »

Note: I did this for the webserver as well.

Shall I add this to the installation spec or do you want to?
Hamish
Post Reply