Italiano English
Modifica History Actions

dns-nnxx

Per usare la rete NNXX

Scaricare il firmware per il tuo router da http://downloads.nnxx.ninux.org/firmware/, vedere anche la pagina http://ninux.org/nnxx

DNS per NNXX

Per NNXX sono stati implementati 2 server DNS (Master e Slave) gestiti via ansible utilizzando il playbook https://github.com/ninuxorg/nnxx-bind-server. Tutti possono aggiungere/modificare le zone.

I dns pubblici sono:

  • 176.9.204.50 (master)
  • 176.9.187.218 (slave)

I dns locali sono:

  • 10.27.253.10 (master)
  • 10.27.253.11 (slave)

DDNS per NNXX

E' stato implementato anche un servizio DDNS per i router. In questo modo tramite browser si possono raggiungere i router con domini tipo hostname.router.nnxx tramite la VPN NNXX.

script nsupdate

Lo script seguente registra il nome del router nella zona router.nnxx tramite la rete VPN di Ninux NNXX. OpenWisp provvedere a caricare sui router il seguente script in /root/nsupdate. Viene eseguito ogni notte o può essere avviato manualmente in qualsiasi momento. L'aggiornamento avviene tramite VPN.

if which nsupdate >/dev/null; then

ETH=br-lan
DOMAIN=router.nnxx
DNS=10.27.253.10
SUB=$(cat /proc/sys/kernel/hostname)
ECHO=$(which echo)
NSUPDATE=$(which nsupdate)
IP=$(ip addr show dev $ETH | grep 'inet ' | awk '{split($2,a,"/");print a[1];}')

$ECHO "server $DNS" > /tmp/nsupdate
$ECHO "debug yes" >> /tmp/nsupdate
$ECHO "zone $DOMAIN." >> /tmp/nsupdate
$ECHO "update delete $SUB.$DOMAIN" >> /tmp/nsupdate
$ECHO "update add $SUB.$DOMAIN 60 A $IP" >> /tmp/nsupdate
$ECHO "send" >> /tmp/nsupdate

$NSUPDATE -v /tmp/nsupdate 2>&1

else
    echo installo nsupdate, riavvia lo script dopo
    sleep 5
    opkg update
    opkg install bind-client
fi