WRAP: Unterschied zwischen den Versionen
Aus Opennet
(→Grundkonfiguration) |
(→Grundkonfiguration) |
||
Zeile 37: | Zeile 37: | ||
option ipaddr 127.0.0.1 | option ipaddr 127.0.0.1 | ||
option netmask 255.0.0.0 | option netmask 255.0.0.0 | ||
− | config interface wan | + | config interface wan |
option ifname eth0 | option ifname eth0 | ||
− | # | + | # option proto dhcp |
option proto static | option proto static | ||
option ipaddr 192.168.33.27 | option ipaddr 192.168.33.27 | ||
option netmask 255.255.0.0 | option netmask 255.255.0.0 | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
* Drahtloses Netzwerk z.B. mit Atheros siehe http://madwifi.org/wiki/UserDocs/FirstTimeHowTo | * Drahtloses Netzwerk z.B. mit Atheros siehe http://madwifi.org/wiki/UserDocs/FirstTimeHowTo | ||
Version vom 6. Januar 2007, 11:55 Uhr
x86 Wireless Router Application Platform Boards, siehe http://www.pcengines.ch/wrap.htm
Inhaltsverzeichnis |
OpenWrt Installation
Auf diesem x86-basiertem Board läuft neben zahlreichen Debian/GNU-Linux Deviraten auch OpenWrt Kamikaze, dem aktuellen Entwicklungszweig von http://openwrt.org.
Opennet-Repository für vorkompiliertes Images und Pakete: http://www.opennet-initiative.de/firmware/kamikaze/
Kurzanleitung
- OpenWrt Kamikaze Quellen via svn besorgen, siehe http://dev.openwrt.org
- make menuconfig -- x86 Plattform, alle weiteren Einstellungen nach Bedarf
- make -- OpenWrt Images bauen, sind dann in bin/ zu finden
- dd if=<openwrt-x86-?-?.image> of=<ziel-device> -- Festplattenimage auf die CompactFlash-Karte schreiben (am besten über einen Cardreader, <ziel-device> ist der Cardreader-Devicenode)
- Booten, bei DMA-Problemen via Grub noch ide=nodma als Bootoption hinzufügen (ggf. bei menuconfig fest vorgeben: Target Images > Extra kernel boot options)
- Konfiguration vornehmen, vgl. http://wiki.openwrt.org/OpenWrtDocs/KamikazeConfiguration
- Fertig!
Hinweise zum Dateisystem
- *.image-Dateien sind komplette Festplatten-Images incl. Partitionstabelle und MBR mit GRUB
- *.fs-Dateien sind reine Partitionsimages
- Wahl zwischen Squashfs+Jffs2 (mit mini_fo Overlay), nur Jffs2 oder Ext2 als Root-Dateisystem; bei größeren CF-Karten ist ext2 statt jffs2 zu empfehlen (1024 Zylinergrenze beachten, sonst LBA notwendig, ideal -> Partition < 490 MB)
OpenWrt Konfiguration
Grundkonfiguration
- Passwort mit passwd' setzen; ggf. /etc/dropbear/authorized_keys mit Public-Key versorgen
- ggf. Opennet-Paketsourcen einbinden; /etc/ipkg.confbearbeiten:
src opennet http://www.opennet-initiative.de/firmware/kamikaze/packages dest root / dest ram /tmp
- ggf. Firewall deinstallieren mit ipkg remove iptables
- Autostart-Dienste mit /etc/init.d/<dienst> enable|disable einrichten
- Drahtgebundenes Netzwerk entspr. http://wiki.openwrt.org/OpenWrtDocs/KamikazeConfiguration in /etc/config/network konfigurieren:
config interface loopback option ifname lo option proto static option ipaddr 127.0.0.1 option netmask 255.0.0.0 config interface wan option ifname eth0 # option proto dhcp option proto static option ipaddr 192.168.33.27 option netmask 255.255.0.0
- Drahtloses Netzwerk z.B. mit Atheros siehe http://madwifi.org/wiki/UserDocs/FirstTimeHowTo
madwifi Ad-Hoc Device
- iPK Paket kmod-madwifi installieren
- Wireless-Konfigurationdatei unter /etc/config/wireless bearbeiten, z.B.:
config wifi-device wifi0 option type atheros option channel 50 config wifi-iface option device wifi0 option mode "ad-hoc" option ssid "olsr-a.opennet-initiative.de" config wifi-device wifi1 option type atheros option channel 50 config wifi-iface option device wifi1 option mode "ad-hoc" option ssid "olsr-a.opennet-initiative.de"
- WRAP neu starten
ntpclient Zeitsyncronisation
- iPK Paket ntpclient installieren
- Datei /etc/init.d/ntpclient anlegen (beispielhaft):
#!/bin/sh /etc/rc.common START=80 ntp=izumi.on boot() { while true; do ping -c 1 $ntp >/dev/null 2>&1 && ntpclient -s -c 0 \ -i 5 -g 1000000 -h $ntp && return sleep 3 done }
- diese ausführbar machen per chmod +x ntpclient
- als Autostart festlegen durch ./ntpclient enable
monit Diensteüberwachung
- iPK Paket monit installieren
- Konfigurationsdatei bearbeiten, zur Überwachung von olsrd z.B.
set daemon 120 set logfile syslog facility log_daemon set httpd port 2812 # and allow localhost # allow localhost to connect to the server and allow 192.168.0.0/16 check process olsrd with pidfile "/var/run/olsrd.pid" start program = "/etc/init.d/olsrd start" stop program = "/etc/init.d/olsrd stop"
- hierzu noch die Erstellung eines pid-Files in /etc/init.d/olsrd ergänzen
#!/bin/sh /etc/rc.common BIN=olsrd DEFAULT=/etc/default/olsrd RUN_D=/var/run PID_F=$RUN_D/$BIN.pid start() { [ -f $DEFAULT ] && . $DEFAULT mkdir -p $RUN_D $BIN $OPTIONS pidof $BIN > $PID_F } stop() { [ -f $PID_F ] && kill $(cat $PID_F) }
- monit starten per /etc/init.d/monit start
- Webzugriff per http://<node-ip>:2812/
maradns DNS-Server
- iPK Paket maradns installieren
- Konfigurationsdatei /etc/mararc bearbeiten und z.B. für rekursive Namensauflösung über zwei Upstream-Server konfigurieren:
hide_disclaimer="YES" chroot_dir="/etc/maradns" bind_address="172.0.0.1"" maradns_uid=65534 maxprocs=10 random_seed_file="/dev/urandom" recursive_acl="127.0.0.1/8" upstream_servers = {} upstream_servers["."] = "192.168.0.250, 192.168.0.254" verbose_level=3 verbose_query=1
- maradns starte per /etc/init.d/maradns start, dauerhaft per maradns enable
- Anfragen per askmara oder wie üblich nslookup & Co.