Skip to content

Pythonscript to update A-Records via API on the Infomaniak Nameserver

Notifications You must be signed in to change notification settings

tsueri/update_Infomaniak_DNS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

update_Infomaniak_DNS

This is a pythonscript to update A-Records via API on the Infomaniak nameserver.

The Infomaniak API is not documented to modify DNS-Records. So I created this one. Use at your own risk!

You need a API-Key from here. Scope is DOMAIN.

Usage

Export INFOMANIAK_API_TOKEN

export INFOMANIAK_API_TOKEN="your_infomaniak_api_token"

Add an A Record

python manage_dns_records.py <domain> <source> <target> add

Example for the root domain:

python manage_dns_records.py example.com . 123.124.125.126 add

Example for a subdomain:

python manage_dns_records.py example.com www 123.124.125.126 add

Delete an A Record

python manage_dns_records.py <domain> <source> <target> delete

Example for the root domain:

python manage_dns_records.py example.com . 123.124.125.126 delete

Example for a subdomain:

python manage_dns_records.py example.com www 123.124.125.126 delete

Update an A Record

python manage_dns_records.py <domain> <source> <old_target> update <new_target>

Example for the root domain:

python manage_dns_records.py example.com . 123.124.125.126 update 231.232.233.324

Example for a subdomain:

python manage_dns_records.py example.com www 123.124.125.126 update 231.232.233.324

Footnote

This script is inspired from their certbot-script.

About

Pythonscript to update A-Records via API on the Infomaniak Nameserver

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages