Hi Everyone,
I was happy to see some updates to the nova and sdk since last time I used them. I have a nova setup as a backup SSH connection to a monitoring system. I use spacebridge to connect via the cellular network in the case the ethernet is down. The system runs Ubuntu 18. I was able to get everything working - so that was great. The issue I have now is it seems that ALL traffic is being routed over the ppp0 connection after hologram network connect.
I wanted to bring this up because it could result in very high data usage. I am also wondering if anyone has any advice on configuring the ppp connection to only be used for incoming ssh connections tunneled over spacebridge.
The gist is that the default route (via ppp0) should be able to be deleted and replaced with a different default route; but, for completion’s sake, can you post the output of ip route (you can mask the ppp0 NIC’s IP address for privacy if you want)?
Hi Pat!
Sure - that’s along the lines of what I figured. I wanted to make sure I am using the SDK correctly and there is not a built in way to connect for spacebridge only. Here it is.
tycon@zm:~$ ip route
default via 10.64.64.64 dev ppp0 proto static
default via 192.168.1.1 dev eno1 proto static metric 100
10.64.64.64 dev ppp0 proto kernel scope link src 10.x.x.x
10.176.0.0/16 via 10.64.64.64 dev ppp0 proto static
10.254.0.0/16 via 10.64.64.64 dev ppp0 proto static
169.254.0.0/16 dev eno1 scope link metric 1000
192.168.1.0/24 dev eno1 proto kernel scope link src 192.168.1.5 metric 100
What would be the procedure here - use the sdk to connect, then delete the route and replace it?
Wanted to share a quick script to connect to spacebridge when an internet outage occurs. I just added the script to cron to run once a minute. Not perfect but it works for this use case.
wget -q --spider http://google.com
if [ $? -eq 0 ]; then
pgrep -fl "/usr/bin/python3 /usr/local/bin/hologram spacebridge"
if [ $? -eq 0 ];
then
echo `date` "Internet up - Stopping Spacebridge processes..."
pkill -f "/usr/bin/python3 /usr/local/bin/hologram spacebridge"
/usr/bin/python3 /usr/local/bin/hologram network disconnect
fi
else
PSN=`netstat -peanut | grep ":4010 " | wc -l`
IP='10.171.23.70'
if ping -c1 $IP 1>/dev/null 2>/dev/null
then
exit 0
else
echo `date` "Internet down - Starting Spacebridge..."
/usr/bin/python3 /usr/local/bin/hologram spacebridge & disown
fi
fi