How can I determine the IP address I’m using to access websites when connected to a VPN?
Hello. I have VLESS configured on a rented server. On my client (Windows), I have whitelists set up in v2rayN (everything except Russia). Everything works, but I want to know exactly which IP address I’m using to access websites when the VPN is enabled, to verify that the routing is working correctly for specific sites.
More details about my setup:
- VLESS is enabled
- Routing is enabled - Everything except Russia
- When checking on https://yandex.ru/internet, it shows my real IP 109.000.000.000
- When checking on https://2ip.io/, it shows the VPN server IP address 150.000.000.000
- Question: Which IP address do I use when accessing mail.ru?
I need to accurately determine if my routing is working as intended.
How to Determine Your IP Address When Using VPN and Check Routing for Specific Domains Like Mail.ru
To determine the IP address from which you access websites when using a VPN and to verify proper routing for specific domains such as mail.ru, there are several reliable methods. Your situation where different websites show different IP addresses is normal and depends on the detection method used.
Contents
- Basic IP Address Checking Methods
- Checking Routing for Specific Domains
- Tools for Checking IP with VPN
- Analyzing Your V2RayN Configuration
- How to Accurately Determine IP for Mail.ru
- Additional Verification Methods
- Common Problems and Solutions
Basic IP Address Checking Methods
1. Comparing Results on Different Websites
Different IP checking services use different detection methods and databases, so it’s normal to get different results:
- Yandex.ru may use an IP based on your browser’s geolocation or other signals
- 2ip.io and similar services check the actual outgoing IP address of your connection
Important: If your VPN is working correctly, most IP checkers should show the IP address of your VPN server (150.000.000.000), except in cases of leaks.
2. Command Line for Checking Routing
On Windows, use the following commands to analyze routing:
route print
netstat -rn
This command will display the routing table where you can see which gateway is used by default and how traffic is being routed.
3. Traceroute for Checking Path
Use the tracert command to trace the path to a specific website:
tracert mail.ru
If traffic is going through the VPN, you will see the IP addresses of your VPN provider’s servers in the path.
Checking Routing for Specific Domains
1. Testing Through Different Browsers
Open websites in different browsers or incognito mode to exclude the influence of cache or cookies:
2. Using Specialized Services
Here are the most reliable services for checking VPN and IP:
- IPLeak.net - checks for DNS and WebRTC leaks
- Whoer.net - comprehensive anonymity check
- VPNTesting.com - specialized VPN testing
- AbstractAPI VPN Detection - VPN detection
3. Checking DNS Queries
nslookup mail.ru
If DNS queries are going through the VPN, you will see the VPN server’s IP addresses as the DNS resolver.
Tools for Checking IP with VPN
1. Online Services Focused on Accuracy
These services are more reliable for checking VPN connections:
- IPQualityScore - specialized VPN detector
- Fraudlogix - VPN and proxy checking
- IP Teoh - VPN and proxy detection
2. Mobile Applications
Use mobile applications to check from different devices:
- WhatIsMyIP (Android/iOS)
- IP Check (Android/iOS)
3. Browser Extensions
Install extensions that show your current IP and VPN status:
- IP Location
- VPN Check
- WebRTC Leak Protection
Analyzing Your V2RayN Configuration
1. Checking Routing Rules
Your “All except Russia” setting means:
- Russian websites (including mail.ru) should use direct access (your white IP 109.000.000.000)
- All other websites should use VPN (IP 150.000.000.000)
2. Checking GeoIP and GeoSite
Ensure you have up-to-date databases:
"routing": {
"domainStrategy": "IPIfNonMatch",
"rules": [
{
"type": "field",
"domain": ["geosite:ru"],
"outboundTag": "direct"
},
{
"type": "field",
"domain": ["geosite:category-ads-all"],
"outboundTag": "block"
}
]
}
3. Checking DNS Functionality
DNS queries should be properly routed according to the rules. If mail.ru uses Russian DNS servers, it may show your white IP even when the VPN is enabled.
How to Accurately Determine IP for Mail.ru
1. Method 1: Checking Through Russian Services
Since mail.ru is a Russian service, use Russian checks:
# Through command line
curl -s https://yandex.ru/internet | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+'
2. Method 2: Checking Through API
Use API services for programmatic checking:
import requests
def get_ip_from_service(service_url):
try:
response = requests.get(service_url, timeout=5)
if response.status_code == 200:
return response.text.strip()
except:
pass
return None
# Check through different services
services = [
'https://api.ipify.org',
'https://ifconfig.co/ip',
'https://icanhazip.com'
]
for service in services:
ip = get_ip_from_service(service)
print(f"{service}: {ip}")
3. Method 3: Checking Through Browser Tools
Open browser developer tools (F12) and run:
// In browser console
fetch('https://api.ipify.org?format=json')
.then(response => response.json())
.then(data => console.log('Current IP:', data.ip));
Additional Verification Methods
1. Checking for WebRTC Leaks
WebRTC can leak your real IP address even when using a VPN. Check through:
// In browser console
function getIPs(callback) {
var ip_dups = {};
var ip_callbacks = {
"rtcweb-candidates": function(ips) {
ips.forEach(function(ip) {
if (ip_dups[ip] === undefined) {
callback(ip);
}
ip_dups[ip] = true;
});
}
};
for (var proto in window.RTCPeerConnection.prototype) {
var native_method = window.RTCPeerConnection.prototype[proto];
if (native_method) {
window.RTCPeerConnection.prototype[proto] = function() {
var args = arguments;
native_method.apply(this, arguments);
if (proto === 'createOffer' || proto === 'createAnswer') {
var pc = this;
var gatherIceCandidates = function() {
pc.onicecandidate = function(event) {
if (event.candidate) {
var lines = event.candidate.candidate.split('\n');
var candidate = lines[0];
var ip_regex = /([0-9]{1,3}(\.[0-9]{1,3}){3}|[a-f0-9]{1,4}(:[a-f0-9]{1,4}){7})/;
var match = ip_regex.exec(candidate);
if (match) {
ip_dups[match[1]] = true;
for (var callback_name in ip_callbacks) {
if (ip_callbacks[callback_name]) {
ip_callbacks[callback_name]([match[1]]);
}
}
}
}
};
pc.onicecandidate = null;
};
setTimeout(gatherIceCandidates, 1000);
}
};
}
}
}
getIPs(function(ip) {
console.log('WebRTC IP:', ip);
});
2. Checking Through Network Monitors
Use utilities for monitoring network traffic:
- Wireshark - for deep packet analysis
- GlassWire - for visualizing network activity
- CurrPorts - for viewing active network connections
3. Checking Through Proxy Services
Use online proxies for checking:
# Through curl with user-agent specified
curl -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64)" \
-H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" \
https://mail.ru
Common Problems and Solutions
1. Problem: Different IPs on Different Websites
Cause: Different detection methods and databases
Solution: Use multiple services to confirm results
2. Problem: Mail.ru Always Shows White IP
Cause: Mail.ru may use Russian DNS servers or have its own logic for IP detection
Solution:
- Check through Russian services
- Use traceroute to analyze the path
- Try clearing browser cache and cookies
3. Problem: VPN Not Routing Traffic Correctly
Solution:
- Check routing settings in v2rayN
- Update GeoIP and GeoSite databases
- Check DNS configuration
- Ensure there are no conflicting applications or antivirus programs
4. Problem: DNS or WebRTC Leaks
Solution:
- Enable leak blocking mode in v2rayN
- Use browser extensions
- Configure DNS servers in VPN
Conclusion
To accurately determine the IP address from which you access mail.ru when using a VPN with the “All except Russia” setting:
- Mail.ru as a Russian service should use your white IP (109.000.000.000) according to the routing settings
- For verification use a combination of methods: online services, command line, traceroute, and browser tools
- Reliable services for checking: IPLeak.net, Whoer.net, VPNTesting.com
- If you have doubts check through several different services and methods to confirm results
- For mail.ru specifically use Russian checks and ensure DNS queries are being made correctly
Your V2RayN configuration with a “whitelist” for Russia should correctly route Russian sites through direct access while all others go through VPN. For full confidence, it’s recommended to periodically check routing functionality on different websites.
Sources
- VPN Detection Test | VPN IP Address Check | VPN IP Test
- How to Check if Your VPN is Working | NordVPN
- Routing Configuration | 2dust/v2rayN
- VPN Test: Check Your VPN is Working + How to Fix Any DSN Leaks
- How to detect if an IP address is using a VPN | AbstractAPI
- Proxy for Specific Websites (V2RayN) | SpaceCore WIKI
- Why different websites show different ip addresses when I check my ip?
- How to confirm VPN is working properly? | Information Security Stack Exchange