Search This Blog

Friday 22 January 2016

Godaddy Dynamic DNS configuration.

I found some of very good article in internet for configuring dynamic IP configuration with Godaddy.

Below is the steps I used to achieve the same.

1- Install required python modules.

  #yum install install python python-pip
  #pip install pif
  #pip install pygodaddy
  #pip install pyopenssl ndg-httpsclient pyasn1


2. replace client.py and __init__.py  with below files as the authentication changes in godaddy has been fixed in new files.

 Replace /usr/lib/python2.7/site-packages/pygodaddy/  with https://github.com/BryceGough/pygodaddy/blob/master/pygodaddy/client.py
Replace /usr/lib/python2.7/site-packages/pygodaddy/__init__.py with https://raw.githubusercontent.com/BryceGough/pygodaddy/master/pygodaddy/__init__.py


3. Download below Symple python script to update a host A record in a GoDaddy hosted DNS zone

#wget https://github.com/johanreinalda/godaddy_dynamic_dns/archive/master.zip
#unzip master.zip
#cd godaddy_dynamic_dns-master
Create below files to store current IP and logs.

#touch  current_ip 
#touch  godaddy.log

4. Edit configuration files update.py

GODADDY_USERNAME="username"
GODADDY_PASSWORD="Password"
LOGFILE='godaddy.log'
IPFILE='current_ip'

Replace below line with your hostname in godaddy. (here i put blog). on line number 53.

 if dns_record.hostname == 'blog': 

5. now you can run the update.py like below.

# python update.py
ip is the same.. not doing anything






Ref:https://github.com/BryceGough/pygodaddy
Ref: https://github.com/johanreinalda/godaddy_dynamic_dns