Raw socket on iOS

Hello there,

May I know Raw socket is supported on iOS 13 or not?

Thanks!

May I know Raw socket is supported on iOS 13 or not?

There’s no supported way to work with raw IP on iOS. The only exception here is ICMP, which you can do using the technique shown in the SimplePing sample code.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
Thank you, Eskimo!

Actually, I am working on something like split tunnel, but route based forwarding to different tunnel is not scalable for my application. What I am trying to do is all the traffic using utun IP as src-ip, will be sent to tunnel or regular physical interface based on predefined policy/rule. The traffic being forwarded to physical interface directly would have the utun interface IP as src-ip also, which is "private" IP, the uplink gateway won't know how to route it once the return traffic coming in. So before sending out, the src_ip has to be changed from utun IP to physical interface IP.

May I know pf/iptable is supported in iOS? or any recommendations? Thanks!
Raw socket on iOS
 
 
Q