wwan_connect.sh 298 Bytes
Newer Older
Martin Kepplinger's avatar
Martin Kepplinger committed
1
2
3
4
5
6
7
8
#!/bin/bash
sudo mmcli -m 0 --simple-connect="apn=webaut,allow-roaming=true"
ADDR=$(sudo mmcli --bearer 0 | grep address | awk '{ print $3 }')
GW=$(mmcli --bearer 0 | grep gateway | awk '{ print $3 }')

sudo ifconfig wwan0 ${ADDR}/30
sudo route add default gw $GW
sudo resolvectl dns wwan0 8.8.8.8