Network utilities (e.g. ping, ftp, telnet, …) in MobileTerminal on iPhone

10/08/2009 15:55 | iPhone | 14 replies | 12891 views | RSS

I have been searching like a madman why I didn’t have basic network commands (ping, netstat…) available in the MobileTerminal on my iPhone after I upgraded to 3.0.

Seems that there is a Cydia package you need to install. On previous iPhoneOS versions I believe the commands included in this package were installed alongside with the MobileTerminal, or maybe another package.

The name of the package is “network-cmds” – “inetutils” *, so you can imagine how I felt when I finally found it.

* thx trevorlc!


  1. On 27 September 2009 at 12h27, buangsampah wrote

    how do you link the network-cmds with mobile terminal. cause I have downloaded both and when I tried to ping, mobile terminal told me that the ping command is not available. thx. Buang

  2. On 27 September 2009 at 13h35, Selder wrote

    Did you reboot your iPhone?

  3. On 7 October 2009 at 06h41, trevorlc wrote

    That does not have ping in it. Install a package from Cydia called Inetutils which has the coomand for ftp, inetd, ping, rlogin, telnet, tftp

  4. On 8 October 2009 at 23h06, Selder wrote

    I stand corrected, it is indeed “inetutils” :)

  5. On 13 October 2009 at 14h25, buangsampah wrote

    Thank you guys for the info.
    Now, it works after applying (installing) the inetutils (download from cydia).
    Now, I can “ping” (no nee to reboot the iphone).
    But, I can NOT use the “traceroute” command. It say “icmp socket: Operation Not Permitted”. Do I need to set permission or anything?
    Thx.
    Buang

  6. On 3 December 2009 at 02h48, art wrote

    Thank u very much for the info.

  7. On 16 May 2010 at 13h44, Techbart wrote

    I too am having issues using traceroute. I have installed inetutils and network-cmds from Cydia. However, any attempt to run a traceroute from Mobile Terminal results in several fails depending on user. For standard mobile user both with and without su, I see:

    “traceroute: icmp socket: Operation not premitted”

    If I try traceroute with root account, I see the following message:

    “traceroute: ifaddrlist: SIOCGIFADDR: pdp_ip0: Can’t assign requested address”

    My guess is that mobile terminal is defaulting to using the iPhone’s cell comms interface and ignoring wireless connectivity. Not a problem for most people I know, but as I don’t have network coverage (bills got on top of me), without an unlock I’m stuck behind wifi. Even so, it would be nice to have traceroute either automatically pick up an active connection, or allow the user to switch between interfaces. Er, just a guess here though:p

  8. On 23 August 2010 at 01h10, X wrote

    Worked with mobileterminal 4.26 and ios 4.0.1 I did the apt-get command so it worked right away.

  9. On 20 November 2010 at 06h37, anonymous wrote

    Thanks! nice info.

  10. On 13 December 2010 at 15h15, anonymous wrote

    thnx

  11. On 15 December 2010 at 10h23, Rez wrote

    I’m having the exact same problem as TechBart on my iPhone 4 with iOS 4.1.

    Anyone got any ideas?

  12. On 3 February 2011 at 07h12, anonymous wrote

    Anyone know if i can get the “nslookup” command installed on MT?

  13. On 14 July 2011 at 15h25, anonymous wrote

    I tried to find inetutils on cydia and cant find it.. is it gone?

  14. On 19 October 2011 at 00h38, anonymous wrote

    you can get nslookup from BIND DNS Server in cydia. To work it needs to know a dns server, so just copy /etc/resolv.conf from your mac, and replace the first ip next to “nameserver” with your carriers dns server (or the networks…), and put that file in the same place on your phone using ssh