I need to install remotely Omxplayer on a Raspberry Pi. RPi is connected by a LTE modem through PPP0 interface. My RPI is placed another country and I connect to Raspberry through my VPN using SSH. My VPN does not have access to Internet and the default gateway is 10.1.64.1 (PPP0).
RPI has also WiFi Connection: WLAN0 interface. I want to use WLAN0 to launch:"sudo apt-get install omxplayer" without lost my SSH communication through PPP0
ifconfig
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 184 bytes 11776 (11.5 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 184 bytes 11776 (11.5 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
ppp0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
inet 10.1.64.45 netmask 255.255.255.255 destination 10.64.64.64
ppp txqueuelen 3 (Point-to-Point Protocol)
RX packets 202 bytes 25021 (24.4 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 808 bytes 65151 (63.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.93 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::2db7:3540:5e17:a470 prefixlen 64 scopeid 0x20<link>
ether b8:27:eb:da:d6:37 txqueuelen 1000 (Ethernet)
RX packets 1806 bytes 369775 (361.1 KiB)
RX errors 0 dropped 620 overruns 0 frame 0
TX packets 184 bytes 25229 (24.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
If I change the default gateway, I lost connectivity with the device. I have tried the following command but it has not worked: I have lost the ssh connection.
sudo ip route change default via 192.168.1.1 dev wlan0
sudo route add default gw 192.168.1.1
My route table:
$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 ppp0
0.0.0.0 192.168.1.1 0.0.0.0 UG 302 0 0 wlan0
10.64.64.64 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
169.254.0.0 0.0.0.0 255.255.0.0 U 203 0 0 wwan0
192.168.1.0 0.0.0.0 255.255.255.0 U 302 0 0 wlan0
$ ip route show
default dev ppp0 scope link
default via 192.168.1.1 dev wlan0 src 192.168.1.205 metric 302
10.64.64.64 dev ppp0 proto kernel scope link src 10.1.64.54
169.254.0.0/16 dev wwan0 proto kernel scope link src 169.254.104.103 metric 203
192.168.1.0/24 dev wlan0 proto kernel scope link src 192.168.1.205 metric 302
How can I select the network interface?
Thanks in advance