Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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 would like to block ports when using my iPhone 4 (iOS 5.0 jailbreaked) as a hotspot.

The reason is I don't want my backup program, computer updates or any high bandwidth usage tool to be able to download or upload too much data.

Is there a way to do that (iOS native or via an app) ?

share|improve this question
up vote 8 down vote accepted

Add the and repositories in Cydia > Manage > Sources > Edit > Add. Then install the MobileTerminal (NEW) app from the insanelyi repository and the network-cmds package from the other one. Then you can go into the terminal app you just got and run ipfw. This will let you write to your firewall tables. If you need a tutorial on how to use ipfw, there's a good one here (skip to Step #2).

Edit/Update/Disclaimer: To anyone actually looking to use ipfw on iOS, you're going to have to patch the kernel to include support for pf. Documented, nobody has ever done it, but it's not technically impossible. The Jailbreak patches the kernel upon boot, so this would require the same exploits used during that process.

share|improve this answer
One concern is that insanelyi is primarily a pirate repository. A reliable and authoritative place to get a working version of Mobile Terminal for iOS 4 and 5 is to download the .deb file from the official Google Code project site and then install it with iFile or by placing it in the /var/root/Media/Cydia/AutoInstall directory. Another option for getting command-line access to your device is to install OpenSSH and an App Store SSH client app such as iSSH or Prompt, and then SSH to localhost. – britta Apr 27 '12 at 23:43
Yes, that's the most ideal place to get MobileTerminal, but it's a little more hassle. One could remove the repository after installing MobileTerminal if they had some worries, but your advice is best either way. – Andrew Larsson Apr 30 '12 at 15:57
Here's a non-pirate repository that hosts Mobile Terminal 520-1: – britta Apr 30 '12 at 20:55
Thanks for the alternative. It's nice to see that there are some legal-friendly repositories hosting some good apps. – Andrew Larsson May 1 '12 at 17:18

You could look into using the tweak Firewall iP (a paid package hosted by BigBoss repository) - it provides a number of options for controlling outgoing connections from your iPhone.

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.