April 27, 2012

How to inspect the web traffic coming from your iPad or iPhone


A few things have been bugging me on my iPad for a while:
  • Some web pages (including some of our SharePoint sites) don’t load or don’t load completely on Safari when connecting through our corporate wifi, or through VPN
  •  I’m just plain curious to understand how some apps like the IMF Data app get their data, so I may be able to leverage the same information on my own apps
  • And then I just want to understand what some apps are doing with my data: do they send it  to their servers? Is it encrypted?

Of course if we were talking about a PC, I would just use my good old friend Fiddler 2, a tool that has saved me hundreds of hours of debugging time over the years. But I’m not on a PC… Or am I?!

Turns out, you can use Fiddler 2 on your PC to monitor your iThing traffic! And it’s really simple. Just follow these steps:

Figure 1
  1. Make sure both your PC and you iPhone or iPad are on the same wifi. Be aware, some secure wifi, often corporate wifi, won’t allow the communication of your iPad with a PC, so you may have to do this from home
  2. Find your PC IP address. Just open a Command window, and type IPConfig (Figure 1).
  3. Now go to your iPad, Settings -> Wi-Fi ->Select the same wifi connection used on your PC and tap the blue arrow.
  4. Figure 2
  5. Go at the bottom, tap “Manual”, and enter the IP address in the “Server” field. Type 8888 for the “Port” field (Figure 2)
Your iPad is ready. Now all that you need to do is Open Fiddler 2 and configure it.


5. Open Fiddler 2. Go to Tools -> Fiddler Options -> Tab Connections -> Check the box “Allow remote computers to connect


Figure 3

And voila! All you ipad or iPhone traffic should now display on your PC (Figure 3). Make sure you shut down on your PC any app that might generate some HTTP noise.

Have fun discovering what your iThing is up to!