Dynamic DNS & Namecheap
-
Hi,
I been trying to find the answer to my problem but couldn't so I am posting this question:I have purchased a domain name with namecheap, at home I jave setup OpenVPN and its ready to go.
The thing as everyone knows, you need a static IP to know where is my server at home, but since I have a dynamic ip address, I would like to use something like here.mydomain.comWhere can I find a tutorial or someone to tell me the steps to setup here.mydomain.com so it shows my home IP address?
the mydomain.com is already pointing to a website I have built. So a subdomain would be the correct decision to set as the true ip address of my OpenVPN server.
Thanks everyone!
-
https://docs.netgate.com/pfsense/en/latest/dns/dynamic-dns.html
Personally I use freedns.afraid.org and very happy with it. It's very robust and totally free.-Rico
-
Thanks Rico for the reply, I will take a look at it but it would be nice to make use of my own here.mydomain.com instead of some other domain.
I had a while back but can't find it, once I find it again, I will make sure to make several backups on how to accomplish this :)
Hopefully someone can tell me how to do it.
-
In Namecheap you have to enable Dynamic DNS for your domain:
- Login to Namecheap
- Open the Domain List
- Find the domain in the list
- Click Manage
- Click Advanced DNS across the top
- Next to Dynamic DNS, change the slider to enabled
- Copy the random password it gives you
On pfSense:
- Navigate to Services > Dynamic DNS
- Click + Add
- Set Service Type to Namecheap
- Set the Hostname to
here
andmydomain.com
in the two boxes (host first, then domain) - Leave Username blank
- Set the Password and Confirm to the random password shown in the Namecheap DNS page
- Add a Description
- Click Save
-
Thank you !!
It works! Just for future reference, you will need to add the premium DNS in NameCheap to be able to get the Dynamic DNS option.Manny
-
You do not need their Premium DNS product for this. All of my domains using DynDNS are on "Namecheap Basic DNS" and it works fine.
-
if anyone else crosses by this thread from google search, here's additional steps to take on NameCheap's website.
Go to Domain List -> Domain -> Manage -> Advanced DNS
-Under "Host Records", click "Add New Record"
-Type = "A + Dynamic DNS Record"
-Host = create a hostname that you'll use here and in PfSense under "host" field. (e.g. "whatever")
-Set the value to "127.0.0.1"
-Click SaveWithin PfSense,
Where it says "hostname" use the same name (e.g. "whatever") that you just setup on NameCheap's website. All of the other directions are in the posts aboveAnd boom, works like a charm
-
Adding to this post since I thought I was having some issues and this post keeps coming up.
I had moved my namecheap dynamic DNS setup from another router and while I was confidant on the setup it looked like it was not working in pfSense.
Turns out it was working all along, it was just because it looks like namecheap is not sending a reply, so I guess the 200 isn't good enough for the UI. but switching the ip on namecheap to something else and forcing the update seems to work.
This is a redacted version of the logs I get back:
/services_dyndns_edit.php: Dynamic DNS: updatedns() starting /services_dyndns_edit.php: Dynamic DNS namecheap (example.domain.com): 203.0.113.1 extracted from local system. /services_dyndns_edit.php: Dynamic DNS (example.domain.com): running get_failover_interface for wan. found mvneta0 /services_dyndns_edit.php: Dynamic DNS namecheap (example.domain.com): _update() starting. /services_dyndns_edit.php: Response Header: HTTP/2 200 /services_dyndns_edit.php: Response Header: date: Tue, 21 Dec 2021 02:52:05 GMT /services_dyndns_edit.php: Response Header: content-type: application/json /services_dyndns_edit.php: Response Header: vary: Accept-Encoding /services_dyndns_edit.php: Response Header: set-cookie: .s=c5ab2e3c28b947b69cfc12aa3b216984; domain=.www.namecheap.com; path=/; httponly /services_dyndns_edit.php: Response Header: strict-transport-security: max-age=16000000; includeSubDomains /services_dyndns_edit.php: Response Header: strict-transport-security: max-age=16000000; includeSubDomains /services_dyndns_edit.php: Response Header: cf-cache-status: DYNAMIC /services_dyndns_edit.php: Response Header: expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct" /services_dyndns_edit.php: Response Header: server: cloudflare /services_dyndns_edit.php: Response Header: cf-ray: 6c0dcff68b98827b-IAD /services_dyndns_edit.php: Response Header: alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400, h3-28=":443"; ma=86400, h3-27=":443"; ma=86400 /services_dyndns_edit.php: Response Header: /services_dyndns_edit.php: Response Header: /services_dyndns_edit.php: Response Data: <?xml version="1.0" encoding="utf-16"?> <interface-response> <Command>SETDNSHOST</Command> <Language>eng</Language> <IP>203.0.113.1</IP> <ErrCount>0</ErrCount> <errors /> <ResponseCount>0</ResponseCount> <responses /> <Done>true</Done> <debug><![CDATA[]]></debug> </interface-response> /services_dyndns_edit.php: Dynamic DNS namecheap (example.domain.com): _checkStatus() starting. /services_dyndns_edit.php: phpDynDNS (example): PAYLOAD: <?xml version="1.0" encoding="utf-16"?> <interface-response> <Command>SETDNSHOST</Command> <Language>eng</Language> <IP>203.0.113.1</IP> <ErrCount>0</ErrCount> <errors /> <ResponseCount>0</ResponseCount> <responses /> <Done>true</Done> <debug><![CDATA[]]></debug> </interface-response> /services_dyndns_edit.php: phpDynDNS (example): (Unknown Response)
-
@mgodinez said in Dynamic DNS & Namecheap:
but since I have a dynamic ip address
Just a point of discussion - nothing wrong with having a ddns setup. But does your IP really change? I have had the same dynamic IP for going on 3 years now.. And with my previous ISP same IP for like 5 I believe without it changing. They had redone their IP space there once - if not would of been more like 10 years on the same IP.
Unless your turning off your router for extended periods, or change its mac normally you would just continue to renew your IP. Unless your isp is forcing a change to the IP for some crazy reason, or they redo their IP space for a region, etc.
If you have your router on 24/7 and it doesn't go offline for an extended amount of time you should just keep the same IP be it dynamic assigned or not.
-
@johnpoz said in Dynamic DNS & Namecheap:
Just a point of discussion - nothing wrong with having a ddns setup. But does your IP really change?
Here almost all ISPs give you a different public IP on every modem reboot. So DDNS services are really required for all inbound traffic.
Just my .02... -
@psp curious how they know your device rebooted? The dhcp client on even reboot of the device should at first still request is old IP before it sends out a discover.
Not saying it doesn't happen, just hasn't been my experience here in the US on any of the many ISPs have had over the years, nor any of isp have even dealt with for other users..
With many countries that require logging of IPs to users, etc. and traffic they go to - would seem odd that they would make their lives more difficult by changing the IP they give them at the drop of hat is all.
-
@johnpoz said in Dynamic DNS & Namecheap:
With many countries that require logging of IPs to users, etc. and traffic they go to - would seem odd that they would make their lives more difficult by changing the IP they give them at the drop of hat is all.
You are absolutely right. Even here (IT) we are required to keep those logs but they simply choose the hard way (i.e. logs every UserAuth/MAC -- IP association event).
-
@hossimo said in Dynamic DNS & Namecheap:
/services_dyndns_edit.php: phpDynDNS (example): (Unknown Response)
There was a recent thread about this and Namecheap...seems they are returning UTF-16 encoded text which is not being parsed by PHP correctly and hence failing to read the response. In the linked Reddit thread they acknowledge it's their issue.
-
@johnpoz For the most part my IP at home does not change between reboots, however it does sometimes (randomly), and given a travel a fair amount I use the dynamic DNS entry to access my VPN when I'm traveling so I don't get locked out.
-
@hossimo said in Dynamic DNS & Namecheap:
however it does sometimes (randomly)
Agreed - never hurts to have a fallback if this happens.. But generally speaking and I only bring it up as a point of discussion related to the topic.. Quite often users think they "have to have" ddns when their IP might be the same for years at a time, etc..
Just because its handed to you via dhcp, doesn't mean it changes as the wind blows ;)
you need a static IP
From OP comment was my point of discussion.
-
Can confirm the same issue here using Namecheap with pfsense. The config will update the IP fine, but it doesn't reflect this in the pfsense GUI, and the logs show the "/services_dyndns_edit.php: phpDynDNS (XXX): (Unknown Response)" error.
-
@zoltrix said in Dynamic DNS & Namecheap:
Can confirm
The issue left is : the DDNS text is showing a red 'failed' message, but the IP was updated. So your host name does point yo your actual WAN IP. It's just a 'visual' thing in the pfSense right now.
As cheapname confirmed that they changed something on their side, the solution is 'waiting'. -
Thanks Jangert
-
@gertjan Also experiencing this. If you use the namecheap http update method, then you do get a green tick in the gui. As its been said above, the ip address still updates.
-
we should enter a bug report I guess
-
@zoltrix said in Dynamic DNS & Namecheap:
we should enter a bug report I guess
Some one - here on this forum, or on reddit, wrote that the namecheap support has confirmed the issue, as 'something' on their side was changed (not pfSense, we use all the same version / scripts ) and that they, namecheap, will correct it.
For the record, as the brand of the company implies, they do not have a huge budget, so this will take some time.
In the future, they will correct he issue on their side, and everything will be fine again.
For the time being, a work around exists.If pfSense get patched now, and namecheap correct the issue afterwards, the problem will re start all over again, and the patch has to be removed by updating pfSense again.
edit : Btw : if a bug report has to be opened : go head : good idea. But use the namecheap bug reporter @namecheap - if they have one ....
-
@gertjan said in Dynamic DNS & Namecheap:
For the record, as the brand of the company implies, they do not have a huge budget, so this will take some time.
Maybe done some homework first.
Namecheap had over $200 million in revenue in 2020, which was up 35%, or $51.6 million, over the $149 million it posted in 2019.
It has 11 million registered users and 10 million domains.
-
@zoltrix I think that was meant as joke ;)
But they could have 1 Billion in revenue, doesn't mean they spend any of that on development ;)
The issue comes down to, if pfsense didn't change anything, and it stopped working because namecheap did change something. Do you also change pfsense to accommodate whatever changed (can you even?), or is namecheap going to change/fix what they did or forget to add or whatever.
-
@johnpoz said in Dynamic DNS & Namecheap:
I think that was meant as joke
Yeah, hope so.
@zoltrix said in Dynamic DNS & Namecheap:
Namecheap had over $200 million in revenue in 2020, which was up 35%, or $51.6 million, over the $149 million it posted in 2019.
I didn't fact-check that, but I tend to believe the numbers. I 'know' who namecheap is.
They have probably also an 'owner' or share holders, or whatever. And now we reached the point : Who comes first :
The 'clients' ?
The the share holders ?I'm pretty sure, if some one at namecheap sits down for one hour or so, the issue will be solved. One hour !
But noooop - xx thousand of clients will have to wait for weeks - now months.Btw : I say up front : I have nothing against namecheap - neither against the concept as companies and how they work and their goals. I'm working for a company - and the idea is mainly : making € (no $ here).
And making fun, of course.And also : again :
They have confirmed : they introduce the issue.
They fix it.
Or they shall feel the power of Free DynDNS service.
Although that won't touch them financially, as the service is free - and is this might be the actual reason why all this takes so long ;) -
-
-
@zoltrix said in Dynamic DNS & Namecheap:
logs show the "/services_dyndns_edit.php: phpDynDNS (XXX): (Unknown Response)" error.
https://redmine.pfsense.org/issues/12816
There is a patch in the new System Patches 2.0 package. (recommended patches are now listed in it)
I do not get the unknown response error when clicking Save and Force Update. I get "(Success) IP Address Updated Successfully!" but 2-3 minutes later the page times out and it logs a " *406 upstream timed out (60: Operation timed out) while reading response header from upstream" error.
-
This post is deleted! -
@steveits said in Dynamic DNS & Namecheap:
@zoltrix said in Dynamic DNS & Namecheap:
logs show the "/services_dyndns_edit.php: phpDynDNS (XXX): (Unknown Response)" error.
https://redmine.pfsense.org/issues/12816
There is a patch in the new System Patches 2.0 package. (recommended patches are now listed in it)
I do not get the unknown response error when clicking Save and Force Update. I get "(Success) IP Address Updated Successfully!" but 2-3 minutes later the page times out and it logs a " *406 upstream timed out (60: Operation timed out) while reading response header from upstream" error.
This patch doesn't work anymore, but there's an updated one that works here:
https://github.com/pfsense/pfsense/commit/70db168b7f7eb4d4e702f965aa4956e93340575f?diff=unified
-
@thearamadon thanks, worked perfect!
-
@steveits Can confirm, this fix works for me on pfSense Plus 22.05 to fix my namecheap dynDNS problem.
System Patches ID: 70db168b7f7eb4d4e702f965aa4956e93340575f
Thanks!
-
@mooky1977 cool, let's hope it gets rolled into the next pfsense release.
-
@zoltrix I can guarantee it... https://docs.netgate.com/pfsense/en/latest/releases/23-01.html
-
-
@zoltrix said in Dynamic DNS & Namecheap:
off the mark
My point of view :
2020 : namecheap changed the text value when an IP was updated.
Like "IP was accepted" to "IP was changed".
On the pfSense side, the "IP was changed" didn't match as an "Ok" result, so, to be safe, it was treated as an no-ok resulat, the GUI showed a red IP message.
But : surprise : the IP was updated on the namecheap side.
Then, several month later, the returned text values changed again.
To make dyndns namedcheap work again, code had to change again on the pfSense side.
This is just what I could call "development", not really a bug. The results is always : it doesn't work anymore for the end user.
This year, the same thing happened.
A pfSense bug ? Noop, namecheap changed the returned text value again.
Like (example) "From "Ok" to "OK".Now I have my ideas why they do this.
What I don't get is : no messages on whatever media to explain that something has changed.
And because we are all curious, and some of us even want to learn and understand why things have changed.
But nothing.
Just a confirmation on the namecheap forums, months later : "yep, something changed". -
Hi @jimp, @johnpoz, @gertjan, thanks for all of your hard work on pfSense! I shudder to think what my world would be like without it.
Question for those of you who use Namecheap for DDNS. Is it possible to use Namecheap Web hosting DNS (aka cPanel) with pfSense DDNS? Or will I need to move my DNS records to Namecheap's BasicDNS to set things up using the instructions @jimp has given above (I suspect the answer is "yes")?
Having created DDNS records in the Namecheap Web hosting DNS's cPanel UI, the records created provide a URL to use for DDNS, not a password. Without passwords it seems I'm at an impasse.
@jamesg246 refers to a "namecheap http update method" in this thread. I suspect I could use this with the cPanel DDNS. Could someone point me at directions for how to set this up?
Or feel free to tell me I'm trying to do the impossible (or silly) and would be wise to take the time and move my DNS records from cPanel to their Basic DNS.
Thanks!
-
@renarde3 I just have regular namecheap domain hosting. click on manage, then the advanced dns tab.
https://www.namecheap.com/support/knowledgebase/article.aspx/36/11/how-do-i-start-using-dynamic-dns/
using pfsense+ 22.05, I used the patch refrenced above, but installed 23.01-RC yesterday and removed that and one other patch. all working great!
-
Hi @cloudless-smart-home, thanks for your quick response.
I've successfully set up the DDNS records in the Namecheap Webhosting (aka cPanel) UI, but have not been able to figure out how to use the URLs it generates to communicate with the DDNS clients I have set up in pfSense. That's where I'm getting stuck.
From this image in the Namecheap Domain List, I suspect I need to switch to their BasicDNS (Webhosting DNS) to make this work. I was hoping to get confirmation before I have to recreate my DNS entries.
-
@renarde3
https://www.namecheap.com/support/knowledgebase/article.aspx/36/11/how-do-i-start-using-dynamic-dns/will walk you through the process. look at the other links on that page too if it's not clear.
https://www.namecheap.com/support/knowledgebase/article.aspx/595/11/how-do-i-enable-dynamic-dns-for-a-domain/
-
Hi @cloudless-smart-home, thanks again for the links.
I changed the Namecheap DNS I was using from Webhosting to BasicDNS. Then I was able to follow @jimp's instructions as posted above.
It was a pain having to move all of my DNS entries from cPanel to their BasicDNS (the Advanced DNS UI for entering records is klunky) but at least it's done now, and the DDNS entries are correctly pulling the WAN IP from the pfSense gateway.
Thanks!
-
Wanted to update for 2024. I'm moving over from a google domain (using DDNS and PFsense) because they moving all domains to square space. Square space doesn't have DDNS from what I can tell. I transferred my domain to Namecheap. Flowed instructions by @jimp for the most part except added multiple hosts for different locations and services (OpenVPN, Nextcloud... other stuff).
If transferring from google to namecheap:
No special account required- Navigate to Domain List -> your.domain -> Manage -> Domain
- Next to NAMESERVERS change from "custom DNS" to "namecheap Basic DNS"
In Namecheap enable Dynamic DNS for your domain:
- Navigate to Domain List -> your.domain -> Manage -> Advanced DNS
- Next to Dynamic DNS, change the slider to enabled
- Copy the random password for later
- Under Dynamic DNS, click the plus to add
- Type = "A + Dynamic DNS Record"
- Host = "yourhost"
- Value = "127.0.0.0" (can be anything really, this will update)
- TTL = "Automatic"
On pfSense:
- Navigate to Services -> Dynamic DNS
- + Add
- Service Type = "Namecheap"
- Hostname = "yourhost" "your.domain" (respectively in the two boxes)
- Username = (leave blank)
- Password = random password copied from Namecheap Dynamic DNS section
- "Save and force" should update the the IP listed under the value on the Namecheap record after a refresh (from 127.0.0.0 to your public IP)
-
Not directly linked to NameCheap, but may be useful for most users here: