Use CloudFlare dynamic domain name under Ubuntu

Source: Internet
Author: User
Tags cloudflare

Demand

First make sure you have an own domain name, then log in to CloudFlare and add your domain name. Follow the instructions and use the default values given by it. You will have cloudflare to host your domain, so you need to adjust your registration authority settings. If you want to use a subdomain, add a ' a ' record to it. Currently, any IP address is available.

Ddclient is a Perl client that updates dynamic DNS entries under the Dynamic DNS Network service provider account. It was originally written by Paul Bally and is now mostly done by Vimpanko. It can do more than just dynamic DNS, but it can also get your WAN port IP address in several different ways.

One feature of CloudFlare is that it allows you to update your DNS records via API or command line scripts called Ddclient. Either way, the results are the same, and it's a freeware.

Unfortunately, Ddclient is not ready to use in CloudFlare. It needs to be patched, and here's how to hack it on Debian or Ubuntu, and it can work on a raspbian with Raspberry Pi.

Install Ddclient on Ubuntu

Open the terminal and run the following command

sudo apt-get install ddclient

Now you need to use the following command to install the patch

sudo apt-get install curl sendmail Libjson-any-perl Libio-socket-ssl-perlcurl-o http://blog.peter-r.co.uk/uploads/ Ddclient-3.8.0-cloudflare-22-6-2014.patchsudo Patch/usr/sbin/ddclient < Ddclient-3.8.0-cloudflare-22-6-2014.patch

The above command is used to complete ddclient installation and patching

Configure Ddclient

You need to use the following command to edit the ddclient.conf file

sudo vi/etc/ddclient.conf

Add the following information

##### CloudFlare (cloudflare.com) # # #ssl =yesuse=web, Web=dyndnsprotocol=cloudflare, server=www.cloudflare.com, zone= domain.com, [email protected], Password=api-key host.domain.com Comment out: #daemon =300

Your api-key can be found from the CloudFlare Account page, Ssl=yes may have been set, Use=web, web=dyndns means using DynDNS to determine IP (for NAT).

You've done it. Log in to https://www.cloudflare.com and check to see if the IP address listed for your domain name matches the http://checkip.dyndns.com listed.

Use the following command to verify your settings

sudo ddclient-daemon=0-debug-verbose-noquiet

Use CloudFlare dynamic domain name under Ubuntu

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.