-
Notifications
You must be signed in to change notification settings - Fork 7
FreeDNS API
dnsapi.ini
record template:
# FreeDNS dns_cookie value
freedns xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
domains.ini
record template:
# FreeDNS Domain ID
example1.com example1 freedns xxxxxx
It's not an API as such, but mimicking the form post from the regular Web UI works for adding records. The needed information is:
- The value of the
dns_cookie
cookie from your browser, for authentication. - The domain ID of the domain you want to add the record to.
The easiest way to get the dns_cookie
value is to log on to FreeDNS through your browser, then bring up the cookie manager and find the cookies belonging to freedns.afraid.org
. In FireFox, go into Preferences, Privacy, and use the "remove individual cookies" link. Type "freedns.afraid.org" into the search box there, select the dns_cookie
entry and copy the value listed for "Content". Paste that into your dnsapi.ini
file on the line for the freedns
API, replacing the string of x's (beneath the "dns_cookie value" heading) in the example dnsapi.ini
file. If your browser cookie is ever invalidated you may need to repeat this process.
The domain ID can be found by logging in to FreeDNS through your browser and selecting the "Domains" link on the left-hand side. Locate the domain you need the ID for and click the "View Hosts/Delete" link. The URL your browser shows will end with "&domain_id=" followed by a number. That number's the domain ID for that domain. Copy it onto the line for the domain in your domains.ini
file after the "freedns" that identifies the domain as being hosted at FreeDNS. It goes in place of the string of x's on the example1.com
line in the example domains.ini
file. Repeat this process for every domain you need to configure for FreeDNS.