Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Dynamic DNS & Namecheap

    Scheduled Pinned Locked Moved DHCP and DNS
    40 Posts 17 Posters 20.4k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      mgodinez
      last edited by

      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.com

      Where 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!

      johnpozJ 1 Reply Last reply Reply Quote 0
      • RicoR
        Rico LAYER 8 Rebel Alliance
        last edited by

        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

        1 Reply Last reply Reply Quote 0
        • M
          mgodinez
          last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            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 and mydomain.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

            Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

            1 Reply Last reply Reply Quote 6
            • M
              mgodinez
              last edited by

              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

              1 Reply Last reply Reply Quote 0
              • jimpJ
                jimp Rebel Alliance Developer Netgate
                last edited by jimp

                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.

                Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

                Need help fast? Netgate Global Support!

                Do not Chat/PM for help!

                1 Reply Last reply Reply Quote 0
                • C
                  CCNewb
                  last edited by

                  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 Save

                  Within 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 above

                  And boom, works like a charm

                  H 1 Reply Last reply Reply Quote 4
                  • H
                    Hossimo @CCNewb
                    last edited by

                    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.

                    cc224db7-c4e4-49c1-8cf3-68956485e710-image.png

                    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)
                    
                    S 1 Reply Last reply Reply Quote 1
                    • johnpozJ
                      johnpoz LAYER 8 Global Moderator @mgodinez
                      last edited by johnpoz

                      @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.

                      An intelligent man is sometimes forced to be drunk to spend time with his fools
                      If you get confused: Listen to the Music Play
                      Please don't Chat/PM me for help, unless mod related
                      SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                      P 1 Reply Last reply Reply Quote 0
                      • P
                        psp @johnpoz
                        last edited by psp

                        @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...

                        johnpozJ 1 Reply Last reply Reply Quote 0
                        • johnpozJ
                          johnpoz LAYER 8 Global Moderator @psp
                          last edited by johnpoz

                          @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.

                          An intelligent man is sometimes forced to be drunk to spend time with his fools
                          If you get confused: Listen to the Music Play
                          Please don't Chat/PM me for help, unless mod related
                          SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                          P H 2 Replies Last reply Reply Quote 0
                          • P
                            psp @johnpoz
                            last edited by

                            @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).

                            1 Reply Last reply Reply Quote 0
                            • S
                              SteveITS Galactic Empire @Hossimo
                              last edited by

                              @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.

                              Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
                              When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
                              Upvote ๐Ÿ‘ helpful posts!

                              1 Reply Last reply Reply Quote 1
                              • H
                                Hossimo @johnpoz
                                last edited by

                                @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.

                                johnpozJ 1 Reply Last reply Reply Quote 0
                                • johnpozJ
                                  johnpoz LAYER 8 Global Moderator @Hossimo
                                  last edited by johnpoz

                                  @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.

                                  An intelligent man is sometimes forced to be drunk to spend time with his fools
                                  If you get confused: Listen to the Music Play
                                  Please don't Chat/PM me for help, unless mod related
                                  SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                                  Z 1 Reply Last reply Reply Quote 0
                                  • Z
                                    Zoltrix @johnpoz
                                    last edited by

                                    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.

                                    GertjanG S 2 Replies Last reply Reply Quote 0
                                    • GertjanG
                                      Gertjan @Zoltrix
                                      last edited by

                                      @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'.

                                      No "help me" PM's please. Use the forum, the community will thank you.
                                      Edit : and where are the logs ??

                                      Z J 2 Replies Last reply Reply Quote 0
                                      • Z
                                        Zoltrix @Gertjan
                                        last edited by

                                        Thanks Jangert

                                        1 Reply Last reply Reply Quote 0
                                        • J
                                          jamesg246 @Gertjan
                                          last edited by

                                          @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.

                                          Z 1 Reply Last reply Reply Quote 1
                                          • Z
                                            Zoltrix @jamesg246
                                            last edited by

                                            we should enter a bug report I guess

                                            GertjanG 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.