Posts

Post not yet marked as solved
8 Replies
370 Views
Hello! If I set only remote address, then packet tunnel provider does not intercept packets at all. Internet works. If I add ipv4Settings, then packet tunnel provider somewhat catch packets. If I try open something in web beforehand, and quickly start packet tunnel provider, it sees leftover packets. Internet does not work. If I set DNS settings, then tunnel starts receiving "apple.com", "icloud.com" DNS queries. I guess that's not right. Internet does not work. How do I set everything right? ============= My settings: let settings = NEPacketTunnelNetworkSettings(tunnelRemoteAddress: address) settings.ipv4Settings = NEIPv4Settings(addresses: ["172.16.200.10"], subnetMasks: ["255.255.255.255"]) settings.ipv4Settings?.includedRoutes = [NEIPv4Route.default()] settings.ipv4Settings?.excludedRoutes = [ NEIPv4Route(destinationAddress: "192.168.0.0", subnetMask: "255.255.0.0"), NEIPv4Route(destinationAddress: "10.0.0.0", subnetMask: "255.0.0.0"), NEIPv4Route(destinationAddress: "172.16.0.0", subnetMask: "255.240.0.0") ] settings.dnsSettings = NEDNSSettings(servers: ["8.8.8.8", "8.8.4.4"]) settings.dnsSettings?.matchDomains = [""] settings.mtu = 1400
Posted Last updated
.
Post not yet marked as solved
2 Replies
243 Views
Hello! I'm trying to develop an app using PacketTunnelProvider. I set up local VPN server, and successfully established UDP session between client and server. Also, I was able to exchange some test packets using session.writeDatagram() There is problem: It seems that packetFlow.readPacketObjects does not gather real packets at all. Unless I set DNS settings for PacketTunnelProvider as settings.dnsSettings = NEDNSSettings(servers: ["8.8.8.8", "8.8.4.4"]) Then, tunnel does catch only DNS queries. How can I get all allowed packet traffic? Is it possible? Give me some hints, please Thank you
Posted Last updated
.