mirror of
https://gitea.blesmrt.net/mikaela/scripts.git
synced 2025-08-19 12:57:21 +02:00
Compare commits
No commits in common. "846033e922bf9127c5ff997282d2270a78f1c4d9" and "cf7e9c9e42f945d69a6a6b2688aef12885689113" have entirely different histories.
846033e922
...
cf7e9c9e42
@ -1,45 +1,18 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
# In my experience killswitch causes issues for NordVPN to restore connection
|
|
||||||
# and anyway it's enabled by scripts that I actually want to be connected to
|
|
||||||
# VPN.
|
|
||||||
nordvpn set killswitch off
|
nordvpn set killswitch off
|
||||||
# The aforementioned script will restore it.
|
|
||||||
nordvpn set autoconnect off
|
nordvpn set autoconnect off
|
||||||
# Disconnects VPN
|
|
||||||
nordvpn disconnect
|
nordvpn disconnect
|
||||||
|
|
||||||
# Explicitly restores IPv6 since NordVPN disables it by setting this to 1.
|
|
||||||
sudo sysctl net.ipv6.conf.all.disable_ipv6=0
|
|
||||||
|
|
||||||
# My scripts autostart them, I don't want NordVPN to haunt logs.
|
|
||||||
sudo systemctl stop nordvpnd.socket
|
sudo systemctl stop nordvpnd.socket
|
||||||
sudo systemctl stop nordvpnd.service
|
sudo systemctl stop nordvpnd.service
|
||||||
|
|
||||||
# Restarting networking ensures IPv6 connectivity will return.
|
|
||||||
sudo systemctl restart iwd.service
|
sudo systemctl restart iwd.service
|
||||||
sudo systemctl restart systemd-networkd.service
|
sudo systemctl restart systemd-networkd.service
|
||||||
|
|
||||||
# A bit of sleeping before flushing DNS caches, so we are surely connected
|
|
||||||
# for the new attempts. They are flushed in case of having private ECS aimed
|
|
||||||
# at the VPN.
|
|
||||||
sleep 5
|
sleep 5
|
||||||
#sudo systemctl restart unbound.service
|
sudo systemctl restart unbound.service
|
||||||
sudo unbound-control reload
|
sudo systemctl restart systemd-resolved.service
|
||||||
#sudo systemctl restart systemd-resolved.service
|
sleep 5
|
||||||
sudo resolvectl flush-caches
|
|
||||||
#sleep 5
|
|
||||||
|
|
||||||
# Yggdrasil needs IPv6
|
|
||||||
sudo systemctl restart yggdrasil.service
|
sudo systemctl restart yggdrasil.service
|
||||||
|
|
||||||
# The NTP server will now have access to IPv6 sources, possibly local NTP
|
|
||||||
# servers as well.
|
|
||||||
sudo chronyc online
|
sudo chronyc online
|
||||||
|
|
||||||
# Tor will complain of IP address change and failing guards during
|
|
||||||
# disconnection.
|
|
||||||
sudo systemctl restart tor.service
|
sudo systemctl restart tor.service
|
||||||
|
|
||||||
set +x
|
set +x
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 0cb5b0992bbb6cdd3919ab412a8fc3c6327bae8e
|
Subproject commit dff016aa4513cb42ca9c288ae4fe153cfcda07e6
|
Loading…
x
Reference in New Issue
Block a user