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
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Server Installation 2021

Post by TerryJC »

Hamish,

Are you doing this from the VPN server? I fell foul of that. The server seems to block connections from itself to other devices. I was able to log in and ping from my PC.
Terry
hamishmb
Posts: 1891
Joined: 16/05/2017, 16:41

Re: Server Installation 2021

Post by hamishmb »

Terry,

I tried both from the VPN server and from my PC - neither worked, just double checked.
Hamish
hamishmb
Posts: 1891
Joined: 16/05/2017, 16:41

Re: Server Installation 2021

Post by hamishmb »

For some reason I also get this error on my laptop when running sudo pistrong client stop:

Code: Select all

sudo: unable to resolve host hamish-IdeapadZ580: Name or service not known
Traceback (most recent call last):
  File "/usr/local/bin/pistrong", line 1296, in <module>
    gethostfqdn(pd, args)
  File "/usr/local/bin/pistrong", line 364, in gethostfqdn
    pd.vpnip = socket.gethostbyname(pd.hostfqdn)
socket.gaierror: [Errno -2] Name or service not known
And it won't disconnect from the VPN server.
Hamish
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Server Installation 2021

Post by TerryJC »

hamishmb wrote: 25/02/2022, 18:49I tried both from the VPN server and from my PC - neither worked, just double checked.
Hmm. That sounds like a problem on site.
Terry
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Server Installation 2021

Post by TerryJC »

hamishmb wrote: 25/02/2022, 18:52 For some reason I also get this error on my laptop when running sudo pistrong client stop:

Code: Select all

sudo: unable to resolve host hamish-IdeapadZ580: Name or service not known
That line usually occurs when the hostname being used for the login session is not written to all the places it should be; I've seen it on Pis.

Code: Select all

Traceback (most recent call last):
  File "/usr/local/bin/pistrong", line 1296, in <module>
    gethostfqdn(pd, args)
  File "/usr/local/bin/pistrong", line 364, in gethostfqdn
    pd.vpnip = socket.gethostbyname(pd.hostfqdn)
socket.gaierror: [Errno -2] Name or service not known
And it won't disconnect from the VPN server.
I presume that if the hostname isn't recognised properly, then gethostbyname will fail.
Terry
hamishmb
Posts: 1891
Joined: 16/05/2017, 16:41

Re: Server Installation 2021

Post by hamishmb »

Yeah it's very strange because that doesn't happen until I run pistrong client start, and then there's lots of junk in my resolv.conf, but only on the laptop.

Fixing the resolv.conf doesn't help either.

Where was it you were getting support? I might ask there.
Hamish
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Server Installation 2021

Post by TerryJC »

Hamish,

I can't quite remember where I saw it, but the problem seems to arise (on the Pi) when the hostname is changed in the file /etc/hostname and not in the file /etc/hosts.
Terry
hamishmb
Posts: 1891
Joined: 16/05/2017, 16:41

Re: Server Installation 2021

Post by hamishmb »

Ah, that was it, thanks.

I guess something about pistrong/strongswan changing network settings causes the issue to arise. Seems to have happened since I migrated this Linux installation to a new system.
Hamish
Post Reply