cloudflare-ddns icon indicating copy to clipboard operation
cloudflare-ddns copied to clipboard

Point to custom IP - content tag

Open s-ata opened this issue 11 months ago • 2 comments

It is unclear in the documentation how to modify the config.json to point a record to a custom IP instead of to the public IP of the server.

If there is a way to do so, how is it done?

Say the current record is like this:

{
  "cloudflare": [
    {
      "authentication": {
            XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
        }
      },
      "zone_id": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "subdomains": [
        {
          "name": "example",
          "proxied": true
        }

      ]
    }
  ],
  "a": true,
  "aaaa": true,
  "purgeUnknownRecords": false,
  "ttl": 300
}

It will point to the public IP addres of the server, but I would like to point it to "192.168.1.10", for example.

s-ata avatar Mar 25 '24 16:03 s-ata

You should check other projects such as caddy or nginx, which should allow you to do reverse proxy, which is what you're looking for.

aon avatar Apr 03 '24 22:04 aon

Thanks Aon, I get you can do it that way, but it is not exactly what I mean. I want to use the dns to point to a local IP directly.

In a normal case it should be easy to do it directly through the cloudflare internal dashboard, but just for the sake of having everything on a single config.json I wanted to write the entries here.

To explain in another way, the config file on the first post makes the entry example.mydomain.com point to my public ip address, where I have a service exposed to the internet, could be a proxy or anything else. I want a entry that points to a custom IP address. Not necessarily on my local network, but I want to edit it manually.

s-ata avatar Apr 04 '24 18:04 s-ata