Closed rnhmjoj closed 10 years ago
It should return the server's public IP, but it might not if there's a special network setup. I can't help troubleshoot unless I know more info about the server's network settings.
I don't think i have a strange setup. The server is just connect to a wifi router which is also the gateway.
OK, well, it's possible that you're being given an internal IP by the router. That might be OK though, you just need to make sure that your router has the proper ports open and mapped correctly to that internal IP and port pair.
The server is a DMZ and has a DHCP reservation. Dnschain works fine except for namecoin.dns.
How are you accessing it? Try explicitly putting http://
in front of it.
If that doesn't work, try explicitly setting the server's IP in the config like so:
[dns]
externalIP = 123.123.123.123
I used dig
to see what it resolves to. Try yourself: dig @95.236.82.147 namecoin.dns
Right, so in your config, do:
[dns]
externalIP = 95.236.82.147
*You'll need to restart DNSChain for it to notice any config changes.
Ok, this way it works but should't it pick the address on his own?
There's no simple way for it to know what that address is in your network setup. Your router hides that info from DNSChain. In some setups, the machine is given its public static IP directly instead of an internal one, in that case DNSChain does correctly figure it out.
One way to have it guess in all circumstances would be for it to connect to some "trusted central service", and have that service tell it what IP it sees, but we know how unreliable that can be... ;)
Ok, thank you.
Should gExternalIP return the server's public ip address or dnschain is supposed to work only in the same network of the server?