uni-tuebingen / informatik / rechnernetze und internet / internetpraktikum
internetlab-logo
Fri, 29 Jun 2007 01:26:27 +0200
<
<
l18 link to edit new delete view new This element's history...
lab number 18:
2007-06-27 00:17:13: Joachim Schiele
2007-06-18 14:13:46: Joachim Schiele
2007-03-17 13:50:09: Marc-Oliver Pahl
2007-03-17 13:01:10: Marc-Oliver Pahl: - created -
WLAN
The Element is only visible inside a collection. l18.C320 previous TOC next view_structure link to edit new delete view new This element's history...
collection number 320:
2007-06-18 15:47:35: Joachim Schiele
2007-03-20 17:20:20: Joachim Schiele
2007-03-20 17:09:39: Joachim Schiele
2007-03-19 17:26:11: Marc-Oliver Pahl
2007-03-19 17:17:40: Marc-Oliver Pahl
[...]
The Element is only visible inside a collection. l18.C320.C333 view_structure link to edit new delete view new This element's history...
collection number 333:
2007-06-22 23:13:49: Joachim Schiele
2007-06-22 23:09:58: Joachim Schiele
2007-06-18 16:45:56: Joachim Schiele
2007-06-18 15:59:59: Joachim Schiele
2007-06-18 15:58:40: Joachim Schiele
[...]
The Element is only visible inside a collection. l18.C320.C333.c336 view_structure link to edit new delete view new This element's history...
collection number 336:
2007-06-29 01:14:02: Joachim Schiele
2007-06-29 01:05:04: Joachim Schiele
2007-06-27 03:09:15: Joachim Schiele
2007-06-27 02:40:48: Joachim Schiele
2007-06-27 02:23:32: Joachim Schiele
[...]
5.4. WPA-EAP (RADIUS)
The Element is only visible inside a collection. l18.C320.C333.c336.p478 link to edit new delete new This element's history...
page number 478:
2007-06-29 01:20:14: Joachim Schiele
2007-06-29 01:00:16: Joachim Schiele
2007-06-29 00:48:09: Joachim Schiele
2007-06-29 00:47:52: Joachim Schiele
2007-06-28 14:48:39: Joachim Schiele
[...]

WARNING


The wpa+eap(radius) part of this lab is not finished yet but should be finished 2007-06-27 17:00 o'clock. You can continue with MAC filters & Packet handling so far. I'm sorry for that ;P

2007-06-28 14:47 tried all day but there are still problems, I'll remove this if it's working or let you know

2007-06-29 00:36 it's working now. The problem was the version of wpa_supplicant and hostapd and if both are installed in version::0.6.0 there seems no problem using WPA-EAP with TLS. Please stay tuned, I will fix this part of the lab tomorrow Friday 2007-06-29 and with some luck you can start with this part on 2007-06-30.

WARNING

PS: may the wireshark be with you:
                         __
      o                 /' ) 
                      /'   (                          ,
                  __/'     )                        .' `;
   o      _.-~~~~'          ``---..__             .'   ;
     _.--'  b)                       ``--...____.'   .'
    (     _.      )).      `-._                     <
     `\|\|\|\|)-.....___.-     `-.         __...--'-.'.
 jgs   `---......____...---`.___.'----... .'         `.;
                                        `-`           `

Good documentation about WPA2+EAP can be obtained here:

 
The Element is only visible inside a collection. l18.C320.C333.c336.p470 link to edit new delete new This element's history...
page number 470:
2007-06-29 00:49:48: Joachim Schiele
2007-06-29 00:49:33: Joachim Schiele
2007-06-29 00:48:42: Joachim Schiele
2007-06-27 14:33:41: Joachim Schiele
2007-06-27 14:23:26: Joachim Schiele
[...]

Motivation: What is FreeRADIUS and what is it supposed to do:
The FreeRADIUS Server is a daemon for unix and unix like operating systems which allows one to set up a radius protocol server, which can be used for Authentication and Accounting various types of network access. To use the server, you also need a correctly setup client which will talk to it, including terminal servers, Ethernet Switches, Wireless Access Points or a PC with appropriate software which emulates it (PortSlave, radiusclient etc).

First we will have a look at how secure the host 2 host connections are and how secure the radius to ap communication is. Later we have a look at the WPA-EAP roaming feature.

Our setup will not differ much from what we had so far:
        pc3 (AP1)  ~ ~~ ~ ~~~~ ~ ~ ~ ~ ~ ~ Linux1 Client  
     br0 |      ~ ~~ ~ ~ ~~ ~  ~~ Linux2 Client
         |                                
         |-- pc2 (free!radius)
         |  eth0
     br0 |                       |      Cable* link
        pc4 (AP2)                ~ ~ ~~ Wireless link    

    for ip configuration:
       PC2 radius server    eth0: 10.0.1.2/24 
       PC3 ACCESS POINT 1    br0: 10.0.1.3/24 
       PC4 ACCESS POINT 2    br0: 10.0.1.4/24
       PC5 CLIENT 1         ath0: 10.0.1.5/24 
       PC6 CLIENT 2         ath0: 10.0.1.6/24 

    * the bad news, we need cables ;P    

Configure all PCs. You find all necessary configuration files for the configuration below. Perform the tests to see if everything is alright. In case of an emergency bind a towel around your head and jump out of the window next to you.

We will use:

  • EAP authentication utilizing PEAP with TLS
  • but with username and certificate on supplicant side
  • with ssid and password on hostapd side

There are also others but we won't focus on pros/cons of this.

  • EAP-PEAP/MSCHAPv2 (both PEAPv0 and PEAPv1)
  • EAP-PEAP/GTC (both PEAPv0 and PEAPv1)
  • EAP-PEAP/MD5-Challenge (both PEAPv0 and PEAPv1)
  • EAP-TTLS/EAP-MD5-Challenge
  • EAP-TTLS/EAP-GTC
  • EAP-TTLS/EAP-MSCHAPv2
  • EAP-TTLS/MSCHAPv2
  • EAP-TTLS/MSCHAP
  • EAP-TTLS/PAP
  • EAP-TTLS/CHAP
  • EAP-SIM
  • EAP-AKA
  • EAP-PAX
  • EAP-PSK
  • EAP-SAKE
  • EAP-FAST
  • EAP-GPSK (experimental)
 
The Element is only visible inside a collection. l18.C320.C333.c336.p484 link to edit new delete new This element's history...
page number 484:
2007-06-27 14:39:22: Joachim Schiele
2007-06-27 14:36:21: Joachim Schiele
2007-06-27 02:24:33: Joachim Schiele
2007-06-27 02:23:55: Joachim Schiele
2007-06-27 02:23:01: Joachim Schiele
[...]

bridge setup on pc3 | pc4

 pc3 # brctl addbr br0 
 pc3 # brctl addif br0 eth0
 pc3 # # use wlanconfig to set ath0 as AP not STA!!
 pc3 # brctl addif br0 ath0
 pc3 # # now do the ip configuration
 do the same for pc4 as well
 
The Element is only visible inside a collection. l18.C320.C333.c336.p480 link to edit new delete new This element's history...
page number 480:
2007-06-29 00:54:46: Joachim Schiele
2007-06-29 00:52:15: Joachim Schiele
2007-06-29 00:51:03: Joachim Schiele
2007-06-27 03:04:58: Joachim Schiele
2007-06-27 02:02:05: Joachim Schiele
[...]

hostapd config file

# Cleaned up example, see original hostapd.conf for comments.
# based on http://www.rinta-aho.org/docs/wlan/hostapd.conf

interface=ath0
driver=bsd
bridge=br0

logger_syslog=-1
logger_syslog_level=0
logger_stdout=-1
logger_stdout_level=0
debug=3
dump_file=/tmp/hostapd.dump
ctrl_interface=/var/run/hostapd

##### IEEE 802.11 related configuration #######################################

ssid=nlab1
macaddr_acl=0
auth_algs=1

##### IEEE 802.1X-REV related configuration ###################################

ieee8021x=1

##### RADIUS client configuration #############################################

own_ip_addr=10.0.1.5

auth_server_addr=10.0.1.2
auth_server_port=1812
auth_server_shared_secret=pw4radius

##### WPA/IEEE 802.11i configuration ##########################################

wpa=2
wpa_key_mgmt=WPA-EAP
wpa_pairwise=CCMP TKIP
rsn_preauth=1
#rsn_preauth_interfaces=br0

 
The Element is only visible inside a collection. l18.C320.C333.c336.p481 link to edit new delete new This element's history...
page number 481:
2007-06-29 00:53:31: Joachim Schiele
2007-06-29 00:52:37: Joachim Schiele
2007-06-27 02:01:40: Joachim Schiele
2007-06-27 02:00:42: Joachim Schiele
2007-06-27 01:57:58: Joachim Schiele: - created -

wpa_supplicant config file

# Cleaned up example, see original wpa_supplicant.conf for comments.
# based on http://www.rinta-aho.org/docs/wlan/wpa_supplicant.conf

ctrl_interface=/var/run/wpa_supplicant

eapol_version=1
ap_scan=1
fast_reauth=1

network={
        ssid="nlab1"
        scan_ssid=0
        mode=0
        proto=RSN
        key_mgmt=WPA-EAP
        auth_alg=OPEN
        eap=TLS
        identity="teemu"
        ca_cert="/etc/wpa_supplicant/cacert.pem"
        client_cert="/etc/wpa_supplicant/clientcert.pem"
        private_key="/etc/wpa_supplicant/clientkey.pem"
        private_key_passwd="pw4client" 
}

 
The Element is only visible inside a collection. l18.C320.C333.c336.p482 link to edit new delete new This element's history...
page number 482:
2007-06-29 01:17:43: Joachim Schiele
2007-06-29 01:15:18: Joachim Schiele
2007-06-29 01:13:27: Joachim Schiele
2007-06-29 00:57:54: Joachim Schiele
2007-06-29 00:57:27: Joachim Schiele
[...]

freeradius configuration files

=================== eap.conf =====================
#
# $Id: eap.conf,v 1.1 2005/05/18 13:58:26 teemu Exp $
#
# Cleaned up EAP example. See original eap.conf for comments.
#
        eap {
                default_eap_type = tls
                timer_expire     = 60
                ignore_unknown_eap_types = no
                cisco_accounting_username_bug = no
                
                md5 {
                }

                leap {
                }

                gtc {
                        auth_type = PAP
                }

                tls {
                        private_key_password = pw4server
                        private_key_file = ${raddbdir}/certs/serverkey.pem
                        certificate_file = ${raddbdir}/certs/servercert.pem
                        CA_file = ${raddbdir}/certs/cacert.pem
                        dh_file = ${raddbdir}/certs/dh
                        random_file = ${raddbdir}/certs/random
                        fragment_size = 1024
                }

                mschapv2 {
                }
        }

=================== users =====================
#
# Cleaned up example, see original users file for comments.
#

teemu   Auth-Type := EAP

=================== clients.conf =====================
#
# Cleaned up example, see original clients.conf for comments.
#

# WLAN Access Points in 10.0.0.0/8 network
client 10.0.0.0/8 {
    secret      = pw4radius
    shortname   = nlab1
}

 
The Element is only visible inside a collection. l18.C320.C333.c336.p487 link to edit new delete new This element's history...
page number 487:
2007-06-29 01:22:02: Joachim Schiele
2007-06-29 01:18:32: Joachim Schiele
2007-06-29 01:17:55: Joachim Schiele
2007-06-29 01:13:47: Joachim Schiele: - created -
You need to create certificates for the server and for the clients. Follow the steps found on http://www.rinta-aho.org/docs/wlan/wlan.html and use the script from there. You might need to adapt some things in the configuration found there.

Start with one client only. If one client is working try to add another one. Don't forget that every client needs it's own certificate.
 
The Element is only visible inside a collection. l18.C320.C333.c336.p483 link to edit new delete new This element's history...
page number 483:
2007-06-27 13:34:48: Joachim Schiele
2007-06-27 13:34:40: Joachim Schiele
2007-06-27 02:28:38: Joachim Schiele
2007-06-27 02:28:27: Joachim Schiele
2007-06-27 02:27:35: Joachim Schiele
[...]

starting the daemons + testing setup

 pc1 # sniffer alright?
 pc2 # /etc/init.d/radiusd start
 pc3 # hostapd /etc/hostapd/hostapd.conf
 pc4 # (nothing yet!)
 pc5 # wpa_supplicant -dd -K -t -i ath0 -c /etc/wpa_supplicant/wpa_supplicant.conf

Now test the setup using ping.

  • can linux1 ping pc2?
  • can linux2 ping pc2 as well?
  • can pc4 ping pc2?

 
The Element is only visible inside a collection. l18.C320.C333.c336.p485 link to edit new delete new This element's history...
page number 485:
2007-06-27 13:34:28: Joachim Schiele
2007-06-27 02:43:39: Joachim Schiele
2007-06-27 02:40:28: Joachim Schiele: - created -
You have to reconnect the client to be able to get all packets you need to answer the next question.
  • pc2 # tell wireshark bite the cable
  • pc5 # killall wpa_supplicant
  • pc5 # restart wpa_supplicant
  • watch pc1 + pc2:
    • pc1 # what happens between pc4 and linux1?
    • pc2 # what does wireshark reveal about hostapd <-> radius communication
 
The Element is only visible inside a collection. l18.C320.C333.c336.i343 link to edit new delete new This element's history...
input number 343:
2007-06-27 02:56:48: Joachim Schiele
2007-06-27 02:48:06: Joachim Schiele
2007-06-27 01:40:50: Joachim Schiele
2007-06-27 01:20:55: Joachim Schiele
2007-06-23 01:30:30: Joachim Schiele
[...]
5.4.10. What packets were exchanged between client1,ap and the radius server when client1 joined the network? Explain the meaning of those packets.
[3 credits]
 
The Element is only visible inside a collection. l18.C320.C333.c336.p486 link to edit new delete new This element's history...
page number 486:
2007-06-29 01:07:03: Joachim Schiele
2007-06-29 01:05:10: Joachim Schiele
2007-06-29 01:03:20: Joachim Schiele: - created -
Compared to WPA2-PSK, client "Linux1" can't decrypt "Linux2" packets in any way. That's because of the nature of WPA-EAP. But what is done if "Linux1" want's to talk to "Linux2"? And what is done with broadcast and multicast traffic?
 
The Element is only visible inside a collection. l18.C320.C333.c336.i341 link to edit new delete new This element's history...
input number 341:
2007-06-29 01:24:00: Joachim Schiele
2007-06-29 01:07:53: Joachim Schiele
2007-06-27 19:31:36: Joachim Schiele
2007-06-27 19:31:29: Joachim Schiele
2007-06-27 02:39:34: Joachim Schiele
[...]
5.4.12. What happens if Linux1 wants to talk to Linux2 and how is broadcast and multicast encrypted? (paste the relevant packet headers)
[2 credits]
 
The Element is only visible inside a collection. l18.C320.C333.c336.p479 link to edit new delete new This element's history...
page number 479:
2007-06-27 02:46:31: Joachim Schiele
2007-06-27 02:33:39: Joachim Schiele
2007-06-27 02:33:31: Joachim Schiele
2007-06-27 01:18:25: Joachim Schiele
2007-06-27 01:17:00: Joachim Schiele
[...]
Now we will have a look at the WPA-EAP roaming feature. You have to do two things:
  • disable linux2 wpa_supplicant
  • start a ping from linux1 to pc2
  • pc2 # tell wireshark bite the cable
  • pc4 # start hostapd as you did for pc3 already
  • pc5 # pray that pc5 wants to roam to pc4 or use the aluminum
  • watch pc1 + pc2:
    • pc1 # what happens between pc4 and linux1?
    • pc2 # what does wireshark reveal about hostapd <-> radius communication
 
The Element is only visible inside a collection. l18.C320.C333.c336.i344 link to edit new delete new This element's history...
input number 344:
2007-06-29 01:24:42: Joachim Schiele
2007-06-29 01:09:05: Joachim Schiele
2007-06-27 02:47:59: Joachim Schiele
2007-06-27 02:35:49: Joachim Schiele
2007-06-27 01:16:57: Joachim Schiele
[...]
5.4.14. What happens if one client roams to a different accesspoint?  (paste the relevant packet headers)
[4 credits]
 
The Element is only visible inside a collection. l18.C320.C333.c336 view_structure link to edit new delete view new This element's history...
collection number 336:
2007-06-29 01:14:02: Joachim Schiele
2007-06-29 01:05:04: Joachim Schiele
2007-06-27 03:09:15: Joachim Schiele
2007-06-27 02:40:48: Joachim Schiele
2007-06-27 02:23:32: Joachim Schiele
[...]
The Element is only visible inside a collection. l18.C320.C333 view_structure link to edit new delete view new This element's history...
collection number 333:
2007-06-22 23:13:49: Joachim Schiele
2007-06-22 23:09:58: Joachim Schiele
2007-06-18 16:45:56: Joachim Schiele
2007-06-18 15:59:59: Joachim Schiele
2007-06-18 15:58:40: Joachim Schiele
[...]
The Element is only visible inside a collection. l18.C320 previous TOC next view_structure link to edit new delete view new This element's history...
collection number 320:
2007-06-18 15:47:35: Joachim Schiele
2007-03-20 17:20:20: Joachim Schiele
2007-03-20 17:09:39: Joachim Schiele
2007-03-19 17:26:11: Marc-Oliver Pahl
2007-03-19 17:17:40: Marc-Oliver Pahl
[...]
 
© Lehrstuhl für Rechnernetze und Internet © labsystem mop 2005