Dynamic DNS resolved to wrong IP
-
Hi,
I have an OpenVPN road warrior on a home IP, so I use FreeDNS to resolve my home IP.
Half of the time, it resolves the wrong home IP-address. So, sometimes it finds my home IP (94.95.x.x), and half of the time OpenVPN tries to connect to another IP (94.99.x.x), where, of course, no OpenVPN server is running and so OpenVPN won't connect.
As far as I can see this relates to FreeDNS then. I contacted them, but never got any replies.
Does anybody know how to fix this?
Or: a different free Dynamic DNS, and a tuto to set that up (each one is quite different, I discovered, to setup).
Thanks in advance for any help
-
Hi,
The pfSense DDNS client uses this :
to retrieve your WAN IP.
You could test if from pfSense : enter console, option 8 and enter
curl http://checkip.dyndns.org
In the html reply you should find your - correct - WAN IPv4.
Activate "Verbose logging" so you can when the wrong IP is set - this will be shown in the logs.
You have only one WAN, right ?Btw : FreeDNS doesn't invent an IP for you - because if so, you wouldn't be the only one impact by this bug on their side.
Without any details from you, I can only speculate. Like :your WAN IP is changing rather often, so the chance exists that the IP is wrong. Service like FreeDNS do not permit that you change the IP several times a day (this would overload their systems). So check how often your WAN IP changes.
-
Thank you for your reply.
I do have two WAN, WAN1 and WAN2. WAN2 is the default.
Your curl:
http://www.checkip.dyndns.org
resolves to the right WAN2 public IP fine, that is no problem.
However, the OpenVPN doesn't resolve that IP, it resolves a different one (which is also not WAN1, btw, it's a completely different IP). It should resolve 94.95.x.x, it resolves 94.99.x.x. As far as I can tell, it always resolves the same wrong IP.
"Officially" I do have a dynamic IP, but in practice it is static; it has been the same IP for over a year (WAN2, cable internet).
16:34:28.671 -- ----- OpenVPN Start ----- 16:34:28.671 -- EVENT: CORE_THREAD_ACTIVE 16:34:28.731 -- Frame=512/2048/512 mssfix-ctrl=1250 16:34:28.732 -- UNUSED OPTIONS 1 [persist-tun] 2 [persist-key] 4 [ncp-ciphers] [AES-256-GCM:AES-128-GCM] 6 [tls-client] 8 [resolv-retry] [infinite] 10 [verify-x509-name] [pfsense] [name] 12 [pkcs12] [pfsense-pfsense-TCP4-443-pfsense.p12] 16:34:28.732 -- EVENT: RESOLVE 16:34:28.737 -- Contacting 94.99.x.x:443 via TCP 16:34:28.738 -- EVENT: WAIT 16:34:38.744 -- Server poll timeout, trying next remote entry... 16:34:38.745 -- EVENT: RECONNECTING 16:34:38.747 -- EVENT: RESOLVE 16:34:38.751 -- Contacting 94.99.x.x:443 via TCP 16:34:38.752 -- EVENT: WAIT 16:34:48.749 -- Server poll timeout, trying next remote entry... 16:34:48.750 -- EVENT: RECONNECTING 16:34:48.753 -- EVENT: RESOLVE 16:34:48.783 -- Contacting 94.99.x.x:443 via TCP 16:34:48.783 -- EVENT: WAIT 16:34:58.752 -- Server poll timeout, trying next remote entry... 16:34:58.754 -- EVENT: RECONNECTING 16:34:58.761 -- EVENT: RESOLVE 16:34:59.213 -- Contacting 94.99.x.x:443 via TCP 16:34:59.214 -- EVENT: WAIT 16:35:08.756 -- Server poll timeout, trying next remote entry... 16:35:08.758 -- EVENT: RECONNECTING 16:35:08.763 -- EVENT: RESOLVE 16:35:08.933 -- Contacting 94.99.x.x:443 via TCP 16:35:08.934 -- EVENT: WAIT 16:35:18.770 -- Server poll timeout, trying next remote entry... 16:35:18.771 -- EVENT: RECONNECTING 16:35:18.776 -- EVENT: RESOLVE 16:35:18.793 -- Contacting 94.99.x.x:443 via TCP 16:35:18.795 -- EVENT: WAIT 16:35:20.511 -- EVENT: DISCONNECTED 16:35:20.527 -- EVENT: CORE_THREAD_INACTIVE 16:35:20.529 -- Tunnel bytes per CPU second: 0 16:35:20.530 -- ----- OpenVPN Stop -----
Thank you for help in this most annoying matter
-
@Gertjan said in Dynamic DNS resolved to wrong IP:
Activate "Verbose logging" so you can when the wrong IP is set - this will be shown in the logs.
You mean activate it in the DDNS client, right? There it resolves to the right IP. Only not in the VPN-client on my smartphone.