sharing mobile data through usb tethering
#3
A script to try
Code:
#!/bin/bash # Share the internet connection from wwan0 through usb0 case "$1" in     start) ip link set usb0 up ip a add 192.168.99.1/24 dev usb0 iptables --table nat --append POSTROUTING --out-interface wwan0 -j MASQUERADE iptables --append FORWARD --in-interface usb0 -j ACCEPT echo 1 > /proc/sys/net/ipv4/ip_forward echo "Set your PC's networking to" echo "192.168.99.0/24" echo "gateway 192.168.99.1" echo "dns 192.168.99.1"  ;;     stop) echo 0 > /proc/sys/net/ipv4/ip_forward ip link set usb0 down iptables --table nat --delete POSTROUTING --out-interface wwan0 -j MASQUERADE ;;     *) echo "To start or stop sharing script usage: $0 {start|stop}" ;; esac


Might need little changes. Easy to turn into touch friendly yad gui. Easy script to gui examples https://puri.sm/posts/easy-librem-5-app-...creenshot/ && https://puri.sm/posts/easy-librem-5-app-...he-screen/ Please improve and share.
  Reply


Messages In This Thread
RE: sharing mobile data through usb tethering - by vusra - 02-10-2022, 01:03 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Pinephone seems tobe using 4G data instead of Wifi data grump_fiddle_reinstall 7 8,388 02-20-2025, 02:47 PM
Last Post: puffchumpy
  Mobile internet via cellular network mostly not working Anna 18 27,440 01-19-2024, 02:59 AM
Last Post: anonymous
  4G data on default startup / boot dcinoz 1 3,237 04-29-2023, 11:24 PM
Last Post: dcinoz
  Block firefix-esr-mobile-config from (re)installing itself grump_fiddle_reinstall 3 5,584 01-07-2023, 09:36 AM
Last Post: dcarvil
Exclamation No modems were found: No mobile data, no 2G anonymous 2 5,063 12-26-2022, 06:46 PM
Last Post: anonymous
  very slow processing of MMS received via Ting (T-Mobile) treebeard 6 9,213 12-01-2022, 09:18 AM
Last Post: traut
  DNS Problems with Mobile Data arno_nuehm 29 41,343 10-29-2022, 09:16 AM
Last Post: treebeard
  Amberol Mobile Music player(flatpak) biketool 0 2,542 06-19-2022, 07:16 AM
Last Post: biketool
  Cellular data is working! drh 0 2,306 05-15-2022, 09:02 AM
Last Post: drh
  Reskinning Apps for Mobile biketool 6 9,292 12-05-2021, 02:30 PM
Last Post: biketool

Forum Jump:


Users browsing this thread: 1 Guest(s)