La ip externa ha cambiado, por favor actualice la informacion manualmente en no-ip.com
para que el dominio netsonic.sytes.net vuelva a estar disponible.
dhcp_ip='170.82.238.150'
#!/bin/sh
# 29/04/2016 (Ok)
# CarlosRojas9 / EugenioNava
# Dynamic DNS update to www.no-ip.com
# by: Claudio Roberto Cussuol - 11/05/2004
# Corregido: Paulo2 (OK) 21-10-2012 (a.b)
##########################################
. /etc/coyote/coyote.conf
[ "$NOIP_UPDATE" != "YES" ] && exit
[ "$1" != "log" ] && echo Checking need for update...
[ "$1" != "log" ] && logger NO-IP:Checking need for update...
. /ipupdate/checkip
if [ -e /var/log/no-ip.ip ] ; then
OLDa=""
OLDb=`cat /var/log/no-ip.ip`
else
OLDa=`nslookup $NOIP_DOMAIN | tail -n 1 | sed s/Address:\ \ \ \ //`
OLDb=""
fi
[ "$1" != "log" ] && echo Old IPa.......: $OLDa
[ "$1" != "log" ] && logger NO-IP:Old IPa.......: $OLDa
[ "$1" != "log" ] && echo Old IPb.......: $OLDb
[ "$1" != "log" ] && logger NO-IP:Old IPb.......: $OLDb
#sleep 12
if [ "$1" = "force" ] ; then
echo Forcing update
logger NO-IP:Forcing update
OLDa=""
fi
#sleep 12
if [ "$CURRENT" != "$OLDa" ] ; then
[ "$1" != "log" ] && echo Updating no-ip - $NOIP_DOMAIN
wget -q -O /var/log/no-ip.txt http://$NOIP_EMAIL:$NOIP_PASSWORD@dynupdate.no-ip.com/nic/update?hostname=$NOIP_DOMAIN&myip=$CURRENT
sleep 3
RESPCODE=`tail -n 1 /var/log/no-ip.txt | cut -d\ -f1`
RESPONSE=
case $RESPCODE in
nochg) RESPONSE='DNS is current, no update done'; RESPCODE=0 ;;
# Success
# IP address is current, no update performed.
# Followed by a space and the IP address that it is currently set to.
good) RESPONSE='DNS update successful'; RESPCODE=1 ;;
# Success
# DNS hostname update successful.
# Followed by a space and the IP address it was updated to.
nohost) RESPONSE='"nohost" error\nNo such host' ;;
# Error
# Hostname supplied does not exist under specified account,
# client exit and require user to enter new login credentials
# before performing and additional request.
badauth) RESPONSE='"badauth" error\nInvalid username/password combo' ;;
# Error
# Invalid username password combination
badagent) RESPONSE='"badagent" error\nClient disabled. Client should exit and not perform\nany more updates without user intervention.' ;;
!donator) RESPONSE='"!donator" error\nAn update request was sent including a feature that is not\navailable to that particular user such as offline options.' ;;
abuse) RESPONSE='"abuse" error\nUsername is blocked due to abuse.\nEither for not following our update specifications or\ndisabled due to violation of the No-IP terms of service.\nOur terms of service can be viewed at http://www.no-ip.com/legal/tos\nClient should stop sending updates.' ;;
911) RESPONSE='"911" error\nA fatal error on our side such as a database outage.\nRetry the update no sooner 30 minutes.' ;;
*) RESPONSE='Unknow error' ;;
esac
if [ "$RESPCODE" = "0" -o "$RESPCODE" = "1" ] ; then
echo $CURRENT > /var/log/no-ip.ip
fi
[ "$1" != "log" ] && echo Response from www.no-ip.com
[ "$1" != "log" ] && echo ================================
[ "$1" != "log" ] && echo -e $RESPONSE
[ "$1" != "log" ] && echo ================================
echo "======================================" >> /var/log/ipupdate.log
date >> /var/log/ipupdate.log
echo $CURRENT >> /var/log/ipupdate.log
echo Updating no-ip - $NOIP_DOMAIN >> /var/log/ipupdate.log
echo $RESPONSE >> /var/log/ipupdate.log
logger NO-IP:Updating no-ip - $NOIP_DOMAIN - $CURRENT
logger NO-IP:$RESPONSE
else
[ "$1" != "log" ] && echo The update of $NOIP_DOMAIN is not needed
[ "$1" != "log" ] && logger NO-IP:The update of $NOIP_DOMAIN is not needed
echo $CURRENT > /var/log/no-ip.ip
fi
Checking need for update...
Current IP...: 190.86.238.240
Old IPa.......: 205.11.56.50
Old IPb.......:
Updating no-ip - netsonic.sytes.net
cut: you must specify a list of bytes, characters, or fields
Response from www.no-ip.com
================================
Unknow error
================================
RESPCODE=`tail -n 1 /var/log/no-ip.txt | cut -d\ -f1`
RESPCODE=`tail -n 1 /var/log/no-ip.txt | cut -d" " -f1`
Voltar para BrazilFW 2.x - Ajuda em Geral (Todas as Línguas)
Usuários navegando neste fórum: Nenhum usuário registrado e 7 visitantes