Python Script to automaticaly change IP of a DNS A record for a OVH Can update root Domain Record or SubDomain Record
Go inside the corresponding URL and create an application to interact with your OVH Account:
- OVH Europe
- OVH US
- OVH North-America
- So you Start Europe
- So you Start North America
- Kimsufi Europe
- Kimsufi North America
Complete the file ovh-dns-change-ip.conf
with your Endpoint, Application Key, Secret and the URL of your Domain and SubDomain (if neccesary)
[OVH-INFO]
Endpoint=ovh-eu
#To create an application go to https://eu.api.ovh.com/createApp/ (for OVH Europe)
ApplicationKey = [APPLICATION_KEY]
ApplicationSecret = [APPLICATION_SECRET]
[DNS-INFO]
DomainName = twallois.fr
SubDomainName =
Install the python3 requirements:
pip3 install -r requirements.txt
Run the Python Script with --setup
argument to ask to OVH to allow your application for some OVH APIs
python3 ./ovh-dns-change-ip.py --setup
You will need to go inside a website to allow the application
Configuration is Done
To modify the IP inside the OVH DNS Record you just need to run the script
python3 ./ovh-dns-change-ip.py
If the IP inside OVH DNS is not your current IP, the DNS record will be update Add the script inside a cron to automaticaly update your IP
Enjoy,