#!/bin/sh export DATE="14.9.2005";SCRIPT=${0#/rom} export TITLE="Administración: LAN" . ${SCRIPT%/*}/cgi-bin-pre.sh cat<Administración: LAN EOF if [ "$REQUEST_METHOD" = "POST" ]; then read QUERY_STRING fi if [ -z "$QUERY_STRING" ]; then #Speedups lan_proto="$(nvram get lan_proto)" lan_ipaddr=$(nvram get lan_ipaddr) lan_netmask=$(nvram get lan_netmask) wifi_ipaddr=$(nvram get wifi_ipaddr) wifi_netmask=$(nvram get wifi_netmask) test -z "$(nvram get ff_lan_proto)" && lan_proto=noconfig cat<
Protocolo LAN:
Dirección IP LAN:
Mascara de red LAN:
Ruta por defecto LAN:
Rutas Estáticas:
Deshabilitar NAT:
Deshabilitar Firewall:
EOF if [ "$(ipcalc -n $lan_ipaddr $wifi_netmask|cut -d'=' -f2)" = "$(ipcalc -n $wifi_ipaddr $wifi_netmask|cut -d'=' -f2)" ]; then cat<Nota: La función firewall entre WLAN y LAN no está activa, porque la dirección IP LAN ($lan_ipaddr) hace parte de la red WLAN ($wifi_ipaddr/$wifi_netmask). EOF fi cat<
IP inicial DHCP: $(ipcalc -n $lan_ipaddr $lan_netmask|cut -d'=' -f1|cut -d'.' -f1-3).
Número de Usuarios DHCP: (DHCP off with "0")
Periodo de alocación DHCP: segundos
 
   

EOF else eval $(echo "$QUERY_STRING"|awk -F'&' '{for(i=1;i<=NF;i++){print $i}}') DIRTY= if [ -n "$post_lan" ]; then ff_lan_proto=1 if [ "$lan_proto" = "noconfig" ]; then lan_proto=$(nvram get lan_proto) ff_lan_proto= fi for V in ff_lan_proto lan_proto lan_ipaddr lan_netmask lan_gateway static_route ff_nonat fw_disable dhcp_start dhcp_num dhcp_lease; do eval "C=\$$V" C=$(unescape $C) if [ "$C" != "$(nvram get $V)" ]; then DIRTY=1 nvram set $V="$C" fi done if checkbridge; then DIRTY=1 fi fi if [ -n "$DIRTY" ]; then nvram commit>/dev/null 2>&1 cat< Los parámetros han sido actualizados. Los cambios serán activos al próximo Reinicio. EOF else cat< No se ha cambiado ningún parámetro. EOF fi fi . ${SCRIPT%/*}/cgi-bin-post.sh