0

Hi StackOverflow community.

I am beginning a new project and was wondering if I could get some insight on VPNs and iPhones.

I want to create a VPN so that I can route all of my network traffic through it from my iPhone. I also hope to log each request that was routed through the VPN? (Similar to Hooked)

I am not sure where to start - any insight would be helpful!

Here is my initial plan:

1) Create a VPN (what should I use to create it?)

-How to accept iPhone request?

-How to route all requests to where they need to go?

2) Hook VPN up to iPhone and route all traffic through it

Billy Caruso
  • 149
  • 11

1 Answers1

1

This is actually not a programming, but a network question. So you might rather post a question over at serverfault.

You need a VPN server that in best case, has a fixed IP. From your iPhone you connect to this VPN via the external IP. If you don't have a fixed one, you'd need to update the IP from time to time or use DynDNS or something similar, but they're not perfect, as far as I know.

You configure & connect the VPN within the iPhones Settings app (General → VPN)

Within the VPN your iPhone gets assigned an IP address within the IP range of your private network (e.g. 10.0.0.xxx).

All the devices traffic gets routed through the VPN. When you have extensive logging on the VPN sever, you should be able to get a log of these requests.

EDIT This is all really broad and generalized. But as mentioned, this is mostly about VPN Sever configuration and, thus cannot be further discussed here on SO.

Julian F. Weinert
  • 7,474
  • 7
  • 59
  • 107
  • Thank you for the information Julian - Android has built in ways to track phone usage, I am trying to think of work arounds for iOS! – Billy Caruso Oct 01 '16 at 18:42
  • What kind of usage do you want to track? The basic call / data usage can be found within the settings since the really beginning of iOS – Julian F. Weinert Oct 01 '16 at 18:45
  • I am trying to track application usage. I want to find distinct patterns with how people use their phones and write inference algorithms to predict future patterns. Unfortunately tracking application usage in iOS is pretty difficult as there are no built in classes to help you. – Billy Caruso Oct 01 '16 at 19:10
  • If you want to track your apps data, I'd suggest something like google analytics for apps or another out of the plenty services out there. If you want to track users complete usage, I bet you're luckily out of luck on iOS. Also why would you or any user do that? Also: iOS forces apps to use HTTPS. Have fun analyzing that. – Julian F. Weinert Oct 01 '16 at 22:03
  • @BillyCaruso you got some solutions for that ? Because my requirements is also same as like your requirements . i want to get Application usage information with time and date something like that. if you have any idea please help me and guide me. Thank x – Raju Jun 18 '21 at 05:20
  • @Raju I think I answered that too. I suggested Google Analytics or one of the many many other app analytics services. What's the problem with them? Also, Analytics is a complicated topic. If your requirements are "time and date something like that" I suggest you have a real good think *what* you want to achieve first. Simply collecting "data" in the hopes it could be useful at some point is not a really smart move. – Julian F. Weinert Jun 18 '21 at 10:12
  • Also read this, Apple might have you covered already https://developer.apple.com/app-store/measuring-app-performance/ – Julian F. Weinert Jun 18 '21 at 10:15
  • @JulianF.Weinert Thank x for your reply . But my requirements is Screen Time Sharing. I want to get Screen Time for different applications usage. I know about Google Analytics and Flurry. But that's totally different from my requirements . i want like Screen Time Sharing . – Raju Jun 21 '21 at 00:53
  • This is not possible on iOS for many security reasons. I don't know if there is something to be found when you use MDM... But VPN is definitely not the right way. – Julian F. Weinert Jun 21 '21 at 00:56