I’ve finally solved a problem I was having with getting cloudflare to update my IP address.
I’m using OpenVPN, and just on a home cable connection – the IP changes periodically (frequently enough to be annoying).
Steps are as follows (high level):
- Register your domain name with Cloudflare (follow their instructions)
- Create an A record (I used “vpn”)
- Get your API key
- Log into your pfSense box and go to “Services / Dynamic DNS / Dynamic DNS Clients”
- Add a new client with the following settings:
- Service type – Cloudflare (dropdown)
- interface to monitor – WAN
- hostname – “vpn” (or whatever you set your A record to) in the first box, with your domain (e.g. “example.com”) in the second.
- Username is your cloudflare username, so likely your email address
- password = API key
- The click “Save & force update”
Check the DNS settings in cloudflare – it should the record updated. If you’re having issues, check the “verbose logging” box in pfSense page I just talked about, and then look at the logs in “Status / System / General”
If you’re using this with openVPN, I had had to use a custom hostname when I exported the client. All that has to be is “vpn.example.com” (or whatever you chose). You can test this with a simple nslookup.