saving changes

This commit is contained in:
Zsolt Alföldi
2025-08-11 10:53:10 +02:00
parent bf26c46b48
commit dec614f474

19
run.sh
View File

@@ -1,9 +1,22 @@
#!/bin/env bash #!/bin/env bash
# example run: # example run:
# sudonix run.sh 908029 # sudonixe ./run.sh 908029
expect run.exp $PEM_PASS $VPN_USER $VPN_USER_PASS $1 expect run.exp $PEM_PASS $VPN_USER $VPN_USER_PASS $1
sudo ip route add 10.0.0.0/8 dev vpn0 VPN=vpn0
EXISTING=$(nmcli -g ipv4.dns-search connection show "$VPN")
NEW="${EXISTING:+$EXISTING,}cci.nokia.net"
vpn_ip="$(ip a l $VPN | awk '/inet/ {print $2}' | cut -d/ -f1 | cut -d. -f1-3)"
if [[ -z $vpn_ip ]] ; then
echo 'Vpn not foudn'
exit 1
fi
sudo ip route add 10.0.0.0/8 dev $VPN metric 50
sudo ip route add 100.0.0.0/8 dev $VPN metric 50
# sudo nmcli connection modify Nokia ipv4.dns-search $NEW