-1

I recently bought and RDp and everything went well, and i made a little script in .as (can't show it on here) which bounds to my local ip, e.g. 192.168.42.1, but when I tried the same on another rdp I got this: http://prntscr.com/6hywkm , a very odd IP, can anyone explain me how this comes and how to fix it(getting back a normal local ip 192.168.x.x)

Thanks.

alga tronic
  • 46
  • 1
  • 7

2 Answers2

1

seems like a IPv6 Address, so converting them to back to IPv4 ( like 127.0.0.1 ) is not possible all the time, so here is snippet in javascript which might help you out:

but keep in mind that its not always possible!

<script>
function parseIp6(str)
{
  //init
  var ar=new Array;
  for(var i=0;i<8;i++)ar[i]=0;
  //check for trivial IPs
  if(str=="::")return ar;
  //parse
  var sar=str.split(':');
  var slen=sar.length;
  if(slen>8)slen=8;
  var j=0;
  for(var i=0;i<slen;i++){
    //this is a "::", switch to end-run mode
    if(i && sar[i]==""){j=9-slen+i;continue;}
    ar[j]=parseInt("0x0"+sar[i]);
    j++;
  }

  return ar;
}
function ipcnvfrom6(ip6)
{
  var ip6=parseIp6(ip6);
  var ip4=(ip6[6]>>8)+"."+(ip6[6]&0xff)+"."+(ip6[7]>>8)+"."+(ip6[7]&0xff);
  return ip4;
}
alert(ipcnvfrom6("::C0A8:4A07"));
</script>
1

It's an IPv6 structure. Online convertor exists : http://www.subnetonline.com/pages/subnet-calculators/ipv4-to-ipv6-converter.php but the conversion is not always possible.