Recently I came down to want a mobile hotspot when going out of home, something like Netgear Nighthawk M series, but able to flash custom firmware (OpenWrt/pfSense equivalents) and cheap. However, there is no such thing on the market even without budget consideration.

So it has to be done with DIY, like USB tethering with a router. In the case of tethering or so called Ethernet over USB, we are using a phone as a cellular modem for our router.

A gifted GL.iNet portable router has been laying down in my drawer for many years. This small gadget has the USB port I need, and can be powered up by another 5v micro USB cable. Now it’s the time to bring it back up.

After a sysupgrade for the preexisting OpenWrt, I need to install the usb packages. This can be done in the web interface, but it’s much easier for me to do via cli.

I have to connect the Ethernet cable for this since the SSH server is configured only accessible via physical ports for security.

opkg update
opkg install kmod-usb-net-rndis kmod-nls-base kmod-usb-core kmod-usb-net kmod-usb-net-cdc-ether kmod-usb2 usbutils

After installation of these support packages, plugging the phone to the router via data cable, then we can see the new added usb0 device from Network - Interfaces - Devices via web interface or lsusb via cli.

Add new interface via web interface with usb0, at this point, an working ip address should be appeared under the Interfaces or ip a for cli.

Next, assign the WAN interface from eth0 to usb0, then run:

uci set network.wan.ifname="usb0"
uci set network.wan6.ifname="usb0"
uci commit network
/etc/init.d/network restart

Now, both usb and eth ports on the router should be operating as DHCP client. If I plug both, the Ethernet takes over the traffic, while connecting any single one would work automatically.

With this setup, I can have security features such as firewall rules, KRACK countermeasures, MAC allow list, client isolation, and router level vpn/tor.

When using a power bank to charge the router, it also charges the tethering phone simultaneously. Which is optimal by default.

By using a combination of these gadgets, security, power consumption, heat and stability should all go beyond all-in-one solution, such as mobile hostop or using phone’s built-in function directly.