Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

migrated from superuser.com Mar 1 '11 at 9:04

This question came from our site for computer enthusiasts and power users.

    
This isn't really about computer hardware or software – MaQleod Mar 1 '11 at 2:27
    
Jailbroken? Then certainly. Not jailbroken? Probably not. – user588 Mar 1 '11 at 9:08

When using your iPhone as a modem, I don't believe your iPhone does NAT, so I don't think port forwarding should be necessary. Or, it may be that your wireless carrier is doing NAT on their router, so you won't be able to do port forwarding because you don't control the NAT gateway. For instance, I know that wireless carrier O2 in the UK does NAT on their own router, so all their wireless data customers are behind NAT.

What IP address does your Mac get on its interface that's connected to the iPhone?
What does the output of traceroute google.com look like?
What IP address is reported by services like http://www.whatismyip.com/ ?

Even if it turns out that you're behind your carrier's NAT, you might be able to connect back into your development server if you use MobileMe's Back To My Mac feature to advertise the services you want to connect to. Back To My Mac automatically handles many NAT traversal problems.

share|improve this answer

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 172.16.0.0/12 subdomain.

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

Why?

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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.