Changes between Version 43 and Version 44 of WikiStart


Ignore:
Timestamp:
May 5, 2013, 1:15:22 PM (13 years ago)
Author:
walter
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiStart

    v43 v44  
    42426. internet?
    4343
     44Wat 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
    4446Met 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.
    4547
    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! 
     48Door 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!
    4749
    4850=== 1 setup eduroam !AccessPoints ===
     
    114116}}}
    115117
    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 coloured 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!
     118For 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!
    117119
    118120{{{
     
    131133        option filterwin2k      0  # enable for dial on demand
    132134        option localise_queries 1
    133         option rebind_protection 1  # disable if upstream must serve RFC1918 addresses
     135        option rebind_protection 1  #! disable if upstream must serve RFC1918 addresses <--- change to 0 if local dns for wan won't work
    134136        option rebind_localhost 1  # enable for RBL checking and similar services
    135137        #list rebind_domain example.lan  # whitelist RFC1918 responses for domains
     
    148150        #list bogusnxdomain     '64.94.110.11'
    149151
    150 config dhcp lan
     152config dhcp lan #! I doubt this one is even used... <---
    151153        option interface        lan
    152154        option start    100
     
    158160        option ignore   1
    159161
    160 #comment!
    161 #config dhcp wlgst
    162 #        option interface        wlgst
    163 #        option start   5
    164 #       option limit    252
    165 #       option leasetime        1h
     162#!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
    166168}}}
    167169
     
    185187config zone
    186188        option name             wan
    187         option network          'eth0' #change to wan
     189        option network          'wan' #!was eth0 <---
    188190        option input            REJECT
    189191        option output           ACCEPT
     
    192194        option mtu_fix          1
    193195
    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!
    203204# Allow SSH
    204205config rule
     
    212213        option dest             wan
    213214
    214 # Allow wlgst to internet wan
    215 #config forwarding
    216 #       option src      wlgst
    217 #       option dest     wan
    218 
    219 # Allow wlgst  -> Router
    220 # Client DNS queries ordinate from dynamic UDP ports (>1023)
    221 #config         rule
    222 #       option src              wlgst
    223 #       option dest_port        53
    224 #       option proto            tcpudp
    225 #       option target           ACCEPT
    226 
    227 # Allow wlgst DHCP -> Router
    228 # DHCP communication uses UDP ports 67-68
    229 #config         rule
    230 #       option src      wlgst
    231 #       option src_port 67-68
    232 #       option dest_port        67-68
    233 #       option proto    udp
    234 #       option target   ACCEPT
     215#! 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
    235236
    236237# We need to accept udp packets on port 68,
     
    314315        option netmask  255.0.0.0
    315316
    316 config interface eth0 #wan applies firewall rules
     317#!this interface is wired to the Wireless Leiden infrastructure!
     318config interface wan #!interface name wan vs eth0 applies firewall rules <---
    317319        option ifname   eth0
    318 #       option type     bridge
    319         option proto    static
    320 #       option proto    dhcp
    321         option ipaddr   172.16.6.13
    322         option netmask  255.255.255.248
    323         option gateway  172.16.6.9
    324         option dns      172.16.6.9     
     320        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     
    325327       
    326328config interface lan
     
    328330        option type     bridge
    329331
    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
    337341#/etc/config/system
    338342{{{
    339343config  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 <---
    342346
    343347config  timeserver ntp
    344         list server     0.openwrt.pool.ntp.org
     348        list server     pool.ntp.wleiden.net #! <---
    345349        list server     1.openwrt.pool.ntp.org
    346350        list server     2.openwrt.pool.ntp.org
     
    352356config wifi-device  radio0
    353357        option type     mac80211
    354         option channel  5
     358        option channel  5 #! Unique channels must be set for multiple AP's at one site! <---
    355359        option macaddr  MACADDRESS
    356         option hwmode   11g
     360        option hwmode   11bg #when using 5ghz vs 2,4ghz '11na' must be set! <---
    357361        option htmode   HT20
    358362        list ht_capab   SHORT-GI-40
     
    361365        list ht_capab   DSSS_CCK-40
    362366
     367#! this interface is bridged to the vpn tunnel!
     368#! option server/key are credentials for radius client
    363369config wifi-iface
    364370        option device   radio0
     
    368374        option ssid     eduroam
    369375        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 <---
    372378
    373379config wifi-iface
    374380        option device   radio0
    375         option network  wan #wlgst
    376         option bridge   br-wan
     381        option network  wan #! use 'wlgst' when not bridging <---
     382        option bridge   br-wan #! comment this if using 'wlgst'!
    377383        option mode     ap
    378         option ssid     ap.haaswijk.wleiden.test
     384        option ssid     ap.wlgst-bridge.wleiden.test #! Unique 2nd/virtual multiSSID! <---
    379385        option encryption none
    380386}}}
     
    408414PID=/var/run/sysntpd.pid
    409415
     416#! werkt niet achter een nat see dns binding, dirty fix /etc/rc.local ? <---
    410417GATEWAY=$(netstat -rn | awk '/(0.0.0.0.*G)/ { print $2 }')
    411418MAINSER="172.16.4.46"
     
    445452iptables -I FORWARD -o tap+ -j ACCEPT
    446453
    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+
     454iptables -I INPUT -i br-lan -j ACCEPT   #! old 'br+' wildcard was to general?
     455iptables -I FORWARD -i br-lan -j ACCEPT
     456iptables -I OUTPUT -o br-lan -j ACCEPT 
     457iptables -I FORWARD -o br-lan -j ACCEPT
    451458
    452459iptables -t nat -A POSTROUTING -o br-lan -j MASQUERADE
     
    457464::sysinit:/etc/init.d/rcS S boot
    458465::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...
    460467#ttyS0::askfirst:/bin/ash --login
    461468#tty1::askfirst:/bin/ash --login
     
    466473# Put your custom commands here that should be executed once
    467474# the system init finished. By default this file does nothing.
     475#! This fixed the entropy not enough error for wpa/openvpn key? <---
    468476if [ -L "/dev/random" ];
    469477then
     
    475483fi
    476484/bin/sleep 5
     485#! This fixed date&time to resolve behind nat? <---
    477486/usr/sbin/ntpd -q -p pool.ntp.wleiden.net
    478487exit 0
     
    500509while [ true ]; do
    501510  if [ -z "$(pid)" ]; then
    502     ifconfig br-wan | grep -q inet\  || udhcpc #eth0
     511    ifconfig br-wan | grep -q inet\  || udhcpc #! use 'eth0' in nat-wlgst multiSSID mode! <---
    503512    /etc/init.d/sysntpd start > /dev/null
    504513    /usr/sbin/openvpn $@
     
    509518
    510519##TODO openvpn key/certificates
    511 Skip to section 3 of this howto and when you have a tar file with keys comeback ;-)
     520Skip to section 3 of this howto, when you have a *.tar file with keys&config comeback ;-)
    512521
    513522# upload openvpn config and keys (keys.tar)
     
    562571Kan 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?
    563572Namaken: https://help.ubuntu.com/community/OpenVPN
    564 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!
     573Een 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!
    565574
    566575