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