Network utilities (e.g. ping, ftp, telnet, …) in MobileTerminal on iPhone
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!
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
Did you reboot your iPhone?
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
I stand corrected, it is indeed “inetutils” :)
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
Thank u very much for the info.
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
Worked with mobileterminal 4.26 and ios 4.0.1 I did the apt-get command so it worked right away.
Thanks! nice info.
thnx
I’m having the exact same problem as TechBart on my iPhone 4 with iOS 4.1.
Anyone got any ideas?
Anyone know if i can get the “nslookup” command installed on MT?
I tried to find inetutils on cydia and cant find it.. is it gone?
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