A records with dynamic dns

I’ve been working to get HAProxy working on PFSense, and finally got it. Thank you, Tom. You can see my recent topic at:

Haproxy - access within LAN, not through WAN

Anyway, I’m wondering about the A records I set up on Digital Ocean. I have dynamic DNS and I’m using ddns.example_com as the name used in PFSense to update Digital Ocean’s pointer to my IP’s current address. All of the A records for my HAProxy subdomains point to the same IP address. I just typed them in.

In the interest of not being surprised when my provider renews the IP address, what will happen to the A records for my HAProxy subdomain names?

Should I be using cname records, and will I need to do something to prevent the fqdn from looking something like photo.ddns.example.com?

CNAMEs are usually the way to go. Keep the A record for ddns.example.com that gets updated dynamically and replace the subdomain entries with CNAMEs which point to ddns.example.com for photo.example.com, etc. Reverse proxies don’t care how the domains they serve are resolved.

Thank you, Paolo, for your response.

NOTE: example_com is expressed this way to avoid complaints of links in the messages.

I took a working A record - meaning I had an A record with photo.example_com and it was working. The value of the IP was hard coded and matched the one that was automatically updated by pfsense as part of DDNS service.

I then deleted the A record and added a CNAME record and put in photo as the host and ddns.examle_com as the “is alias of” field. Saved it. I now see photo.example_com is an alias of photo.example_com. But it does not work.

This site can’t be reached

Is there any subtle attribute I am missing?

Thanks for any tips.

is a pretty broad error message. What other details does the browser show? Usually there is a button like ‘show details’ or something.

I would first verify that the DNS record works properly using a tool like nslookup. Or even a simple ping might work, as that resolves the address and shows it to you.

I assume this is just a mistake in the post and actually correct in the DNS settings because it doesn’t make sense like this.

I’m back to try to learn how to set up ddns from my pfsense to digital ocean.

The underscore is because as a newbie it keeps telling my I can only post a certain number of links in my posts. So I am using example_com to mean example.com.

I’m working on a comprehensive approach, as everyone is, of course, and I need a dynamic IP address to refresh my wan connection ip when my provider changes it.

I have an A record that I set up in digital ocean, but in experimenting I used a specific IP that I’ll use for one of my inbound haproxy connections (with acme certs, etc).

It seems the process might be that I’ll need an A record for every incoming domain I use for my haproxy sites? Yes? No?

I would like to have a dedicated connection for ddns - period. It does nothing but give me a single ddns connection for my main wan. If I have another WAN, then another dedicated ddns setup.

Then, as I see Tom doing in a video, he has a unique A record for each haproxied server. When I try to create an A record it want’s a specific IP which I could type in (same as my current ddns) ; but it’s not associated with my ddns. How does he associate an A record with ddns?

This is why I think I must need a unique DDNS record in pfsense, for every domain name A record that I want to configure with HAProxy… Very tedious.

Thanks for any hints.