CINXE.COM

Client IP addresses

<!DOCTYPE html> <html> <head> <title>Client IP addresses</title> </head> <body onload="getAddresses()"> <script type="text/javascript"> function httpGetAsync(theUrl, elementId) { var xmlHttp = new XMLHttpRequest(); xmlHttp.onreadystatechange = function() { if(xmlHttp.readyState < 4) text = "..."; else if(xmlHttp.readyState == 4 ) { if(xmlHttp.status == 200) text = xmlHttp.responseText; else text = "N/A"; } document.getElementById(elementId).innerHTML = text; } xmlHttp.open("GET", theUrl, true); // true for asynchronous xmlHttp.send(null); } function getAddresses() { httpGetAsync("http://ipv4.internal.net.bme.hu/", "v4i"); httpGetAsync("http://ipv6.internal.net.bme.hu/", "v6i"); httpGetAsync("http://ipv4.external.net.bme.hu/", "v4e"); httpGetAsync("http://ipv6.external.net.bme.hu/", "v6e"); } </script> <h2>Your source address</h2> <p>as seen in BMENET <ul> <p>IPv4: <strong><span id="v4i">JavaScript not started</span></strong> <p>IPv6: <strong><span id="v6i">JavaScript not started</span></strong> </ul> <p>as seen outside of BMENET <ul> <p>IPv4: <strong><span id="v4e">JavaScript not started</span></strong> <p>IPv6: <strong><span id="v6e">JavaScript not started</span></strong> </ul> </body> </html>