commit - 3beef7fe82206e97fbcdab13646506000af37294
commit + 07c645bb1acfe39b04117fded76b8496c2ce8d3a
blob - /dev/null
blob + e9ac65032653d60a09237c7e2e103a9624855d7a (mode 644)
--- /dev/null
+++ reset-net-without-vpn
+#!/bin/sh
+
+if test "$(whoami)" != root; then
+ doas "$0" "$@"
+ exit $?
+fi
+
+printf "[+] Killing OpenVPN\n"
+pkill -9 -x openvpn >/dev/null
+pkill -9 -x openvpn >/dev/null
+pkill -9 -x openvpn >/dev/null
+printf "[+] Destroying tun*\n"
+ifconfig tun0 down >/dev/null
+ifconfig tun0 destroy >/dev/null
+printf "[+] Marking down axen0 & iwm0\n"
+ifconfig axen0 down >/dev/null
+ifconfig iwm0 down >/dev/null
+printf "[+] Marking down trunk0\n"
+ifconfig trunk0 destroy >/dev/null
+ifconfig trunk0 destroy >/dev/null
+printf "[+] Flushing routes\n"
+route -n flush >/dev/null
+printf "[+] Starting networking without VPN\n"
+sh /etc/netstart axen0 iwm0 trunk0