AP203: Unterschied zwischen den Versionen

Aus Opennet
Wechseln zu: Navigation, Suche
 
(5 dazwischenliegende Versionen von 3 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
 +
Funktion zur Zeit ersetzt durch [[AP23|AP1.23]]
 
=== Access Point ===
 
=== Access Point ===
  
Zeile 11: Zeile 12:
 
|-
 
|-
 
| '''Antenne und Richtung'''
 
| '''Antenne und Richtung'''
| Standrd-Omni
+
| Standard-Omni
 
|-
 
|-
 
| '''Montage'''
 
| '''Montage'''
Zeile 20: Zeile 21:
 
|-
 
|-
 
| '''Bemerkung'''
 
| '''Bemerkung'''
| Privateigentum Mathias
+
| Privater AP Mathias
 
|}
 
|}
  
Zeile 30: Zeile 31:
 
|-
 
|-
 
| '''E-Mail'''
 
| '''E-Mail'''
|admin --ät-- opennet-initiative.de  
+
|admin@opennet-initiative.de  
 
|-
 
|-
 
|}
 
|}
Zeile 43: Zeile 44:
  
 
(Nur aus dem Opennet erreichbar.)
 
(Nur aus dem Opennet erreichbar.)
 +
 +
==== Aktuell ====
  
 
http://192.168.1.203/traffic.png
 
http://192.168.1.203/traffic.png
 +
 +
http://192.168.1.203/users.png
 +
 +
==== Woche ====
 +
 +
http://192.168.1.203/traffic_1w.png
 +
 +
http://192.168.1.203/users_1w.png
  
 
=== Anpassungen ===
 
=== Anpassungen ===
Zeile 59: Zeile 70:
 
  nvram set on_wifidhcp_start=50
 
  nvram set on_wifidhcp_start=50
 
  nvram set on_wifidhcp_num=20
 
  nvram set on_wifidhcp_num=20
 +
nvram set on_wifidhcp_lease=1h
 
  nvram set on_wifidhcp=on
 
  nvram set on_wifidhcp=on
 
  nvram set on_wifidhcp_keep=on
 
  nvram set on_wifidhcp_keep=on
 
  nvram set ff_txpwr=19
 
  nvram set ff_txpwr=19
 
  nvram set on_autoadapttxpwr=
 
  nvram set on_autoadapttxpwr=
 +
nvram set wan_hostname=Frieda23
 
  nvram commit
 
  nvram commit
 
* /usr/bin/netparam
 
* /usr/bin/netparam
  Zeile 126 : wdev = "eth1"
+
  Zeile 126 : wdev = ENVIRON["NVRAM_wifi_ifname"]
 +
            if ("" == wdev) "nvram get wifi_ifname"|getline wdev
 
* /etc/init.d/S53olsrd
 
* /etc/init.d/S53olsrd
 
  Zeile 19 : OLSRDEV=
 
  Zeile 19 : OLSRDEV=
Zeile 72: Zeile 86:
 
  Zeile 20 : iptables -$ACT_INSERT FORWARD $rulenum -i $WIFIDEV -o $TUNDEV \  
 
  Zeile 20 : iptables -$ACT_INSERT FORWARD $rulenum -i $WIFIDEV -o $TUNDEV \  
 
   -s $DHCPWIFINET_PRE -d ! $WIFINET_PRE -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
 
   -s $DHCPWIFINET_PRE -d ! $WIFINET_PRE -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
 +
* /usr/sbin/monitor_ugw.sh
 +
  DEV=tun+
 +
  DHCP=/tmp/run/dhcp.leases
 +
  NAME=$(nvram get wl0_ssid | cut -d"." -f1)
 +
  if [ ! -e /tmp/${DEV}_traffic.rrd ] ; then
 +
    rrdtool create /tmp/${DEV}_traffic.rrd -s 300 \
 +
    DS:in:ABSOLUTE:600:0:600000000 \
 +
    DS:out:ABSOLUTE:600:0:600000000 \
 +
    RRA:AVERAGE:0.5:1:2016 \
 +
    RRA:AVERAGE:0.5:3:2688 \
 +
    RRA:AVERAGE:0.5:12:6360
 +
    iptables -N tm_incoming
 +
    iptables -F tm_incoming
 +
    iptables -A tm_incoming -j RETURN
 +
    iptables -I FORWARD 1 -i $DEV -j tm_incoming
 +
    iptables -N tm_outgoing
 +
    iptables -F tm_outgoing
 +
    iptables -A tm_outgoing -j RETURN
 +
    iptables -I FORWARD 1 -o $DEV -j tm_outgoing
 +
    touch /tmp/${DEV}_traffic.png
 +
    ln -s /tmp/${DEV}_traffic.png /www/traffic.png
 +
  fi
 +
  if [ ! -e /tmp/dhcp_users.rrd ] ; then
 +
    rrdtool create /tmp/dhcp_users.rrd -s 300 \
 +
    DS:user:GAUGE:600:0:U \
 +
    RRA:AVERAGE:0.5:1:2016 \
 +
    RRA:AVERAGE:0.5:3:2688 \
 +
    RRA:AVERAGE:0.5:12:6360
 +
    touch /tmp/dhcp_users.png
 +
    ln -s /tmp/dhcp_users.png /www/users.png
 +
  fi
 +
  UGW="$(awk 'BEGIN {RS=" |/";FS="=|\\."} /CN=/ && /aps.on/ {print $2}' /etc/openvpn/opennet_user/on_aps.crt)"
 +
  IN=`iptables -L tm_incoming -vnxZ | grep RETURN | awk '{print $2}'`
 +
  OUT=`iptables -L tm_outgoing -vnxZ | grep RETURN | awk '{print $2}'`
 +
  USER=`wc -l $DHCP | awk '{print $1}'`
 +
  rrdtool update /tmp/${DEV}_traffic.rrd N:$IN:$OUT
 +
  rrdtool update /tmp/dhcp_users.rrd N:$USER
 +
  rrdtool graph /tmp/${DEV}_traffic.png -a PNG -s -86400 -w 606 -h 225 -v "Byte/s" \
 +
  'DEF:in='/tmp/${DEV}_traffic.rrd':in:AVERAGE' \
 +
  'DEF:out='/tmp/${DEV}_traffic.rrd':out:AVERAGE' \
 +
  'CDEF:out_neg=out,-1,*' \
 +
  'AREA:in#32CD32:Ankommend (Internet -> Opennet)' \
 +
  'LINE1:in#336600' \
 +
  GPRINT:in:"MAX:  Maximum\\: %5.1lf %s" \
 +
  GPRINT:in:"AVERAGE: Mittel\\: %5.1lf %S" \
 +
  GPRINT:in:"LAST: Aktuell\\: %5.1lf %SByte/Sekunde\\n" \
 +
  'AREA:out_neg#4169E1:Ausgehend (Opennet -> Internet)' \
 +
  'LINE1:out_neg#0033CC' \
 +
  GPRINT:out:"MAX:  Maximum\\: %5.1lf %S" \
 +
  GPRINT:out:"AVERAGE: Mittel\\: %5.1lf %S" \
 +
  GPRINT:out:"LAST: Aktuell\\: %5.1lf %SByte/Sekunde" \
 +
  'HRULE:0#000000' -t "Datenverkehr AP$UGW ($NAME)"
 +
  rrdtool graph /tmp/dhcp_users.png -a PNG -s -86400 -w 606 -h 225 -v "Leases" \
 +
  'DEF:user='/tmp/dhcp_users.rrd':user:AVERAGE' \
 +
  'AREA:user#32CD32:DHCP-Nutzer' \
 +
  'LINE1:user#336600' \
 +
  GPRINT:user:"MAX:  Maximum\\: %5.0lf" \
 +
  GPRINT:user:"AVERAGE: Mittel\\: %5.0lf" \
 +
  GPRINT:user:"LAST: Aktuell\\: %5.0lf" \
 +
  'HRULE:0#000000' -t "Benutzer AP$UGW ($NAME)"
  
 
[[Kategorie:Accesspoint_beschreibungen|203]]
 
[[Kategorie:Accesspoint_beschreibungen|203]]

Aktuelle Version vom 14. Juli 2011, 11:19 Uhr

Funktion zur Zeit ersetzt durch AP1.23

Inhaltsverzeichnis

[Bearbeiten] Access Point

ap_button_203.png Status
Standort Friedrichstr. 23
Antenne und Richtung Standard-Omni
Montage im Vereinsraum
Typ / Hersteller Buffalo
Bemerkung Privater AP Mathias

[Bearbeiten] Kontaktdaten

Name Frieda23
E-Mail admin@opennet-initiative.de

[Bearbeiten] Besonderheiten

  • freier Internetzugang für Frieda23 Vereinsraum und Gäste
  • Wireless Infrastruktur-Netz "frieda23.opennet-initiative.de"
  • DHCP per Wireless und Drahtgebunden (Switche am Schreibtisch)

[Bearbeiten] Graphen

(Nur aus dem Opennet erreichbar.)

[Bearbeiten] Aktuell

traffic.png

users.png

[Bearbeiten] Woche

traffic_1w.png

users_1w.png

[Bearbeiten] Anpassungen

  • Wireless Treiber
ipkg -force-depends remove opennet-kmod-brcm-wl opennet-kmod-wlcompat
ipkg install kmod-brcm-wl kmod-wlcompat iptables-mod-ipopt kmod-ipt-ipopt use-backports
ipkg install opennet-ugw-trafmon
  • Wireless Setup
nvram set wl0_infra=1
nvram set wl0_mode=ap
nvram set wl0_ssid=frieda23.opennet-initiative.de
nvram set wl0_channel=11
nvram set on_wifidhcp_start=50
nvram set on_wifidhcp_num=20
nvram set on_wifidhcp_lease=1h
nvram set on_wifidhcp=on
nvram set on_wifidhcp_keep=on
nvram set ff_txpwr=19
nvram set on_autoadapttxpwr=
nvram set wan_hostname=Frieda23
nvram commit
  • /usr/bin/netparam
Zeile 126 : wdev = ENVIRON["NVRAM_wifi_ifname"]
            if ("" == wdev) "nvram get wifi_ifname"|getline wdev
  • /etc/init.d/S53olsrd
Zeile 19 : OLSRDEV=
Zeile 20 : OLSRDEVLIST=
  • /etc/init.d/S82wifidhcp
Zeile 20 : iptables -$ACT_INSERT FORWARD $rulenum -i $WIFIDEV -o $TUNDEV \ 
  -s $DHCPWIFINET_PRE -d ! $WIFINET_PRE -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
  • /usr/sbin/monitor_ugw.sh
 DEV=tun+
 DHCP=/tmp/run/dhcp.leases
 NAME=$(nvram get wl0_ssid | cut -d"." -f1)
 if [ ! -e /tmp/${DEV}_traffic.rrd ] ; then
   rrdtool create /tmp/${DEV}_traffic.rrd -s 300 \
   DS:in:ABSOLUTE:600:0:600000000 \
   DS:out:ABSOLUTE:600:0:600000000 \
   RRA:AVERAGE:0.5:1:2016 \
   RRA:AVERAGE:0.5:3:2688 \
   RRA:AVERAGE:0.5:12:6360
   iptables -N tm_incoming
   iptables -F tm_incoming
   iptables -A tm_incoming -j RETURN
   iptables -I FORWARD 1 -i $DEV -j tm_incoming
   iptables -N tm_outgoing
   iptables -F tm_outgoing
   iptables -A tm_outgoing -j RETURN
   iptables -I FORWARD 1 -o $DEV -j tm_outgoing
   touch /tmp/${DEV}_traffic.png
   ln -s /tmp/${DEV}_traffic.png /www/traffic.png
 fi
 if [ ! -e /tmp/dhcp_users.rrd ] ; then
   rrdtool create /tmp/dhcp_users.rrd -s 300 \
   DS:user:GAUGE:600:0:U \
   RRA:AVERAGE:0.5:1:2016 \
   RRA:AVERAGE:0.5:3:2688 \
   RRA:AVERAGE:0.5:12:6360
   touch /tmp/dhcp_users.png
   ln -s /tmp/dhcp_users.png /www/users.png
 fi
 UGW="$(awk 'BEGIN {RS=" |/";FS="=|\\."} /CN=/ && /aps.on/ {print $2}' /etc/openvpn/opennet_user/on_aps.crt)"
 IN=`iptables -L tm_incoming -vnxZ | grep RETURN | awk '{print $2}'`
 OUT=`iptables -L tm_outgoing -vnxZ | grep RETURN | awk '{print $2}'`
 USER=`wc -l $DHCP | awk '{print $1}'`
 rrdtool update /tmp/${DEV}_traffic.rrd N:$IN:$OUT
 rrdtool update /tmp/dhcp_users.rrd N:$USER
 rrdtool graph /tmp/${DEV}_traffic.png -a PNG -s -86400 -w 606 -h 225 -v "Byte/s" \
 'DEF:in='/tmp/${DEV}_traffic.rrd':in:AVERAGE' \
 'DEF:out='/tmp/${DEV}_traffic.rrd':out:AVERAGE' \
 'CDEF:out_neg=out,-1,*' \
 'AREA:in#32CD32:Ankommend (Internet -> Opennet)' \
 'LINE1:in#336600' \
 GPRINT:in:"MAX:  Maximum\\: %5.1lf %s" \
 GPRINT:in:"AVERAGE: Mittel\\: %5.1lf %S" \
 GPRINT:in:"LAST: Aktuell\\: %5.1lf %SByte/Sekunde\\n" \
 'AREA:out_neg#4169E1:Ausgehend (Opennet -> Internet)' \
 'LINE1:out_neg#0033CC' \
 GPRINT:out:"MAX:  Maximum\\: %5.1lf %S" \
 GPRINT:out:"AVERAGE: Mittel\\: %5.1lf %S" \
 GPRINT:out:"LAST: Aktuell\\: %5.1lf %SByte/Sekunde" \
 'HRULE:0#000000' -t "Datenverkehr AP$UGW ($NAME)"
 rrdtool graph /tmp/dhcp_users.png -a PNG -s -86400 -w 606 -h 225 -v "Leases" \
 'DEF:user='/tmp/dhcp_users.rrd':user:AVERAGE' \
 'AREA:user#32CD32:DHCP-Nutzer' \
 'LINE1:user#336600' \
 GPRINT:user:"MAX:  Maximum\\: %5.0lf" \
 GPRINT:user:"AVERAGE: Mittel\\: %5.0lf" \
 GPRINT:user:"LAST: Aktuell\\: %5.0lf" \
 'HRULE:0#000000' -t "Benutzer AP$UGW ($NAME)"
Meine Werkzeuge
Namensräume

Varianten
Aktionen
Start
Opennet
Kommunikation
Karten
Werkzeuge