#!/bin/sh export DATE="14.9.2008";SCRIPT=${0#/rom} export TITLE="Administration : WAN" . ${SCRIPT%/*}/cgi-bin-pre.sh cat<Administration : WAN EOF if [ "$REQUEST_METHOD" = "POST" ]; then read QUERY_STRING fi wan_ifname="$(nvram get wan_ifname)" if [ -z "$QUERY_STRING" ]; then #Speedups wan_proto="$(nvram get wan_proto)" wan_ports="$(nvram get $wan_ifname'ports')" cat<
Protocole WAN :
Adresse IP WAN :
Masque de sous réseau WAN :
Route par défaut WAN :
Connecteurs RJ45 :
 
Accepter les connexions ssh à partir de l'InternetN :
Autoriser HTTP :
Autoriser HTTPS :
Autoriser le Ping :
 
   
EOF else IFS=\&;set ${QUERY_STRING%%[^%&=+-:@-_a-z~]*};unset IFS;eval $* DIRTY= if [ -n "$post_wan" ]; then if [ "pppoe" = "$wan_proto" ]; then wan_ifname=ppp0 else wan_ifname=$(nvram get wan_device) fi for V in wan_proto wan_ifname wan_ipaddr wan_netmask wan_gateway wan_ports ff_wanssh ff_wanhttp ff_wanhttps ff_wanicmp; do eval "C=\$$V" C=$(httpd -d "$C") test "$V" = "wan_ports" && V=$wan_ifname'ports' if [ "$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< Les changements sont activés. Les paramètre seront utilisés au prochain Redémarrage. EOF else cat< Aucun changement dans la configuration. EOF fi fi . ${SCRIPT%/*}/cgi-bin-post.sh