#!/bin/sh export DATE="19.9.2005";SCRIPT=${0#/rom} export TITLE="Administración: WAN" . ${SCRIPT%/*}/cgi-bin-pre.sh cat<Administración: WAN EOF if [ "$REQUEST_METHOD" = "POST" ]; then read QUERY_STRING fi if [ -z "$QUERY_STRING" ]; then #Speedups wan_proto="$(nvram get wan_proto)" wan_ifname="$(nvram get wan_ifname)" wan_ports="$(nvram get $wan_ifname'ports')" cat<
Protocolo WAN:
Dirección IP WAN:
Mascara de red WAN:
Ruta por defecto WAN:
Servidor DNS:
Nombre de Host:
Dominio:
===RJ45 Connectors===:
 
===Permit SSH===:
===Permit HTTP===:
===Permit Ping===:
 
   

Consejo: Para asegurar un acceso conveniente a la red, tendrías que insertar el Nombre del Host (un sólo nombre sin puntos) y el Dominio (nombres múltiples separados por puntos). Ejemplo: Si pusieras el Nombre del Host a "mywr" y el Dominio a "mynet.freifunk.net", podrías acceder a las páginas de este aparato con http://mywrt.mynet.freifunk.net/ o también con http://mywrt/.

EOF else eval $(echo "$QUERY_STRING"|awk -F'&' '{for(i=1;i<=NF;i++){print $i}}') DIRTY= if [ -n "$post_wan" ]; then for V in wan_proto wan_ipaddr wan_netmask wan_gateway wan_dns wan_hostname wan_domain wan_ports ff_wanssh ff_wanhttp ff_wanicmp; do eval "C=\$$V" C=$(unescape $C) if [ "$V" = "wan_ports" ] && [ -n "$wan_ifname" ]; then V=$wan_ifname'ports' fi if [ "$V" != "wan_ports" ] && [ "$C" != "$(nvram get $V)" ]; then DIRTY=1 nvram set $V="$C" fi done fi if [ -n "$DIRTY" ]; then nvram commit>/dev/null 2>&1 cat< Los cambios han sido efectuados. La nueva configuración sera efectiva despues de Reiniciar. EOF else cat< No hay cambios en la configuración. EOF fi fi . ${SCRIPT%/*}/cgi-bin-post.sh