Advertisement
ajcorrea

ubnt vlan wireless

Jun 26th, 2014
218
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /etc/persistent/rc.poststart
  2.  
  3. #!/bin/sh
  4. logger "[ajcorrea.vlan] Desligando interfaces (ath0,wifi0,eth0,br0-vlan,eth0.155)"
  5. ifconfig ath0 down
  6. ifconfig wifi0 down
  7. ifconfig eth0 down
  8. ifconfig br0vlan down
  9. ifconfig eth0.155 down
  10.  
  11. logger "[ajcorrea.vlan] Removendo Bridge br0-vlan + Vlan eth0.155"
  12. brctl delbr br0vlan
  13. vconfig rem eth0.155
  14.  
  15. logger "[ajcorrea.vlan] Ativando interfaces (eth0,wifi0,ath0)"
  16. ifconfig eth0 0.0.0.0 up
  17. ifconfig wifi0 0.0.0.0 up
  18. ifconfig ath0 0.0.0.0 up
  19. logger "[ajcorrea.vlan] Adicionando vlan eth0.155 and UP"
  20. vconfig add eth0 155
  21. ifconfig eth0.155 0.0.0.0 up
  22. logger "[ajcorrea.vlan] Criando bridge br0-vlan e vinculando interfaces (ath0+eth0.155)"
  23. brctl addbr br0vlan
  24. brctl addif br0vlan ath0
  25. brctl addif br0vlan eth0.155
  26. logger "[ajcorrea.vlan] Configurando IP br0-vlan"
  27.  
  28. ifconfig br0vlan <ip.para.gerencia.do.radio.pela.vlan> netmask 255.255.255.0
  29. route add default gw <gateway>
  30.  
  31. rm -rf /etc/aaa.cfg
  32. cp /etc/persistent/aaa.cfg /etc
  33.  
  34. kill -9 `pidof hostapd`
  35.  
  36.  
  37. ###################################
  38. /etc/persistent/aaa.cfg
  39.  
  40. interface=ath0
  41. bridge=br0vlan
  42. driver=madwifi
  43. wpa=2
  44. wpa_passphrase=<senha-wpa-do-wifi>
  45. wpa_key_mgmt=WPA-PSK
  46. wpa_pairwise=CCMP
  47.  
  48.  
  49. ###################################
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement