A ver calamidad xD. Le das 200.000 vueltas a lo mismo. Te dije que te viene toda la información necesaria en el link que te pasé:
Step 1, Make a DNS record in your FreeDNS account.
Make your account -> freedns.afraid.org -> Signup
Make a dns record (subdomains -> add -> save)
(You'll see your entry appear in the 'subdomains' page)
Step 2, Router stuff
All you need is your update key from FreeDNS, so lets get that.
Navigate to FreeDNS -> 'Dynamic DNS'.
Copy the 'Direct URL' link.
You want the 'update key', which is the part after the '?' in the URL.
Next, in your router's admin interface [Screenshot Here]:
Navigate to : Setup tab -> DDNS subtab ...
Select 'freedns.afraid.org' in the drop down menu, then enter:
Username: guest
Password: guest
Hostname: dns_name,update_key
(Example: zeus.afraid.org,AFFEEFFFCCDDEEEFFFCC==)
The router just ignores the username and password fields, so do not worry about those. The 'dns_name', and 'update key', and its placement after the comma are the most important thing.
Hit Save, then Apply changes. Within 30 seconds or so it will come back up, automatically do an update, then display the update log to you on the same page.
Congratulations! You're done. Thats it!
Additional Tips: If you change your password, or you delete your DNS within FreeDNS, your key WILL change, and you will have to put your new 'update key' in your router.
Esto es para que el router informe del cambio de ip. Es una opción en el caso de que tu router lo soporte. Que ya sabemos que si.
Otra opción sin tocar nada en el router es crear un subdominio, le pones el nombre que quieras, seleccionas el dominio publico al que formará parte tu subdominio (esto da un poco igual si luego vas a usar un dominio.tk, pero lo necesitas para configurar el DDNS para tener una ip estatica que de ka cara por ti en lugar de tu ip dinamica.
Si vas a usar directamente un subdominio Pincha en resgistry para seleccionar el dominio a partir dek cual crearas tu subdominio.
Despues de crear tu subdominio vas a Dynamic DNS, en esta pagina te apareceran todos los dominios que hayas creado. Copia el link con click derecho de Direct URL. Pega el link en cualquier sitio y pilla solo las letras a partir del ? Guarda esas letras en el portapapeles.
Crea un script de la siguiente manera:
sudo nano /etc/cron.d/freedns_update.sh
Pega este script dentro:
#!/bin/sh # freedns_update.sh: Update the public IP on freedns.afraid.org only if it has changed. ## Place this script in the cron's job directory /etc/cron.d and assign the proper permissions ## and owner ## sudo chmod 500 /etc/cron.d/freedns_update.sh ## sudo chown root:root /etc/cron.d/freedns_update.sh ## Add to /etc/crontab to execute on reboot and every 5 minutes ## Edit /etc/crontab and append these two lines: ## @reboot root /etc/cron.d/freedns_update.sh >/dev/null ## */5 * * * * root /etc/cron.d/freedns_update.sh >/dev/null #Use your own values DOMAIN=raspberry.liar.info.tm HASHKEY=c29Q2s1Ml9df604bba2b1359ff62MTEyMT185e7= UPDATE_URL="
http://freedns.afraid.org/dynamic/update.php?${HASHKEY}" current_ip=$(wget -q --output-document -
http://checkip.dyndns.org | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}') registered_ip=$(ping -qn -c 1 $DOMAIN | head -n 1 | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}') if [ "${current_ip}" != "${registered_ip}" ]; then wget -q --read-timeout=0.0 --waitretry=5 --tries=400 --output-document /dev/null $UPDATE_URL if [ $? -eq 0 ]; then echo "$(date +"%b %_d %T") $(hostname) $0: IP address updated on freedns.afraid.org: new IP '${current_ip}', old IP '${registered_ip}'" >> /var/log/messages else echo "$(date +"%b %_d %T") $(hostname) $0: ERROR IP address could not be updated on freedns.afraid.org: current IP '${current_ip}', registered IP '${registered_ip}'" >> /var/log/messages fi fi
Cambia DOMAIN= y HASHKEY= Por tu dominio y y el hasg que te venia a partir del interrogante en Direct URL.
Dale control+o para guardar el archivo y control+X para salir del archivo abierto por Nano. Te pedira confirmación.
Escribe otra vez en la terminal:
sudo chmod 500 /etc/cron.d/freedns_update.sh
sudo chown root:root /etc/cron.d/freedns_update.sh
para darle permisos a la carpeta.
Despues abres el crontab para programar una tarea:
sudo nano /etc/crontab
En el final del archivo añades 2 nuevas lineas:
@reboot root /etc/cron.d/freedns_update.sh >/dev/null */5 * * * * root
/etc/cron.d/freedns_update.sh >/dev/null
Guardas con control +o y cierras con control+x
Por ultimo reinicia cron con el comando:
sudo /etc/init.d/cron restart