Bridging your iPhone hotspot is useful for an array of reasons. Just move and not have internet from the local ISP yet? Want some redundancy in case the ISP fails? Maybe your phone’s 4G is actually faster or more reliable? Whatever the reason, bridging your phone plan’s internet connection is not too hard with open source router software Pfsense.
I use Pfsense as my LANs router. Pfsense is running on a proxmox server VM and is on the same subnet as a home router in “access point mode” to supply Wifi. I assume in this guide you already have pfsense set up as your network’s router/gateway.
I am running Pfsense
2.4.5-RELEASE, which already shipped with the freeBSD iPhone drivers
ipheth. If you don’t have that driver you’ll need to follow the steps in the forum post above.
First, load in the drivers by executing:
Success if you load that in without an error message. You may now also be prompted to “trust this device” on your iPhone…do that.
dmesg to see if your iPhone is being detected. Take note of the value after
ugen. In my case, the value is
Above you also see the MAC address of my phone’s hotspot getting picked up. Originally this DIDN’T happen for me, and first had to run:
usbconfig -d 1.2 set_config 3
1.2 is the value you observed above.
You will now hopefully see a new interface in the pfsense menu. In this example i’m assigning my hotspot as my WAN interface, but of course you could configure something in parallel to your regular WAN connection for redundancy.
Two quirks i’ve noticed. First, I have to manually toggle the hotspot on/off on my iPhone to make the blue hotspot logo appear on the phone. Next, I need to toggle the WAN interface on/off in:
Interfaces > WAN > Enable Interface.
Checking pfsense, I now have an IP.
If all goes well you should now be able to reach the internet!
Add the following
<pfsense><version>17.0</version> <lastchange></lastchange> <system><optimization>normal</optimization> <hostname>pfSense</hostname> <domain>localdomain</domain> <dnsallowoverride></dnsallowoverride> <earlyshellcmd>usbconfig -d 1.2 set_config 3</earlyshellcmd></system></pfsense>
Of course, changing
1.2 to whatever value you have.
Afterwards, remove the cache with
Sometimes i’ve noticed pfsense having trouble acquiring an IP even though the interface appears to be up. For this I do the following.
- Restart Pfsense (
Diagnostics > Reboot) with iPhone plugged in
- As soon as you are prompted to “trust” on your iPhone, do that and then quickly toggle hotspot off/on
- You may be prompted to “trust” twice. Repeat step (2) if so
- If “Setting up WAN” starts to hang during the boot up, start from step (1) and try again
Most of the time this works first try. You need to be quick with step 2, though!