Changes between Version 43 and Version 44 of WikiStart
- Timestamp:
- May 5, 2013, 1:15:22 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WikiStart
v43 v44 42 42 6. internet? 43 43 44 Wat niet behandeld gaat worden is het aanmaken van een user database/list voor de radius server, aangezien alle users extern via proxy geauthenticeerd worden en niet intern! 45 44 46 Met deze middelen en een compleet voor zover mogelijk lineaire stap voor stap handleiding is een plug en play exploitatie van eduroam toegangspunten waar dan ook binnen het Wireless Leiden netwerk snel en eenvoudig te realiseren. Voor het opleveren van veel AP's (batches) met unieke instelligen zal er uiteindelijk een configuratie script volgen waarmee op basis van het MAC-adres van het AP een aantal unieke parameters meegegeven kunnen worden voor de configuratie: MultiSSID, hostname, kanaal, ipadres(bedraad/draadloos), etc... vergeet de unieke openvpn client certificaten niet, tevens zouden er per AP unieke client gegevens om met de radius-proxy/server te communiceren gemaakt kunnen worden. 45 47 46 Door het gebruik van het opensource software [http://www.openwrt.org OpenWRT], [http://www.freebsd.org FREEBSD] en gerelateerde software projecten, is deze setup niet gelimiteerd aan een enkel merk en of type hardware. Een kleine aanpassing aan de configuratie bestanden zou een vereiste kunnen zijn voordat het op ander hardware platvorm werkt. Deze handleiding zal overigens alleen toegespitst zijn op Ubiquiti AP's zoals Bullet m2 HP/ Nano station/loco m2 en via-epia-m/alixboard als radiusproxy/server & gateway. Als uitgangssituatie om deze handleiding uit te voeren word ubuntu 12.04LTS AMD64 gebruikt! 48 Door het gebruik van het opensource software [http://www.openwrt.org OpenWRT], [http://www.freebsd.org FREEBSD] en gerelateerde software projecten, is deze setup niet gelimiteerd aan een enkel merk en of type hardware. Een kleine aanpassing aan de configuratie bestanden zou een vereiste kunnen zijn voordat het op ander hardware platvorm werkt. Deze handleiding zal overigens alleen toegespitst zijn op Ubiquiti AP's zoals Bullet m2 HP/ Nano station/loco m2 en via-epia-m/alixboard als radiusproxy/server & gateway. Als uitgangssituatie om deze handleiding uit te voeren word ubuntu 12.04LTS AMD64 gebruikt! 47 49 48 50 === 1 setup eduroam !AccessPoints === … … 114 116 }}} 115 117 116 For deploying huge quantity (batch(es)) of AP's the following settings are general but some may differ among !AccesPoints like: multiSSID,ipadress(wired/wireless),wifichannel,band(a/bg),hostname,etc. In the following config files those parts that makes the uniqueness will be co loured so its easier to identify and customize. Use the files from the backup you just made as a template, since the example config files which will follow after this paragraph are hardware-type/image specific! That means that my config files are specific for the Ubiquiti bullet2m hp, and for instance will not work on linksys broadcom based AP hardware(because wifi interfaces are configured using different names and parameters)! So only copy/paste change the needed parts, that differ with your templates!118 For deploying huge quantity (batch(es)) of AP's the following settings are general but some may differ among !AccesPoints like: multiSSID,ipadress(wired/wireless),wifichannel,band(a/bg),hostname,etc. In the following config files those parts that makes the uniqueness will be commented in the following style "#! <---" so its easier to identify and customize. Use the files from the backup you just made as a template for your own custom config, since the example config files which will follow after this paragraph are hardware-type/image specific! That means that my config files are specific for the Ubiquiti bullet2m hp 2,4ghz b/g, and for instance will not work on linksys broadcom based AP hardware (because wifi interfaces are configured using different names and parameters)! So only copy/paste change the needed parts, that differ with your templates! 117 119 118 120 {{{ … … 131 133 option filterwin2k 0 # enable for dial on demand 132 134 option localise_queries 1 133 option rebind_protection 1 # disable if upstream must serve RFC1918 addresses135 option rebind_protection 1 #! disable if upstream must serve RFC1918 addresses <--- change to 0 if local dns for wan won't work 134 136 option rebind_localhost 1 # enable for RBL checking and similar services 135 137 #list rebind_domain example.lan # whitelist RFC1918 responses for domains … … 148 150 #list bogusnxdomain '64.94.110.11' 149 151 150 config dhcp lan 152 config dhcp lan #! I doubt this one is even used... <--- 151 153 option interface lan 152 154 option start 100 … … 158 160 option ignore 1 159 161 160 # comment!161 # config dhcp wlgst162 # option interface wlgst163 # option start 5164 # option limit 252165 # option leasetime 1h162 #!Add extra dhcp-server for multiSSID hotspot if not bridging <--- 163 #!config dhcp wlgst 164 #! option interface wlgst 165 #! option start 5 166 #! option limit 252 167 #! option leasetime 1h 166 168 }}} 167 169 … … 185 187 config zone 186 188 option name wan 187 option network ' eth0' #change to wan189 option network 'wan' #!was eth0 <--- 188 190 option input REJECT 189 191 option output ACCEPT … … 192 194 option mtu_fix 1 193 195 194 # Allow multissid wlgst accespoint 195 #config zone 196 # option name wlgst 197 # option input REJECT 198 # option forward REJECT 199 # option output ACCEPT 200 201 # Changing wan > eth0 made all these rules active! 202 # Therefor no ssh access anymore from wan and lans is not available 196 #! Allow multiSSID wlgst zone if not bridging <--- 197 #!config zone 198 #! option name wlgst 199 #! option input REJECT 200 #! option forward REJECT 201 #! option output ACCEPT 202 203 # Changing eth0 > wan made all these rules active! 203 204 # Allow SSH 204 205 config rule … … 212 213 option dest wan 213 214 214 # Allow wlgst to internet wan215 # config forwarding216 # option src wlgst217 # option dest wan218 219 # Allow wlgst -> Router220 # Client DNS queries ordinate from dynamic UDP ports (>1023)221 # config rule222 # option src wlgst223 # option dest_port 53224 # option proto tcpudp225 # option target ACCEPT226 227 # Allow wlgst DHCP -> Router228 # DHCP communication uses UDP ports 67-68229 # config rule230 # option src wlgst231 # option src_port 67-68232 # option dest_port 67-68233 # option proto udp234 # option target ACCEPT215 #! Allow multiSSID wlgst to internet on wan <--- 216 #!config forwarding 217 #! option src wlgst 218 #! option dest wan 219 220 #! Allow multiSSID wlgst to DNS <--- 221 #! Client DNS queries ordinate from dynamic UDP ports (>1023) 222 #!config rule 223 #! option src wlgst 224 #! option dest_port 53 225 #! option proto tcpudp 226 #! option target ACCEPT 227 228 #! Allow multiSSID wlgst to DHCP -> Router <--- 229 #! DHCP communication uses UDP ports 67-68 230 #!config rule 231 #! option src wlgst 232 #! option src_port 67-68 233 #! option dest_port 67-68 234 #! option proto udp 235 #! option target ACCEPT 235 236 236 237 # We need to accept udp packets on port 68, … … 314 315 option netmask 255.0.0.0 315 316 316 config interface eth0 #wan applies firewall rules 317 #!this interface is wired to the Wireless Leiden infrastructure! 318 config interface wan #!interface name wan vs eth0 applies firewall rules <--- 317 319 option ifname eth0 318 # option type bridge 319 option proto static 320 #option proto dhcp321 option ipaddr 172.16.6.13322 option netmask 255.255.255.248323 option gateway 172.16.6.9324 option dns 172.16.6.9320 option type bridge #! use bridge to forward DHCP,DNS,captive portal,etc from WirelessLeiden node to 2nd multiSSID <--- 321 # option proto static #! Unique ip settings! <--- 322 option proto dhcp 323 # option ipaddr 172.16.6.13 324 # option netmask 255.255.255.248 325 # option gateway 172.16.6.9 326 # option dns 172.16.6.9 325 327 326 328 config interface lan … … 328 330 option type bridge 329 331 330 #config interface wlgst 331 # option ifname wlgst 332 # option type bridge 333 # option proto static 334 # option ipaddr 192.168.5.1 335 # option netmask 255.255.255.0 336 }}} 332 #!Add this interface if you NAT/Route the 2nd multiSSID internal <--- 333 #!config interface wlgst 334 #! option ifname wlgst 335 #! option type bridge 336 #! option proto static 337 #! option ipaddr 192.168.5.1 338 #! option netmask 255.255.255.0 339 }}} 340 337 341 #/etc/config/system 338 342 {{{ 339 343 config system 340 option hostname eduroam-bullet #!Unique !341 option timezone CET-1CEST,M3.5.0,M10.5.0/3 344 option hostname eduroam-bullet #!Unique name! <--- 345 option timezone CET-1CEST,M3.5.0,M10.5.0/3 #!correct timezone <--- 342 346 343 347 config timeserver ntp 344 list server 0.openwrt.pool.ntp.org348 list server pool.ntp.wleiden.net #! <--- 345 349 list server 1.openwrt.pool.ntp.org 346 350 list server 2.openwrt.pool.ntp.org … … 352 356 config wifi-device radio0 353 357 option type mac80211 354 option channel 5 358 option channel 5 #! Unique channels must be set for multiple AP's at one site! <--- 355 359 option macaddr MACADDRESS 356 option hwmode 11 g360 option hwmode 11bg #when using 5ghz vs 2,4ghz '11na' must be set! <--- 357 361 option htmode HT20 358 362 list ht_capab SHORT-GI-40 … … 361 365 list ht_capab DSSS_CCK-40 362 366 367 #! this interface is bridged to the vpn tunnel! 368 #! option server/key are credentials for radius client 363 369 config wifi-iface 364 370 option device radio0 … … 368 374 option ssid eduroam 369 375 option encryption wpa2 370 option server 192.168.4.1 371 option key somesecret 376 option server 192.168.4.1 #! Location of radius-server/proxy behind the tunnel 1812/1813 <--- 377 option key somesecret #! Radius client password to connect to the radiusserver <--- 372 378 373 379 config wifi-iface 374 380 option device radio0 375 option network wan # wlgst376 option bridge br-wan 381 option network wan #! use 'wlgst' when not bridging <--- 382 option bridge br-wan #! comment this if using 'wlgst'! 377 383 option mode ap 378 option ssid ap. haaswijk.wleiden.test384 option ssid ap.wlgst-bridge.wleiden.test #! Unique 2nd/virtual multiSSID! <--- 379 385 option encryption none 380 386 }}} … … 408 414 PID=/var/run/sysntpd.pid 409 415 416 #! werkt niet achter een nat see dns binding, dirty fix /etc/rc.local ? <--- 410 417 GATEWAY=$(netstat -rn | awk '/(0.0.0.0.*G)/ { print $2 }') 411 418 MAINSER="172.16.4.46" … … 445 452 iptables -I FORWARD -o tap+ -j ACCEPT 446 453 447 iptables -I INPUT -i br-lan -j ACCEPT # br+448 iptables -I FORWARD -i br-lan -j ACCEPT #br+449 iptables -I OUTPUT -o br-lan -j ACCEPT #br+450 iptables -I FORWARD -o br-lan -j ACCEPT #br+454 iptables -I INPUT -i br-lan -j ACCEPT #! old 'br+' wildcard was to general? 455 iptables -I FORWARD -i br-lan -j ACCEPT 456 iptables -I OUTPUT -o br-lan -j ACCEPT 457 iptables -I FORWARD -o br-lan -j ACCEPT 451 458 452 459 iptables -t nat -A POSTROUTING -o br-lan -j MASQUERADE … … 457 464 ::sysinit:/etc/init.d/rcS S boot 458 465 ::shutdown:/etc/init.d/rcS K stop 459 #tts/0::askfirst:/bin/ash --login 466 #tts/0::askfirst:/bin/ash --login #!richard commented these 3... 460 467 #ttyS0::askfirst:/bin/ash --login 461 468 #tty1::askfirst:/bin/ash --login … … 466 473 # Put your custom commands here that should be executed once 467 474 # the system init finished. By default this file does nothing. 475 #! This fixed the entropy not enough error for wpa/openvpn key? <--- 468 476 if [ -L "/dev/random" ]; 469 477 then … … 475 483 fi 476 484 /bin/sleep 5 485 #! This fixed date&time to resolve behind nat? <--- 477 486 /usr/sbin/ntpd -q -p pool.ntp.wleiden.net 478 487 exit 0 … … 500 509 while [ true ]; do 501 510 if [ -z "$(pid)" ]; then 502 ifconfig br-wan | grep -q inet\ || udhcpc # eth0511 ifconfig br-wan | grep -q inet\ || udhcpc #! use 'eth0' in nat-wlgst multiSSID mode! <--- 503 512 /etc/init.d/sysntpd start > /dev/null 504 513 /usr/sbin/openvpn $@ … … 509 518 510 519 ##TODO openvpn key/certificates 511 Skip to section 3 of this howto and when you have a tar file with keyscomeback ;-)520 Skip to section 3 of this howto, when you have a *.tar file with keys&config comeback ;-) 512 521 513 522 # upload openvpn config and keys (keys.tar) … … 562 571 Kan inloggen via public ssh key op sunny/sunfire.wleiden.net kan daarinderdaad het script starten maar vervolgens kan deze niks vinden. Lijkt erop dat de oude server certificaten niet aanwezig zijn en er kunnen dan geen afgeleide client certifcaten gemaakt worden tevens missen er config bestanden, dus alles moet opnieuw? Hoe maak ik dit lokaal na? 563 572 Namaken: https://help.ubuntu.com/community/OpenVPN 564 Een easyrsa "server" certificate aanmaken, in de handleiding i.p.v. admin group die ontbreekt sudokiezen. Tevens locatie van het cn bestand fixen met symlink!573 Een easyrsa "server" certificate aanmaken, in de handleiding i.p.v. "admin" group die ontbreekt "sudo" kiezen. Tevens locatie van het cn bestand fixen met symlink! 565 574 566 575
