I just stumbled across the same problem on my Ubuntu 23.04. I tried removing cyberghost completely, then reinstalling version for 22.04, problem still persist. Here is the explanation and the workaround. There is a problem with cyberghost application. I reported this, but until they fix, you can try this workaround. It worked for me. Logs should be located in ~/.cyberghost/logs/ but they are empty. Useful logs can be found in /var/logs/auth.log
. You will find something like this:
USER=root ; COMMAND=/usr/sbin/openvpn --dev tun --auth-
user-pass /home/jokke/.cyberghost/openvpn/auth --client --proto udp --resolv-retry infinite --persist-key
--persist-tun --nobind --cipher AES-256-CBC --ncp-disable etc.....
After running this openvpn command manually, the error reported is: option --ncp-disable is unknown.
So, this option is culprit. You can use the openvpn command to establish connection every time. Let's make more general WA solution with all servers that you might use. This will make life a bit easier.
My WA is to create a script to connect with direct use of openvpn command.
You need to get your favorite server list first by running your cyberghost command you mentioned in your question with every server you might use. Then, read the /var/log.auth.log
and copy server name from the log (will be something like this): paris-s404-i11.cg-dialup.net
(complete name).
Repeat this for every server you need and make a script that you call with options: -p
for Paris, -o
for Other city, etc. here with real examples with London, Belgrade, Zagreb and Oslo.
Of course, if you know server names, then just add them below in the script. Just append .cg-dialup.net
to the server name.
Create script vpn.sh with nano, vi, or any editor (please replace text <your_home_dir>
with your username):
#!/bin/bash
# set default server when no option is set
SERVER="paris-s404-i11.cg-dialup.net"
while getopts ":hepscn" opt; do
case "$opt" in
p)SERVER="paris-s404-i11.cg-dialup.net";;
e)SERVER="london-s440-i03.cg-dialup.net";;
s)SERVER="belgrade-s403-i09.cg-dialup.net";;
n)SERVER="oslo-s409-i11.cg-dialup.net";;
c)SERVER="zagreb-s403-i10.cg-dialup.net";;
h)echo "usage: $0 [-h] [-p] [-s] [-e] [-n] [-c] ### -p Paris ### -s Serbia ### -c Croatia ### -e England ### -n Norway "; exit
esac
done
openvpn --dev tun --auth-user-pass /home/<your_home_dir>/.cyberghost/openvpn/auth --client --proto udp --resolv-retry infinite --persist-key --persist-tun --nobind --cipher AES-256-CBC --auth SHA256 --ping 15 --ping-restart 60 --explicit-exit-notify 2 --script-security 2 --remote-cert-tls server --verb 4 --route-delay 5 20 --mute-replay-warnings --remote $SERVER 443 --log /var/log/cyberghost.log --daemon --dhcp-option DOMAIN-ROUTE . --up /usr/local/cyberghost/update-systemd-resolved --up-restart --down /usr/local/cyberghost/update-systemd-resolved --down-pre --ca /usr/local/cyberghost/certs/openvpn/ca.crt --cert /usr/local/cyberghost/certs/openvpn/client.crt --key /usr/local/cyberghost/certs/openvpn/client.key
Save as vpn.sh, and run with:
./vpn.sh -p
and it will connect to your Paris server. In the same fashion
./vpn.sh -e
will connect to the London server.
Disconnecting can be done with cyberghostvpn --stop
as before.
Feel free to modify openvpn command with options you get from log when you run all the options you need, like Netflix, etc. Just remember to remove option --ncp-disable
!