How to access the Internet through usb network ?
Hi,
For some reason I don't want to use Wifi when it is not necessary. So, at home, I want to connect my Jolla usb cable to my computer (using Linux Debian) and to be able to upgrade the phone, using apps, etc. Unfortunately, it does not work as expected.
What I did so far :
I have shell script that do the following : modprobe usbnet verify that usb0 has the correct IP address or set it up if not (192.168.2.4) ping the phone send, via ssh, the following command to the Jolla :
- ip route del default
- ip route add default via 192.168.2.4
Back on the computer :
- echo 1 > /proc/sys/net/ipv4/ip_forward
- /sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
- /sbin/iptables -A FORWARD -i usb0 -o eth0 -j ACCEPT
- /sbin/iptables -A FORWARD -i eth0 -o usb0 -j ACCEPT
At that point, the phone is able to ping hosts on the Internet, even sshing to them.
But, apps do not want to use this connection. They just ask to connect through Wifi or Phonedata ...
I must have missed something, but I cannot find it :( Any idea ?
@yonux welcome to tjc. the how-to tag is reserved to give instructions, not to ask for helo. ill retag...
misc11 ( 2017-04-04 14:24:09 +0200 )edit@yunox also, please use search before posting. see this thread here. does it answer your question?
misc11 ( 2017-04-04 14:29:16 +0200 )editWell, thanks for the retag, and sorry if I made a mistake.
For the related thread, no, it is not what I am looking for. Actually, the thread is talking about tethering which is accessing the Internet from a computer using the Internet connection of the phone. I want to do the contrary, accessing the Internet from the phone using the Internet connection of the computer.
yonux ( 2017-04-04 14:50:30 +0200 )editMistake again ... this is not an answer, if must has been a comment ...
yonux ( 2017-04-04 14:51:01 +0200 )edit@yonux under your answer: more > repost as comment...
misc11 ( 2017-04-04 14:54:15 +0200 )edit