Mein Linuxbasierter Access Point im Selbstbau, hier eine kleine Anleitung oder wenn man so will ein miniHowTo wie man einen handelsueblichen PC in einen AP verwandelt. Doch vielleicht zuerst EinkaufDerWirelessKarte.
lspciWir starten mit einer Atheros Karte: 0000:00:0c.0 Ethernet controller: Atheros Communications, Inc. AR5212 802.11abg NIC (rev 01)
Subsystem: D-Link System Inc: Unknown device 3ab0
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop-ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-<TAbort- <MAbort- >SERR- <PERR-
Latency: 168 (2500ns min, 7000ns max), Cache Line Size: 0x08 (32 bytes)
Interrupt: pin A routed to IRQ 10
Region 0: Memory at dd800000 (32-bit, non-prefetchable) [size=64K]
Capabilities: [44] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=2 PME-
Die EinstellungenDa ich Debian verwende hier leider nur die Debian spezifische Konfiguration der Wlan Karte. Sie läuft im "master mode", also als Access Point. Die installation von madwifiDa ich gerne selbst Kernel baue und "bleeding edge", also top aktuelle Software (auch unstable genannt) verwende, gabs hier garkeine Probleme.
/etc/networking/interfacesauto ath0
iface ath0 inet static
pre-up iwconfig ath0 key hier_der_key
pre-up iwconfig ath0 essid mein_ap
pre-up iwconfig ath0 mode master
address 192.168.178.1
netmask 255.255.255.0
network 192.168.178.0
broadcast 192.168.178.255
firewallHier mal einen kleinen Ausschnitt aus der Firewall (iptables) # Die zwei folgenden Regeln empfehle ich stark, da dann nicht jeder alle laufenden
# Services einsehen kann (z.B. mittels nmap)
iptables -A INPUT -i ath0 -j DROP
iptables -A OUTPUT -o ath0 -j DROP
# Die weiteren Regeln kuemmern sich um das forwarding -> Router!
iptables -A FORWARD -i ath0 -o ppp0 -j ACCEPT
iptables -A FORWARD -o ath0 -i ppp0 -j ACCEPT
iptables -A POSTROUTING -t nat -o ppp0 \
-s 192.168.178.0/24 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward (to enable routing) install dhcpdyou wpa_supplicantI had problems using WPA but then I recompiled it with this .config # Driver interface for madwifi driver CONFIG_DRIVER_MADWIFI=y # Change include directories to match with the local setup CFLAGS += -I/usr/src/modules/madwifi-cvs/ having CFLAGS pointing to the right driver source. This solved most problems for WPA so far. you probably don't need any hardware specific hooks so use -wext instead hostapd (for the server)using ath5k|ath5k or ath_pci you have to adapt your hostapd.conf to use the right backend. maybe there is something like wext for the hostapd backend stuff /etc/wpa_supplicant.conf (for the client)network={
ssid="Schnuff"
psk=ca3lkjal3kj4calk3wjvlwak3jvlakw3jvr5lakwj5vlawkjv5lwkjv5lawkj5vlwak3jv5l3wakj
}
network={
ssid="Testing"
psk=ca3lkjal3kj4calk3wjvlwak3jvlakw3jvr5lakwj5vlawkjv5lwkjv5lawkj5vlwak3jv5l3wakj
}
Note: Passwords are removed, so create your own using wpa_passphrase as: root@Kahn:/home/joachim# wpa_passphrase schnuffel_net saldkjfalsjflsadkjflsakjflsakjfa
network={
ssid="schnuffel_net"
#psk="saldkjfalsjflsadkjflsakjflsakjfa"
psk=4e39971e76c895942390809a7e229377bc29b0fb133bd4a8928f16b0a5203bd7
}
/etc/network/interfacesto make the changes permanent (debian style): root@moon:/usr/src/hostap/hostapd# cat /etc/network/interfaces
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
# The loopback interface
auto lo
iface lo inet loopback
# The first network card - this entry was created during the Debian installation
# (network, broadcast and gateway are optional)
auto eth0
iface eth0 inet static
address 192.168.100.10
netmask 255.255.255.0
network 192.168.100.0
broadcast 192.168.100.255
auto eth1
iface eth1 inet static
address 1.1.1.1
netmask 255.255.255.0
auto ath0
iface ath0 inet static
pre-up iwconfig ath0 mode master
pre-up iwconfig ath0 essid lak3j4ca3v45
pre-up iwconfig ath0 key 32336334327133357671356233
pre-up iwpriv ath0 mode 3
address 192.168.178.10
netmask 255.255.255.0
network 192.168.178.0
broadcast 192.168.178.255
FAZIT für AtherosKartenIch habe jetzt schon viele Atheros basierte Karten verwendet und mittlerweile hab ich auch eine Atheros basierte mini-pci im Laptop welche ohne Problme arbeitet (ich denke da nur an ipw2200 *schluck*). Reinjection und ath0raw InterfaceDie aktuellen stable Treiber(27.01.2006) implementieren mit einem Patch auch reinjection sowie einen raw Socket, der Pakete auf ISO/OSI Layer 1 kopiert und wiedergibt. Das reinjection Feature habe ich mit airodump/aireplay getestet. Sehr schoen wir das z.B. hier: http://www.wirelessdefence.org/Contents/Aircrack_aireplay.htm oder Man sollte auch mal rfakeap ansehen, das findet man unter: http://rfakeap.tuxfamily.org/ Traffic shapingWie das gemacht wird ist unter [2] zu erfahren. http://www.greenend.org.uk/rjk/2004/tc.html Es waere echt schoen, wenn wir auch solche Grafiken aus ethereal ableiten koennten:
Hier sind auch noch zwei Programme vorgestellt:
http://dessent.net/btfaq/#freeze Graphic from: and (c) by Cisco Systems. ZusammenfassungIm Wesentlichen sollte euer System so aussehen:
Wichtige Tips hier: Ich hoffe ihr profitiert von meiner Anleitung. Verbesserungsvorschlaege an: Herzlichen Dank für hilfreiche Kommentare gehen an:
Links[1] http://www.tuxhardware.de/product298/product_info.html ![]() |