Changes between Version 45 and Version 46 of WikiStart
- Timestamp:
- May 5, 2013, 3:05:20 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WikiStart
v45 v46 19 19 20 20 == Betrokkenheid van Wireless Leiden? == 21 22 TODO geschiedenis toevoegen? 21 23 22 24 De betekenis en werkwijze van eduroam voor dit Wireless Leiden project is vanuit een "aanbieders" perspectief. Daarbij zal voornamelijk de onderliggende technische werking van de infrastructuur om eduroam accesspoints (voor gebruikers) te realiseren ter sprake komen. … … 24 26 Als partieel serviceprovider koppelt Wireless Leiden eduroam gebruikers automatisch en beveiligd door aan de daarvoor aangewezen (onderwijs)netwerken. Een onderwijsinstelling vervult vaak meerdere rollen binnen het eduroam project inclusief internet-gateway, maar Wireless Leiden beperkt zich puur tot de ondersteunende koppeling en integratie van deze diensten. 25 27 26 Het unieke aan dit project is niet het scheiden van de identity/service provider eigenschap, maar de integratie van de verdeelde diensten over het onafhankelijk en "open" netwerk van Wireless Leiden dat zich buiten de ur huisvest.28 Het unieke aan dit project is niet het scheiden van de identity/service provider eigenschap, maar de integratie van de verdeelde diensten over het onafhankelijk en "open" netwerk van Wireless Leiden dat zich buiten de deur huisvest. 27 29 Dit maakt het exploiteren van eduroam draadloze dekking via het Wireless Leiden netwerk in publieke ruimte niet alleen eenvoudig, flexibel en betaalbaar maar kan dat zelfs op stadsniveau! De huidige implementatie is een win-win situatie voor betrokken partijen, door de huidige multi SSID techniek neemt zowel de dekking van het eduroam netwerk van een (sponserende) onderwijsinstelling als het netwerk van Wireless Leiden toe. Dit in tegenstelling tot de vaak beperkt inpandige exploitatie door onderwijsinstellingen van hun eigen geisoleerde fysieke en gesloten infrastructuur, die zich gemakkelijk door het graven/leggen van dure kabelverbindingen laat uitstellen of zelfs afstellen. 28 30 … … 91 93 # when blinking red/green the reset button can be released 92 94 # the device is now in tftp mode 93 # todo get in tftp without reset button... but via triggering mtd?94 95 ## use / installtftpclient utility to flash the openwrt image95 # todo get in tftp without reset button... via triggering mtd in AirOS? 96 97 ## use tftpclient utility to flash the openwrt image 96 98 tftp 192.168.1.20 97 99 binary … … 120 122 {{{ 121 123 ## create folder structure for customized config files! 124 mkdir -p customize/etc/openvpn 122 125 mkdir -p customize/etc/config 123 126 mkdir -p customize/etc/init.d 124 127 mkdir -p customize/sbin 125 128 mkdir -p customize/usr/sbin 129 130 ##copy/make files to use as template! 131 cp backup/etc/config/dhcp customize/etc/config/ 132 cp backup/etc/config/firewall customize/etc/config/ 133 cp backup/etc/config/network customize/etc/config/ 134 cp backup/etc/config/system customize/etc/config/ 135 cp backup/etc/config/wireless customize/etc/config/ 136 137 cp backup/etc/init.d/openvpn customize/etc/config/ 138 cp backup/etc/init.d/sysntpd customize/etc/config/ 139 140 cp backup/etc/firewall.user customize/etc/config/ 141 cp backup/etc/inittab customize/etc/config/ 142 cp backup/etc/rc.local customize/etc/config/ 143 144 touch customize/etc/sbin/wifi-update 145 touch customize/usr/sbin/iopenvpn 146 147 ## adjust your template files using the following examples! 126 148 }}} 127 149 … … 133 155 option filterwin2k 0 # enable for dial on demand 134 156 option localise_queries 1 135 option rebind_protection 1 #! disable if upstream must serve RFC1918 addresses <--- change to 0 if local dns for wan won't work157 option rebind_protection 1 #! disable if upstream must serve RFC1918 addresses <--- change to 0 if local dns "wleiden.net" won't resolve 136 158 option rebind_localhost 1 # enable for RBL checking and similar services 137 159 #list rebind_domain example.lan # whitelist RFC1918 responses for domains … … 316 338 317 339 #!this interface is wired to the Wireless Leiden infrastructure! 318 config interface wan #!interface name wan vs eth0 applies firewall rules <---340 config interface wan #!interface name wan vs eth0 applies /etc/config/firewall rules <--- 319 341 option ifname eth0 320 342 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 343 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 344 option peerdns 172.16.6.9 #! if dhcp is used, local dns wleiden.net resolve fix?<--- 345 # option proto static #! Unique static ip vs dhcp! <--- 346 # option ipaddr 172.16.6.13 #! Unique ip settings differ! <--- 347 # option netmask 255.255.255.248 #! Unique ip settings differ! <--- 348 # option gateway 172.16.6.9 #! Unique ip settings differ! <--- 349 # option dns 172.16.6.9 #! Unique ip settings differ! <--- 327 350 328 351 config interface lan … … 330 353 option type bridge 331 354 332 #!Add this interface if you NAT/Route the 2nd multiSSID internal<---355 #!Add this interface if you internally NAT/Route the 2nd multiSSID instead of bridge <--- 333 356 #!config interface wlgst 334 357 #! option ifname wlgst … … 342 365 {{{ 343 366 config system 344 option hostname eduroam-bullet #!Unique name ! <---345 option timezone CET-1CEST,M3.5.0,M10.5.0/3 #!correct timezone <---367 option hostname eduroam-bullet #!Unique name differ! <--- 368 option timezone CET-1CEST,M3.5.0,M10.5.0/3 #!correct timezone Amsterdam Netherlands <--- 346 369 347 370 config timeserver ntp 348 list server pool.ntp.wleiden.net #! <---371 list server pool.ntp.wleiden.net #! WirelessLeiden local ntp server <--- 349 372 list server 1.openwrt.pool.ntp.org 350 373 list server 2.openwrt.pool.ntp.org … … 354 377 #/etc/config/wireless 355 378 {{{ 356 config wifi-device radio0 357 option type mac80211 358 option channel 5 #! Unique channels must be set for multiple AP's at one site! <---359 option macaddr MACADDRESS 379 config wifi-device radio0 #! names and config parameters are different for wifi architectures, ar71xx,brcm47xx,x86,etc <--- 380 option type mac80211 381 option channel 5 #! Unique channels must be set since multiple AP's at one site differs 1,6,11! <--- 382 option macaddr MACADDRESS # this will be set by another script, leave it alone!!! <--- 360 383 option hwmode 11bg #when using 5ghz vs 2,4ghz '11na' must be set! <--- 361 384 option htmode HT20 … … 372 395 option bridge br-lan 373 396 option mode ap 374 option ssid eduroam 397 option ssid eduroam #! its all about this one!!!<--- 375 398 option encryption wpa2 376 399 option server 192.168.4.1 #! Location of radius-server/proxy behind the tunnel 1812/1813 <--- … … 488 511 }}} 489 512 490 The following files need to be created but are common on all ap's that are used for this setup. 491 492 #/sbin/wifi-update TODO TEST!!! 513 514 #/sbin/wifi-update #test create yourself 493 515 {{{ 494 516 #!/bin/sh … … 499 521 }}} 500 522 501 #/usr/sbin/iopenvpn 523 #/usr/sbin/iopenvpn #create yourself 502 524 {{{ 503 525 #!/bin/sh … … 517 539 }}} 518 540 519 ##TODO openvpn key/certificates 520 Skip to section 3 of this howto, when you have a *.tar file with keys&config comeback ;-) 521 522 # upload openvpn config and keys (keys.tar)541 Setup openvpn key/certificates/config for the AP, Skip to section 3 of this howto, when you have a *.tar file with keys&config comeback ;-) 542 543 {{{ 544 ## put openvpn config and keys in customize folder! 523 545 tar -xf $nameofyour.tar 524 cp keys/* etc/openvpn/ 525 526 ## install config files to correct location 527 # 546 cp keys/* customize/etc/openvpn/ 547 548 ## copy/install customized template to AP 528 549 scp -r customize/ root@192.168.1.100:/ 529 530 ## use ssh to configure final settings 550 }}} 551 552 Finnaly use ssh again to configure final settings 553 {{{ 531 554 ssh root@192.168.1.20 532 555 533 ## openvpn specific config 556 ## enable openvpn 557 chmod +x /usr/sbin/iopenvpn 534 558 chmod +x /etc/openvpn/up.sh 535 559 /etc/init.d/openvpn enable 536 560 537 ## activate wifi to add macadress to config file 561 562 563 ## activate wifi to add MACadress to /etc/config/wireless file 538 564 /sbin/wifi stop 539 565 #/sbin/wifi start … … 547 573 reboot;exit 548 574 575 ## done 576 #check your working "eduroam" accesspoint! 549 577 }}} 550 578 … … 568 596 Voornamelijk de config van raddb helemaal ombouwen omdat alle parameters voor FREEBSD zijn! dan nog een iptable edit doen en dan deed die het??? 569 597 570 === 3 certnode sunfire uitzoeken === 598 === 3 certnode === 599 Voor het functioneren van openvpn waaronder beveiligen en herkennen van server en unieke clients word easy-rsa gebruikt. Het idee is om op een vertrouwde permanente machine "certnode" een permanente opzet te maken waar een openvpn server certificate voor de radius-server/proxy word aangemaakt, dat weer de basis zal vormen voor client certificaten voor de verschillende accesspoints. Het eerste gebeurt eenmalig en zal lokaal op de certnode bewaart moeten blijven, het tweede gebeurt per op te leveren unieke AP waar er meerdere van zullen zijn. Het server certificaat + openvpn settings zal eenmalig van de certnode op de radius-server/proxy geplaatst worden. De unieke client certificaten worden "per AP" eenmalig op de certnode aangemaakt en vervolgens eenmalig per uniek AP geflashed! Hierdoor zijn de AP's individueel te volgen en te beheren om toegang tot the radius-server/proxy te ontzeggen. 600 571 601 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? 572 602 Namaken: https://help.ubuntu.com/community/OpenVPN 573 603 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! 574 575 576 604 Daarna kan je easyrsa "client" certificate aanmaken, enige opmerking daar is dat je KEY_CN=client voor het commando plaatst anders database error. Nu in de oude trend kun je het eduroam-cert script aanpassen en benodigde (geupdate)config bestanden in map key's plaatsen en daarin een map met packages aanmaken. Wanneer je dan het script draait maakt die inderdaad een tar bestand met alle instellingen. 577 578 605 TODO Verzin leuke manier om dit in een batch workflow voor veel AP's clients in te passen... denken we vanuit dit concept met tar bestand of moeten we iets maken dat meteen meedere parameters zoals multiSSID ip-adres hostname wifichannel etc meeneemt op basis van MAC adres? Nog uitzoeken welk deel er naar de server moet 4 bestanden ca dh1024 server.crt/key? 606 607 #/etc/openvpn/easy-rsa/keys/client.conf 608 {{{ 609 client 610 dev tap0 611 proto tcp #! for flappering/instable routing on W.L. use TCP instead of udp <--- 612 remote 172.17.169.67 53 #! location of openvpn server(radius-server/proxy & gateway) on the WireLessLeiden network! <--- 613 resolv-retry infinite 614 persist-key 615 persist-tun 616 ca /etc/openvpn/ca.crt 617 cert /etc/openvpn/client.crt 618 key /etc/openvpn/client.key 619 verb 3 620 log /var/log/openvpn.log 621 up /etc/openvpn/up.sh 622 script-security 2 623 keepalive 10 180 #! these settings keep the tunnel alive on the W.L. network<--- 624 }}} 625 626 # /usr/local/bin/eduroam-client-openvpn-cert 627 {{{ 628 #!/bin/sh 629 630 # put me in /usr/local/bin 631 632 FROMBASE=./keys 633 TOBASE=./keys/packages 634 COMMON=$1 635 TAR=$TOBASE/$COMMON.tar 636 USER=$SUDO_USER 637 CLIENT=client 638 639 if [ ! $1 ]; then 640 echo "no common name given" 641 exit 1 642 fi 643 644 if [ ! -f $TAR ]; then 645 646 cd /etc/openvpn/easy-rsa 647 648 . ./vars 649 KEY_CN=$COMMON ./pkitool $COMMON 650 651 mv $FROMBASE/$COMMON.key $FROMBASE/$CLIENT.key 652 mv $FROMBASE/$COMMON.crt $FROMBASE/$CLIENT.crt 653 654 tar -cf $TAR \ 655 $FROMBASE/ca.crt \ 656 $FROMBASE/$CLIENT.key \ 657 $FROMBASE/$CLIENT.crt \ 658 $FROMBASE/client.conf \ 659 $FROMBASE/up.sh 660 661 cp $TAR /home/$USER/$COMMON.tar 662 chown $USER /home/$USER/$COMMON.tar 663 664 else 665 666 echo "$TAR was already created" 667 exit 1 668 669 fi 670 }}} 671 579 672 580 673 = Old HOWTO =