Open Brettk80 opened 4 months ago
run "ip route show" and see what position in the string the gateway address is for usb0. Probably need to change line 71 to :
tunnelInterfaceGW=$(ip r | grep 'default.*'${tunnelInterface} | awk '{print $9}') specifically for usb0.
You can also add a check like this:
tunnelInterfaceGW=""
# let's read out the default gateway from the main table
if [ "$tunnelInterface" = "qmimux0" ] || [ "$tunnelInterface" = "qmimux1" ] || [ "$tunnelInterface" = "ubs0" ] ;
then
tunnelInterfaceGW=$(ip r | grep 'default.*'${tunnelInterface} | awk '{print $9}')
else
tunnelInterfaceGW=$(ip r | grep 'default.*'${tunnelInterface} | awk '{print $3}')
fi
(For simcard interfaces such as qmimux0 / qmimux1 the gateway address is also at position 9 in the output string)
Unplug the internet connections from the connector and reconnect them. It worked for me.
brett@raspberrypi:/etc/openvpn $ sudo ./startbond.sh 2024-02-13 15:42:55 TUN/TAP device tap1 opened 2024-02-13 15:42:55 Persist state set to: ON 2024-02-13 15:42:55 TUN/TAP device tap2 opened 2024-02-13 15:42:55 Persist state set to: ON ########################################### adding routing table vpn1 Tunnel Interface 1 is eth1 with IP address 192.168.0.39/24 ########################################### adding routing table vpn2 Tunnel Interface 2 is usb0 with IP address 192.168.185.161/24 Error: any valid address is expected rather than "dev". ###########################################