|
![]() ![]() ![]() ![]() Airos + VirtualAP + VLAN taggingCÃlem je vytvoÅ™it dvÄ› SSID s různými WPA-PSK hesly. Prvnà SSID bude bridgované s ethernetem, druhé se bude tagovat VLANem a pÅ™es tento VLAN bude dostupný i management. br0: ath0 + eth0_real + eth1_real br1: ath1 + vlan Pokud je zaÅ™Ãzenà v módu bridge, je br0 vytvoÅ™ený a má ip adresu nastavenou pÅ™es gui. pustÃme SSH na zaÅ™ÃzenÃ. Pro nastavenà WPA je potÅ™eba konfigurace hostapd Kód: vi /etc/persistent/aaa2.cfg interface=ath1 bridge=br1 driver=wext wpa=2 wpa_passphrase=mywpakey wpa_key_mgmt=WPA-PSK wpa_pairwise=CCMPVytvoÅ™Ãme soubor /etc/persistent/rc.poststart, který se automaticky pustà po startu. Kód: vi /etc/persistent/rc.poststart #!/bin/sh VLAN_ID=17 #create new SSID wlanconfig ath1 create wlandev wifi0 wlanmode ap iwconfig ath1 essid marv-virtual iwpriv ath1 ap_bridge 1 iwpriv ath1 wds 1 #run wpa /bin/hostapd /etc/persistent/aaa2.cfg & ifconfig ath1 up #create vlan vconfig add br0 $VLAN_ID ifconfig br0.$VLAN_ID up #new bridge brctl addbr br1 brctl addif br1 ath1 brctl addif br1 br0.$VLAN_ID ifconfig br1 up Kód: vi /etc/persistent/rc.prestop #!/bin.sh VLAN_ID=17 #delete bridge brctl delif br1 ath1 brctl delif br1 br0.$VLAN_ID brctl delbr br1 vconfig rem br0.$VLAN_ID #kill hostpad MYPID=`ps aux |grep aaa2 |head -n 1 |awk '{print }'` kill -9 $MYPID #remove ath1 wlanconfig ath1 destroynakonec jen ulozit a restartovat Kód: save and restart cfgmtd -p /etc -w reboot pÅ™ehozenà ip adresy na jiný iface Kód: switch ip #switch ip address ADRESA=„`ip a |grep br0 |grep inet |head -n 1|cut -d\ -f 6`“ ROUTE=„`ip r |grep default |cut -d\ -f 3`“ ip a del $ADRESA dev br0 ip a a $ADRESA dev br1 ip r del default ip r a default via $ROUTE dev br1 |
Wiki engine by dan. Content by marv. |