A few days back I was searching for free DNS server to use for my dynamic IP host
Found DuckDNS from its web it says ...
"Duck DNS is a free service which will point a DNS (sub domains of duckdns.org) to an IP of your choice"
Below are the steps to configure and use DuckDNS service
1) First create a log in the duckdns, by choosing sign in with Google , twitter etc
2) Once logged in take note of the "Token" which will be on the first page
3) Create a subdomain by typing the name in the sub domain box and click "add domain" button. This would be your DNS hostname in the form of yourdomain.duckdns.org
4) Follow the instructions under the "install" tab to configure duckdns on your dynamic IP host, below is the steps for Linux host with cron installed already
- mkdir duckdns
- cd duckdns
- Now copy this text and put it into the script
vi duck.sh
echo url="https://www.duckdns.org/update?domains=exampledomain&token=a7c4d0ad-114e-40ef-ba1d-d217904a50f2&ip=" | curl -k -o /root/duckdns/duck.log -K -
Replace
exampledomain: with your subdomain name created on duckdns site
a7c4d0ad-114e-40ef-ba1d-d217904a50f2&ip= : with your token from the duckdns site
- Make the script executable
chmod 700 duck.sh
- Next, create a crontab entry for the script to run every 5 minutes
*/5 * * * * /root/duckdns/duck.sh >/dev/null 2>&1
- Test the script
./duck.sh
This should simply return to a prompt, we can also see if the last attempt was successful (OK or bad KO)
cat duck.log
5) Now try ssh into your Linux host using the domain name created
ssh youdomain.duckdns.org
6) Reboot the host or change the IP of the host and then wait 5 minutes, you should be able to ssh using the DNS domain name
Found DuckDNS from its web it says ...
"Duck DNS is a free service which will point a DNS (sub domains of duckdns.org) to an IP of your choice"
Below are the steps to configure and use DuckDNS service
1) First create a log in the duckdns, by choosing sign in with Google , twitter etc
2) Once logged in take note of the "Token" which will be on the first page
3) Create a subdomain by typing the name in the sub domain box and click "add domain" button. This would be your DNS hostname in the form of yourdomain.duckdns.org
4) Follow the instructions under the "install" tab to configure duckdns on your dynamic IP host, below is the steps for Linux host with cron installed already
- mkdir duckdns
- cd duckdns
- Now copy this text and put it into the script
vi duck.sh
echo url="https://www.duckdns.org/update?domains=exampledomain&token=a7c4d0ad-114e-40ef-ba1d-d217904a50f2&ip=" | curl -k -o /root/duckdns/duck.log -K -
Replace
exampledomain: with your subdomain name created on duckdns site
a7c4d0ad-114e-40ef-ba1d-d217904a50f2&ip= : with your token from the duckdns site
- Make the script executable
chmod 700 duck.sh
- Next, create a crontab entry for the script to run every 5 minutes
*/5 * * * * /root/duckdns/duck.sh >/dev/null 2>&1
- Test the script
./duck.sh
This should simply return to a prompt, we can also see if the last attempt was successful (OK or bad KO)
cat duck.log
5) Now try ssh into your Linux host using the domain name created
ssh youdomain.duckdns.org
6) Reboot the host or change the IP of the host and then wait 5 minutes, you should be able to ssh using the DNS domain name
No comments:
Post a Comment