1. Log into your Namecheap account and select the domain you want to configure from the Domain List via the MANAGE button. For the purpose of having a concrete example in this write-up, let’s assume our domain is blockchainhero.com and we want to set up edgerouter.blockchainhero.com to always point to our home network.
2. Before we change anything, it’s important to point out that this guide will only work if your domain is using Namecheap name servers. On the Domain tab verify that Namecheap BasicDNS is selected as your Nameserver.
3. Select the Advanced DNS option from the tab bar
4. Add a new record to the HOST RECORDS section:
- Type: Namecheap has an option specifically intended for dynamic DNS set ups in
A + Dynamic DNS Recordso that’s what we will choose here.
edgerouter– As stated above, since we want to set up edgerouter.blockchainhero.com as our dynamic DNS address, we put the subdomain part here. Replace this as appropriate for your particular configuration.
- IP Address: For now let’s just put some dummy value in here, say
220.127.116.11which is (one of) Google’s IP addresses for google.com. By the end of this tutorial, if we configure everything correctly, this value will change.
- TTL: Unless you have a specific reason not to, leave this as
5. Click the green checkbox or Save All Changes. Your entry should look something like this:
6. Enable Dynamic DNS by flipping the toggle on. Take note of the auto-generated Dynamic DNS Password as we will need it later.
7. That’s it for our Namecheap setup! Let’s move onto configuring our Edgerouter.
6. Log into your Edgerouter’s web console. By default it’ll be at https://192.168.1.1/ but you may have changed it. For the sake of this write-up I’m going to assume you’ve already set up your home network.
1. Click the Services tab, and then the DNS tab
2. Add a DDNS Interface. For the values:
- Interface: set your WAN facing interface here. Your WAN facing interface is the one that’s internet facing, i.e. connected to your ISP’s modem router
- Web: Select
URLfrom the drop-down, and set the value to:
/getip. What is this seemingly arbitrary URL? If you visit this address using your web browser, you’ll see an otherwise blank page containing only your public IP address. Park Your Domain is a site/service that facilitates dynamic DNS set ups. As far as I can tell, it’s operated by Namecheap. How does your Edgerouter know what your home network’s public IP address is? It visits the URL you set here and parses the value (which is expected to be, or at least contain, your IP address).
- Web-skip: We’ll leave this blank. Since
/getipcontains your public IP address with no other text, we don’t need this. If you used some other service which page contents are something like
IP Address: 18.104.22.168, we can use this Web-skip to “skip over” the
IP Address:part thus isolating just the IP address itself.
edgerouter– this should be the same as the Host value you set up in Namecheap’s Host record.
blockchainhero.com– this is your domain name.
- Password: Put the Dynamic DNS Password we auto-generated earlier into here.
- Protocol: Leave on the default blank (-) option
3. Click Apply.
As far as I can tell, every so often your Edgerouter will poll the Web URL specified, and if the listed IP address changes, it’ll notify Namecheap via the Server and API credentials you provided (Login/Password).
You can verify this is all working via:
EdgeOS logs – From the Toolbox drop-down (upper right), select Log Monitor. If you see a log along the lines of:
ubnt ddclient: SUCCESS: updating edgerouter: good: IP address set to 22.214.171.124
You are good to go. If not, double check your work. If you are sure everything is correct, you can try the Force Update (but not too often for risk of getting blacklisted).
Namecheap console – Verify that the IP address has changed from the Google address we set earlier to your own public IP address.
And the ultimate verification – visiting edgerouter.blockchainhero.com.