USB Tethering on Android
Hi,
I was trying to tether my phone on FWG and set it up as a WAN connection.
After I plugged in the phone to the front USB port and enabled USB tethering on my phone, I could see that a new USB network interface was created.
usb0: flags=4098<BROADCAST,MULTICAST> mtu 1500
ether xx:xx:xx:xx:xx:xx txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
However, it was disabled.
pi@firewalla:~ (Suku FWG) $ sudo lshw -C network
*-network:2 DISABLED
description: Ethernet interface
physical id: 3
logical name: usb0
serial: xx:xx:xx:xx:xx:xx
capabilities: ethernet physical
configuration: broadcast=yes driver=rndis_host driverversion=22-Aug-2005 firmware=RNDIS device link=no multicast=yes
I first brought up the interface using below command
sudo ifconfig usb0 up
Followed by adding the below entries to /etc/network/interfaces
auto usb0
iface usb0 inet dhcp
On running "sudo ifup usb0" I could successfully get a IP from the phone.
Listening on LPF/usb0/xx:xx:xx:xx:xx:xx
Sending on LPF/usb0/xx:xx:xx:xx:xx:xx
Sending on Socket/fallback
DHCPDISCOVER on usb0 to 255.255.255.255 port 67 interval 3 (xid=0x6ad661a)
DHCPREQUEST of 192.168.111.153 on usb0 to 255.255.255.255 port 67 (xid=0x1a66ad06)
DHCPOFFER of 192.168.111.153 from 192.168.111.176
DHCPACK of 192.168.111.153 from 192.168.111.176
/etc/resolvconf/update.d/libc: Warning: /etc/resolv.conf is not a symbolic link to /run/resolvconf/resolv.conf
(integer) 1
bound to 192.168.111.153 -- renewal in 1392 seconds.
Now both ifconfig and showed that the network is up.
pi@firewalla:~ (Suku FWG) $ ifconfig usb0
usb0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.111.153 netmask 255.255.255.0 broadcast 192.168.111.255
inet6 fe80::c88c:dfff:feb0:efc5 prefixlen 64 scopeid 0x20<link>
ether xx:xx:xx:xx:xx:xx txqueuelen 1000 (Ethernet)
RX packets 24 bytes 2606 (2.6 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 10 bytes 1912 (1.9 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
*-network:2
description: Ethernet interface
physical id: 3
logical name: usb0
serial: xx:xx:xx:xx:xx:xx
capabilities: ethernet physical
configuration: broadcast=yes driver=rndis_host driverversion=22-Aug-2005 firmware=RNDIS device ip=192.168.111.153 link=yes multicast=yes
Now that the network is up, how can it be used as a failover connection? Could the same be added as an option in the app and the base code?
-
@Firewalla would have to say if this is possible but one thing that comes to mind is a Bridge between the USB connection and one of the Ethernet Ports. Then you could set up that Port as a WAN in the App? Never tried it though, and not sure if the Firewalla app would see that the connection is up for that port.
-
What I know is, one of our developers is really excited about this. He is currently looking and see if there is a way to integrate this into the system. There are a few hurdles needs to go through, which including managing the newly created interface, which is very dynamic ...
If anyone interested in this, please comment, it will for sure speed up the process.
-
I would like to have this option. I posted about the issue right now with iPhone and iOS 14 in this post
I think it would be a great addition to the Firewalla.
-
I'm also interessted in this feature. I have another idea .. what about 4G usb sticks for failover wan connection? I have several huawei sticks on different raspberrys .. they create a new interface and assign a ip via dhcp. Config is done via a webinterface (I config them with my pc, save and replug to the raspberry).
Also one interessting solution .. My neighbor in my house also owns a firewalla gold. Usually we don't share our internet connection, we are connected to different ISPs. But if one of ours would failed, a failover over wifi would be perfect. Maybe with a wifi usb stick?
-
I just purchased a Firewalla Gold for a non-profit I work with, and am considering one of the Firewall models for my home. The USB tether option for a backup WAN connection would be a wonderful addition. I personally don't need it to be WiFi if WiFi tether would add significant cost. I am also looking at building an OpenWRT or pfSense appliance for home to get the tether capability.
I saw elsewhere that there is an Ubuntu 20 version of the Firewalla Gold. I run Ubuntu 20.04 LTS at home. When the Internet goes down, I connect my android phone to my PC, turn USB Tethering on in the phone, and in about 10 seconds Ubuntu has figured out that a new network interface is available, handles the connection change seamlessly, and I'm back on the Internet. No configuration needs to be done. As far as I have noticed, the connection will not switch back automatically once the main internet comes back, but it will switch back once I unplug the phone, and no configuration or settings change is required.
All to say that Ubuntu seems to handle a good part of the connection switching, so perhaps a USB tether would be more easily doable in the Ubuntu Firewalla Gold.
-
I've been able to get the current version of the Gold to get a IP address from Verizon via USB tether. I can see ARP requests going through, but I haven't been able to get anything else to go out. I know it is because of the complex routing tables and I've haven't had a lot of time to debug it and get it to work. This would all be done via terminal and not through the UI (which Firewalla would have to develop). It would be interesting to try the Ubuntu 20 and see how that works .... Maybe put that on my Pi and see how it goes.
Please sign in to leave a comment.
Comments
15 comments