FakeDNS addresses a key problem with TUN: once traffic enters the tunnel, only the destination IP may be visible, leaving domain-based rules without a match. This guide is for anyone configuring v2rayN TUN routing or troubleshooting failed game sessions and inaccessible local network services. Compare DNS responses and outbound routes separately, then test the same app with FakeDNS on and off to decide whether to keep virtual IP mapping.
How FakeDNS Maps Virtual IPs Back to Domains
Browsers and other apps usually look up a domain first, then connect to the address returned by DNS. TUN intercepts packets routed through the virtual network adapter at the network layer, where the destination is usually an IP—not the domain the app just looked up. Since multiple domains can share a real IP, you can't reliably recover the original domain from that IP alone.
Take example.com: the component handling the DNS query can assign an address from its IPv4 pool, such as 198.18.0.23, return it in an A record, and save the domain-to-IP mapping. The app then connects to that address. If the connection reaches a handler that can read the mapping, the core can recover example.com and apply domain-based routing rules. The selected outbound route then handles the real destination; the virtual IP is not the website's server address.
The address pool and cache limits depend on the active configuration. An address in the example range is only a clue; to confirm that the current component assigned it, check the actual pool and logs. Encrypted DNS may also bypass the traditional DNS path intercepted by the client, so checking port 53 alone doesn't prove that all queries are being handled.
When FakeDNS Makes Sense in TUN Mode
FakeDNS has a clear purpose when an app ignores the system proxy and you need to route traffic by domain. The app's DNS query must reach the handler that assigns virtual IPs, and its subsequent connection must pass through an entry point that can recover the mapping. If the query is handled one way but the connection takes another route, the app may receive a virtual IP without being able to reach its destination.
Comparison: Domain-Based Routing
- Intercept traffic
- Enable TUN and confirm the target app's packets enter through it
- DNS response
- Return a virtual IP from the configured pool for the test domain
- What to verify
- Check the recovered domain and the actual outbound route
Use this to check whether a connection that previously showed only a destination IP can now match a domain rule.
Comparison: Keep Real IPs
- Intercept traffic
- Leave TUN enabled
- DNS response
- Turn off virtual IP responses and use real DNS results
- What to verify
- Look up the same domain again and repeat the same test
Use this to tell whether the issue is caused by virtual IP mapping or already exists in the interception or outbound path.
In v2rayN, note the current state of “Enable Tun” on the main screen, then open Settings → Parameter Settings to review the DNS and TUN options available in your version. Menu locations and available fields vary by version and runtime component, so don't assume every version has a FakeDNS toggle with the same name. If there's no matching option, check the startup logs to identify the active component, then consult its supported configuration options. Don't copy settings from a different core.
Test Game Login, Matchmaking, and Gameplay Separately
A successful game launcher login doesn't mean matchmaking and gameplay use the same network path. Login may use a domain, while a match can use an IP address and UDP port supplied by a matchmaking service. A connection made directly to an IP doesn't involve the corresponding domain lookup, so FakeDNS can't infer a domain that was never queried. It also doesn't shorten the network path to the game server, so it isn't a latency-reduction switch.
- Record where it fails. Test login, matchmaking, joining a session, and gameplay separately. Note when the first failure occurs. If only gameplay fails, check whether its UDP traffic is intercepted and which outbound route it uses. Don't infer the route for the entire game from its login domain alone.
- Change only virtual IP responses. Keep the network, node, game region, routing rules, and TUN state the same. After switching, exit the launcher and game; clear the DNS cache if needed, then try joining again. Otherwise, the app may keep using a virtual IP it received earlier.
- Compare success rates and consistency. Run the same steps at least three times per setting, recording whether you can join, in-game latency, and any packet loss warnings. One successful attempt isn't enough to rule out server congestion. If both settings fail, check UDP routing, outbound routes, and the game service itself.
If real DNS results consistently let you join while virtual responses reliably cause failures, try turning off FakeDNS. If your component supports preserving real DNS results for specific domains, you can also exclude only the affected game domains, then retest login and gameplay. Don't route the entire game service based on a single launcher domain.
When to Turn Off or Exclude FakeDNS
- The address pool overlaps with an existing network. Check whether the virtual IP pool overlaps with routes for a corporate network, another virtual adapter, or a test network. If another route captures the destination, repeatedly changing upstream DNS won't help. First test with virtual responses disabled, then adjust the pool using options supported by the active component.
- An app needs the real IP address. Some apps validate the IP in a DNS response or pass the resolved address to another device for a connection. That device usually doesn't have the local mapping table, so it can't resolve a virtual IP to the destination. Preserve real DNS results for these domains; if you can't exclude them individually, turn off the feature entirely.
- Local network names need internal DNS. Workstations and home storage devices may rely on a router or corporate DNS server to return internal addresses. Use a resolver that can handle the relevant internal zones, and check the private network routes. Excluding virtual responses doesn't mean sending internal domains to a public resolver.
- Your current setup already has domain information. If apps using the system proxy already send destination domains to the proxy entry point and routing works as expected, there's no need to switch to TUN just to enable FakeDNS. Keeping the existing traffic path also makes future issues easier to trace.
FakeDNS Troubleshooting FAQ
I got a virtual IP. Why won't the site load?
First compare the address with the client's virtual IP pool. Then retry in the app that's failing and check whether the connection enters TUN, whether the domain is recovered, and whether the expected outbound route is selected. A virtual response from a lookup tool only confirms that the query worked; it doesn't prove the browser used the same DNS path or that its connection was intercepted correctly.
Why is Windows still using the old IP after I turn FakeDNS off?
Close the app that's having trouble, open Command Prompt, and run ipconfig /flushdns to clear the system DNS cache. Then reopen the app. Browsers, games, and clients may also cache DNS results themselves, so restart the relevant processes if needed. If a new lookup still returns an address from the pool, check whether another DNS service is returning virtual responses.
Does enabling FakeDNS prevent DNS leaks?
A virtual DNS response alone can't prove that DNS is leak-free. Check which resolver the app uses and which upstream resolver handles outbound DNS, then make sure the browser's secure DNS settings match your expectations. If IPv6 is enabled, check AAAA queries and actual connections separately: a virtual IP in an A record doesn't mean the IPv6 path is also controlled.
Clients and Platforms
Choose a platform from the download center, then follow the guide to check the basic system proxy, subscription, and TUN settings.