Difference between revisions of "Dyndns Updater"
Jump to navigation
Jump to search
Rafahsolis (talk | contribs) Tag: visualeditor |
Rafahsolis (talk | contribs) m (→Duck DNS) Tag: visualeditor |
||
| Line 6: | Line 6: | ||
<source lang="bash">LOG_FILE=/var/local/duckdns/duck.log | <source lang="bash">LOG_FILE=/var/local/duckdns/duck.log | ||
DATE=$(date +"%F %T") | DATE=$(date +"%F %T") | ||
| − | RESULT=$( echo url="https://www.duckdns.org/update?domains=flirt,zr0ke,r0942,m0rpheus&token= | + | RESULT=$( echo url="https://www.duckdns.org/update?domains=flirt,zr0ke,r0942,m0rpheus&token=********-****-****-****-************&ip=" | curl -s -k -K - ) |
echo ${DATE} ${RESULT} >> ${LOG_FILE} | echo ${DATE} ${RESULT} >> ${LOG_FILE} | ||
</source> | </source> | ||
| Line 20: | Line 20: | ||
==/etc/ddclient.conf example== | ==/etc/ddclient.conf example== | ||
<nowiki>## ddclient configuration file | <nowiki>## ddclient configuration file | ||
| − | + | daemon=600 | |
| − | + | # check every 600 seconds | |
| − | + | syslog=yes | |
| − | + | # log update msgs to syslog | |
| − | + | mail-failure=redteam@bbva.com # Mail failed updates to user | |
| − | + | pid=/var/run/ddclient.pid | |
| − | + | # record PID in file. | |
| − | + | ssl=yes | |
| − | + | # use HTTPS | |
| − | + | ## Detect IP with our CheckIP server | |
| − | + | use=web, web=checkip.dyndns.com/, web-skip='IP Address' | |
| − | + | ## DynDNS username and password here | |
| − | + | login=RedTeam | |
| − | + | password=##YOUR PASSWORD## | |
| − | + | ## Default options | |
| − | + | protocol=dyndns2 | |
| − | + | server=members.dyndns.org | |
| − | + | ## Dynamic DNS hosts | |
| − | + | rrafara.dyndns.org</nowiki> | |
Restart ddclient service | Restart ddclient service | ||
Revision as of 11:19, 5 June 2019
Duck DNS
- Create an account at https://www.duckdns.org/
- Create the script /var/local/duckdns/updater.sh (chmod 700)
- create the log file: touch /var/local/duckdns/duck.log
LOG_FILE=/var/local/duckdns/duck.log
DATE=$(date +"%F %T")
RESULT=$( echo url="https://www.duckdns.org/update?domains=flirt,zr0ke,r0942,m0rpheus&token=********-****-****-****-************&ip=" | curl -s -k -K - )
echo ${DATE} ${RESULT} >> ${LOG_FILE}
- crontab -e
*/5 * * * * /var/local/duckdns/updater.sh >/dev/null 2>&1
NO-IP
Ubuntu 16.04 server
sudo apt install ddclient
/etc/ddclient.conf example
## ddclient configuration file daemon=600 # check every 600 seconds syslog=yes # log update msgs to syslog mail-failure=redteam@bbva.com # Mail failed updates to user pid=/var/run/ddclient.pid # record PID in file. ssl=yes # use HTTPS ## Detect IP with our CheckIP server use=web, web=checkip.dyndns.com/, web-skip='IP Address' ## DynDNS username and password here login=RedTeam password=##YOUR PASSWORD## ## Default options protocol=dyndns2 server=members.dyndns.org ## Dynamic DNS hosts rrafara.dyndns.org
Restart ddclient service