#!/bin/sh export DATE="14.9.2005";SCRIPT=${0#/rom} export TITLE="Admin: LAN" . ${SCRIPT%/*}/cgi-bin-pre.sh cat<Admin: 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<
LAN Protocol:
LAN IP:
LAN Netmask:
LAN default route:
Static Routes:
Disable NAT:
Disable Firewall:
EOF if [ "$(ipcalc -n $lan_ipaddr $wifi_netmask|cut -d'=' -f2)" = "$(ipcalc -n $wifi_ipaddr $wifi_netmask|cut -d'=' -f2)" ]; then cat<Note: The firewall function between WLAN and LAN is not active, because the LAN IP address ($lan_ipaddr) is part of the WLAN network ($wifi_ipaddr/$wifi_netmask). EOF fi cat<
DHCP Start IP: $(ipcalc -n $lan_ipaddr $lan_netmask|cut -d'=' -f1|cut -d'.' -f1-3).
DHCP Number of Users: (DHCP off with "0")
DHCP Lease Time: seconds
 
   

Tip: These settings influence the configuration, which is sent to wired clients via DHCP. To ensure a convenient network access, you should enter the Host Name and the internal Domain (-> WAN). Consejo: Estos parámetros influencian la configuración que será enviada a los clientes por cable a través de DHCP. Para asegurar un acceso conveniente a la red, tendrías que insertar el Nombre del Host y el Dominio (-> WAN).

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< The changed settings are committed. The settings are active after the next Restart. EOF else cat< No settings are changed. EOF fi fi . ${SCRIPT%/*}/cgi-bin-post.sh