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
I hope additions about internet are helpful. I know that even if packet tunnel provider starts gathering packets, i will need working vpn server to access web