Jump to content

Cyberghost VPN broke my network (Pop_Os!)

EDIT: I figured it out

 

Hey everyone,

I recently encountered a frustrating situation with CyberGhost VPN on Pop_OS!, and I'm hoping someone here might have some insight or solutions. Here's what happened:

My brother and I wanted to play Metal Slug on Fightcade online, but we ran into issues when both trying to connect from the same network. After some research, I decided to install CyberGhost VPN on my Pop_OS! laptop to see if it would resolve the problem.

 

Surprisingly, it did the trick! We were able to play the game online without any issues. However, once we were done, I attempted to disconnect and uninstall CyberGhost. Here's where things went wrong:

 

I initially i was typing the wrong command to stop the VPN service. I had mistakenly typed

sudo cyberghostvpn stop

However the correct command was

sudo cyberghostvpn --stop

so i was getting an error. I didn't care to figure out the correct command because I thought "Whatever, I'll just restart the pc and the service should stop"

 

Well after restarting my laptop while still connected to vpn the service, I attempted to uninstall CyberGhost.Now, uninstalling the software required authentication with CyberGhost's servers, so it should be no problem. BUT, after the restart, my internet connection was completely shot. Firefox, Steam, Pop shop and even updates couldn't connect. Except Chromium for some reason. So i was unable to uninstall

 

I reached out to CyberGhost's support for assistance, but unfortunately, I only received copy paste bull poop. To verify if it was a me or their software, I was able to replicate the same scenario in a virtual machine, and I encountered the same connectivity issue.

 

I was able to uninstall using as super user, but the issue persists. I'd greatly appreciate any advice or troubleshooting tips you could offer.

Thanks in advance for your help!  I hope it makes sense 🙂

 

Here's the install script

Spoiler

#!/bin/bash

    # if user is not running the command as root
    if [ "$UID" -ne 0 ]; then

        # output message
        echo "Please run the installer with SUDO!"

        # stop script
        exit
    fi

    # check update
    apt update > /dev/null 2>&1

    # output message
    echo -e "\nCyberGhost Installer ...\n"

 

    # define required packages
    requiredPackages=(curl openvpn resolvconf wireguard)

    # loop through packages
    for package in "${requiredPackages[@]}"; do

        # set package
        p="$package"

        # if package is opwireguardenvpn
        if [ "$package" == "wireguard" ]; then

            if [ "$ubuntuDistroVersion" == "16.04" ]; then

                # check if wireguard ppa exist
                #responseCode=$(grep ^ /etc/apt/sources.list /etc/apt/sources.list.d/* | grep -c wireguard)
                responseCode=$(grep ^ /etc/apt/sources.list | grep -c wireguard)

                # if ppa does not exist
                if [ "$responseCode" == "0" ]; then

                    # install wireguard ppa
                    add-apt-repository -y ppa:wireguard/wireguard > /dev/null 2>&1
                    apt update > /dev/null 2>&1
                fi
            fi

            # change package name
            p="wg"
        fi

        # check if package is installed and get exit code
        responseCode=$(which "$p" > /dev/null 2>&1; echo "$?")

        # output message
        echo -n "Check if \"$package\" package is already installed ... "

        # if package is installed
        if [ "$responseCode" == "0" ]; then

            # output message
            echo "Yes"

            # if package is openvpn
            if [ "$package" == "openvpn" ]; then

                # get openvpn version
                openvpnVersion=$(openvpn --version | head -n 1 | awk '{print $2}')

                # get major version
                majorVersion=$(echo "$openvpnVersion" | awk -F. '{print $1}')

                # get minor version
                minorVersion=$(echo "$openvpnVersion" | awk -F. '{print $2}')

                # output message
                echo -n "Checking OpenVPN version ... "

                if [ $majorVersion -ge 2 ] && [ $minorVersion -gt 3 ]; then

                    # output message
                    echo "Latest ..."
                else

                    # output message
                    echo "The OpenVPN version is too old ... "
                    echo "Removing old package ... "

                    # uninstall package
                    apt remove "$package" -y > /dev/null 2>&1

                    # output message
                    echo -n "Installing new package ... "
                    curl -s https://swupdate.openvpn.net/repos/repo-public.gpg | apt-key add -
                    echo "deb http://build.openvpn.net/debian/openvpn/stable xenial main" > /etc/apt/sources.list.d/openvpn-aptrepo.list
                    apt update > /dev/null 2>&1
                    apt install "$package" -y > /dev/null 2>&1

                    # output message
                    echo "Done."
                fi
            fi
        else

            # output message
            echo -n "No, installing ... "

            if [ "$package" == "openvpn" ]; then

                # get openvpn version from apt
                openvpnVersion=$(apt show openvpn 2>/dev/null | grep "Version:" | awk '{ print $2 }')
                version=$(echo "$openvpnVersion" | awk -F'-' '{print $1}')
                
                # get major version
                majorVersion=$(echo "$version" | awk -F. '{print $1}')

                # get minor version
                minorVersion=$(echo "$version" | awk -F. '{print $2}')

                # if version is lower then 2.4
                if [ $majorVersion -ge 2 ] && [ $minorVersion -lt 4 ]; then
                    curl -s https://swupdate.openvpn.net/repos/repo-public.gpg | apt-key add -
                    echo "deb http://build.openvpn.net/debian/openvpn/stable xenial main" > /etc/apt/sources.list.d/openvpn-aptrepo.list
                    apt update > /dev/null 2>&1
                fi
            fi


            # install package
            apt install "$package" -y > /dev/null 2>&1

            # output message
            echo "Done."
        fi
    done

    # output message
    echo "Continue ..."

    # if directory exist
    if [ -d /usr/local/cyberghost ]; then

        # remove directory
        rm -rf /usr/local/cyberghost
    fi

    echo "Installing application ..."

    # if logs directory does not exist
    if [ ! -d /usr/local/cyberghost ]; then

        # create logs directory if not exist
        mkdir /usr/local/cyberghost
    fi

    # copy certificates to local directory
    cp -r cyberghost/* /usr/local/cyberghost

    # change directory permissions
    chmod -R 755 /usr/local/cyberghost

    # output message
    echo "Create symlinks ..."

    # if symlink exist
    if [ -L /usr/bin/cyberghostvpn ]; then

        # remove old symlink
        rm /usr/bin/cyberghostvpn
    fi

    # create symlink
    ln -sf /usr/local/cyberghost/cyberghostvpn /usr/bin/cyberghostvpn

    # setup application
    cyberghostvpn --setup

 

Here's the uninstall script

Spoiler

#!/bin/bash

    # if user is not running the command as root
    if [ "$UID" -ne 0 ]; then

        # output message
        echo "Please run the installer with SUDO!"

        # stop script
        exit
    fi

    # output message
    echo -e "Checking for installed packages ...\n"

    # define installed packages
    requiredPackages=(openvpn resolvconf wireguard)

    # loop through packages
    for package in "${requiredPackages[@]}"; do

        # set package
        p="$package"

        # if package is opwireguardenvpn
        if [ "$package" == "wireguard" ]; then

            # change package name
            p="wg"
        fi

        # check and get exit code if package is installed
        responseCode=$(which "$p" > /dev/null 2>&1 ; echo "$?")

        # output message
        echo -n "Check if package \"$package\" is installed ... "

        # if package is installed
        if [ "$responseCode" == "0" ]; then

            # output message
            echo "Yes ..."

            # remove configuration files
            echo -n "Do you want to uninstall the package \"$package\"? [Y/n]: "
            read option

            # if configuration files can be removed
            if [ "$option" == "Y" ] || [ "$option" == "y" ]; then

                # uninstall package
                apt remove --purge "$package" -y > /dev/null 2>&1

                # output message
                echo -e "The \"$package\" was unistalled ..."
            else

                # output message
                echo -e "Skipping uninstall ..."
            fi
        else

            # output message
            echo -e "No. Skipping ..."
        fi
    done

    # output message
    echo -e "\nContinue ...\n"

    # uninstall application
    cyberghostvpn --uninstall

 

 

 
 
Also im not very linux pproficient
Link to comment
Share on other sites

Link to post
Share on other sites

Can you show the output of the following command

systemctl status NetworkManager.service

if you see failed or anything like that try using this to start it

sudo systemctl restart NetworkManager.service

if it says disabkled run

sudo systemctl enable --now NetworkManager.service

If you get no errors then you should have working internet. Witch if you still can't access websites then it's likely your DNS configuration got messed up.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×