[PYTHON] Automatically update your name.com DNS records from Linux

Thing you want to do

I want to automatically update the A record of the DNS server (dns01.gmoserver.jp or dns02.gmoserver.jp) of your name.com from the Linux server in order to operate with "home server + name mail" (I want to use cron)

Background

  1. Buy a domain at your name.com
  2. Operate a web server on your home server + myDNS
  3. I want an email address for the domain I bought
  4. Name email Contract
  5. "What? Isn't it possible to use name mail with MyDNS? ?? 』\

I want stability, so I want to use an external service instead of my home (I have a contract, so I want to use my name mail)

problem

There are multiple DNS servers for your name.com, and the DNS server for SD server does not have software or scripts for updating records (should be). ). (Note: Even if you contract with your name mail alone, it will be treated as an SD server. For the DNS server of your name.com, [Support](http://help.onamae.com/app/answers/detail/a_id/8075/ ~ /% E3% 80% 90% E3% 83% 89% E3% 83% A1% E3% 82% A4% E3% 83% B3% E3% 80% 91% E3% 83% 89% E3% 83% A1 % E3% 82% A4% E3% 83% B3% E3% 81% AE% E3% 83% 8D% E3% 83% BC% E3% 83% A0% E3% 82% B5% E3% 83% BC% E3 % 83% 90% E3% 83% BC% E6% 83% 85% E5% A0% B1% E3% 82% 92% E5% A4% 89% E6% 9B% B4% E3% 81% 97% E3% 81 % AA% E3% 81% 91% E3% 82% 8C% E3% 81% B0% E3% 81% AA% E3% 82% 89% E3% 81% AA% E3% 81% 84% E3% 81% AE % E3% 81% AF% E3% 81% A9% E3% 82% 93% E3% 81% AA% E5% A0% B4% E5% 90% 88% EF% BC% 9F)

In the case of a DNS server (01.dnsv.jp, etc.) that does not use a rental server, [Update software for Windows has been released from Name.com](http://www.onamae.com/ option / dnsrecord /), so I think you should use it. (It is inconvenient not to have it for UNIX / Linux)

What i did

Using Selenium and PhantomJS, I prepared a bot for automatic update. https://github.com/n-taka/onamaeDNS The file name is * .py for convenience, but if you use cron, you need to remove the extension (should) In some places, error handling is appropriate at this time.

Afterword

It is not good to bother your name.com side, so if you use it, please update it at a common sense frequency. Well, how much demand there is for "home server + name mail" is subtle ... "Stop updating with bots! !! ], Etc., we will take measures such as suspending the publication of the relevant script only when the person related to Name.com contacts us.

Recommended Posts

Automatically update your name.com DNS records from Linux
[Linux] DNS settings