Wireguard not connecting anymore

hello :slight_smile:
maybe since a kernel update, wireguard VPN is not connecting anymore.
Has anyone else experiencing issues with wireguard?

thanks

No, it is still working fine for me. I’m using a config file generated from Mullvad’s site, so I am not sure if our situations’ are similar.

1 Like

@cipolla which provider? I use azire and they changed all of the names of the nodes, didn’t tell me, left me going around in circles…

2 Likes

thanks a lot, I had not thought about it :slight_smile:
I’m using azire too :smiley:
undervalued VPN in my opinion, not included in a lot of tests. and I prefer it over mullvad

You might like this:

#!/bin/bash
echo -e '\033[?47h' # alternate screen
clear

x=$(sudo wg | grep -i azire | tuc -d ' ' -f 2)

function normal_screen () {
   echo -e '\033[?47l' # normal screen
}

## Doesn't need to be too complicated!
if [[ $1 == "uk" ]]; then
    if [[ ${#x} > 0 ]]; then
	#killall running.bin
	#killall mytray.bin
	echo StringL ${#x}
	wg-quick down $x
	exit
   fi   
    wg-quick up azirevpn-gb-lon
    ~/scripts/wireguard/running.bin&
    normal_screen
   exit
fi

function disconnect(){
    trash-put ~/.flags/az.flag
    #killall mytray.bin &> /dev/null
    wg-quick down $x &> /dev/null
    ~/scripts/wireguard/mytray.bin &
    echo "Stopped Wireguard"
}

function connect() {
   touch ~/.flags/az.flag
   #killall mytray.bin &> /dev/null
   #wg-quick up $vpn2 &> /dev/null
   echo $(date) >> ~/wireguard.log
   ~/scripts/wireguard/mytray.bin &
   echo "Started Wireguard"    
}


if [[ ${x:0:5} = "azire" ]]; then
   gum confirm --selected.background="#0000ff" "Connected to $x, disconnect?"
   if [ $? -eq 0 ]; then
      disconnect 
   else
      echo "You are already connected to $x, exiting. re-run script & answer Yes"
      normal_screen 
      exit
   fi
fi


vpn=$(echo 'azirevpn-gb-lon (London, United Kingdom)
azirevpn-se-sto (Stockholm, Sweden)
azirevpn-nl-ams (Amsterdam, Netherlands)
azirevpn-se-got (Gothenburg, Sweden)
azirevpn-no-osl (Oslo, Norway)
azirevpn-us-lax (Los Angeles, United States)
azirevpn-us-dal (Dallas, United States)
azirevpn-us-sea (Seattle, United States)
azirevpn-dk-cph (Copenhagen, Denmark)
azirevpn-fr-par (Paris, France)
azirevpn-de-fra (Frankfurt, Germany)
azirevpn-ro-buh (Bucharest, Romania)
azirevpn-us-chi (Chicago, United States)
azirevpn-us-mia (Miami, United States)
azirevpn-ca-tor (Toronto, Canada)
azirevpn-es-mal (Málaga, Spain)
azirevpn-es-mad (Madrid, Spain)
azirevpn-th-hkt (Rawai, Thailand)
azirevpn-ch-zrh (ZĂĽrich, Switzerland)
azirevpn-de-ber (Berlin, Germany)
azirevpn-it-mil (Milan, Italy)
azirevpn-us-nyc (New York, United States)
azirevpn-fi-hel (Helsinki, Finland)
azirevpn-sg-sin (Singapore, Singapore)
azirevpn-hk-hkg (Hong Kong, Hong Kong)
Do not connect' | fzf --height 80% --reverse --color='bg+:#0000ff,fg+:#ff0000' --prompt="Select WG server: ")

if [[ $vpn = "Do not connect" ]];then
   echo "Exiting......."
   normal_screen 
   exit
fi

vpn2=$(echo $vpn | awk '{print $1}')
city=$(echo $vpn | awk -v OFS=' ' '{print $2, $3}')

x=$(sudo wg | grep -i azire)
y=$(echo $x | awk '{print $2}')

connect
echo "Connected to $x $city"

if [[ $? == 0 ]]; then
    ping -c 2 www.google.com
fi

normal_screen

It selects and launches wireguard - requires gum, tuc and fzf to all in repo or aur. Oh and two scripts for a tray icon (not neccessary).

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.