I'm using iPhone as a modem.

Is there a way to port forward to my computer because I'm using it as a development server.

  • This isn't really about computer hardware or software
    – MaQleod
    Commented Mar 1, 2011 at 2:27
  • 1
    Jailbroken? Then certainly. Not jailbroken? Probably not.
    – user588
    Commented Mar 1, 2011 at 9:08
  • To port forward to the iPhone you simply forward to the IP address it has. Commented Apr 3, 2018 at 19:53
  • 1
    Get a dedicated 4G router or hotspot
    – Allan
    Commented Apr 6, 2018 at 16:33

2 Answers 2


Short answer

Until now (iOS 9.1) there has been no way to configure port forwarding in Personal Hotspot

Long Answer

Activating Personal Hotspot on an iOS device enables it's built-in NAT router. Other devices that connect to this iPhone (using USB, WiFi or Bluetooth) get an IP in the subdomain.

There are no NAT settings in iOS, nor does it provide UPnP or NAT-PMP for remote NAT configuration.


Nobody knows Apple's reasons.

Wild guess: Knowing that availability of the Personal Hotspot feature on an iOS device depends on it's carrier, Apple may have disabled further features as way to play nice with the carriers.

Possible Workarounds

  • On the device that needs to accept incoming connections: connect to a VPN that provides a public IP and incoming connections
  • If you have access to the remote device you could create a tunnel (e.g. with ssh)
  • If the remote device is connected to the same iCloud account, enabling Back to my Mac will put you on the same private IPv6 network
  • Using a 4G modem instead of your iPhone will give you a direct internet connection accepting incoming connections

Edit: BUT...

Even you could bypass NAT on your device, your cellular IPv4 internet connection is very probably also behind a carrier-grade NAT.

  • > Using a 4G modem instead of your iPhone will give you a direct internet connection accepting incoming connections Yes that's what I tried to do with a Modem Domino Huawei 4G but that didn't work because functionalities are deliberately limited by the ISP (Orange) : it's not an original Domino Huawei, it's transformed. I'll try desimlock (need to find an adaptator for micro SIM) but that may not have anything to do with accessing to port forwarding... So be carefull what 4G modem you buy !
    – soulthom
    Commented Aug 15, 2017 at 21:42

There is no way to do port forwarding on an iPhone when using it as a Wi-Fi hotspot. This is by design. (IMO) the iPhone hotspot feature was to allow users to access the Internet via their phone's data plan so the user could check email, surf the web, chat, etc. It wasn't designed to serve as a router with more advanced features.

There are no ports open on either "side" of the iPhone hotspot in which to interface for management. I did a portscan on both the public side and the private side (from a Mac and a PC) to see if I could access a management page - it's locked down and doesn't respond (though it does respond to a ping).

However, I just tested and verified that my dedicated hotspot - AT&T Unite Explore does support port forwarding (page 60 of User Manual). I was able to forward port 22 to my laptop and successfully connected via SSH to it.

One last thing - while I was able to do this successfully on AT&T, your provider may not allow you to open ports on your device - check with them first.

You must log in to answer this question.