Presentation is loading. Please wait.

Presentation is loading. Please wait.

實驗三 無線網路與802.1x與RADIUS 瞭解802.1x的認證機制 Supplicant →使用peap方案

Similar presentations


Presentation on theme: "實驗三 無線網路與802.1x與RADIUS 瞭解802.1x的認證機制 Supplicant →使用peap方案"— Presentation transcript:

1 實驗三 無線網路與802.1x與RADIUS 瞭解802.1x的認證機制 Supplicant →使用peap方案
Authenticator →使用Host AP Authentication Server →使用Free RADIUS 繳交時間:2006/11/16

2 實驗目的 Station Join到AP之後,對於認證方式傳統上都是透過一台AP本身去執行的。
在802.1x機制上,提供Authentication Server(即AS),AS可以同時服務許多台AP,並且提供認證與記帳等機制(AAA)。 利用架設802.1x相關環境來瞭解802.1x運作的方式,以及透過Ethereal抓取EAP與Radius封包來瞭解運作流程。 EAP有多種身分認證方式,其中包括EAP-MD5、EAP-TLS、EAP-PEAP……(參見課本第五章介紹)

3 知識背景 Supplicant Authenticator Authentication Server 使用peap
Authenticator 使用Host AP Daemon SSID : netlab Authentication Server 使用Free RADIUS 需設定AP到AS加密的key,即Shared Secret AP要與Radius建立連線,負責傳送相關的message到AS與Supplicant之間,一開始僅允許Station的traffic流向AS,經由認證之後才可連接到Internet 負責使用者的認證與計費機制 Station連結上AP,並且輸入在AS中登記好的帳號密碼後才可以上網 Internet

4 基礎概念 802.1x 運作流程

5 基礎概念 HOSTAP三部分 HOSTAP driver for prism (2/2.5/3) HOSTAPD
此為特別的driver,會將無線網路卡以AP的模式驅動 本driver可設定無線網卡成為AP模式 HOSTAPD 主要負責802.1x的部分,可以利用hostapd.conf簡單設定AP的認證機制 HOSTAP utility 主要是一些公用程式可以把參數傳給hostap-driver,以方便作一些測試或者其他用途

6 實驗設備與環境 硬體 軟體 電腦兩台(Linux FC5): 筆記型電腦:需有無線網卡
一台接上有線網路當作RADIUS Server使用 一台架設hostap,需有兩張網卡用作bridge 筆記型電腦:需有無線網卡 軟體 Authentication Server:採用Free RADIUS Authenticator:採用Host AP Daemon Supplicant:採用windows內建的802.1X verification function方案 Ethereal:抓EAP與RADIUS封包

7 實驗方法與步驟 Authentication Server (1/10)
抓取Free RADIUS版本。 wget ftp://ftp.freeradius.org/pub/radius/freeradius tar.gz 解壓縮FREERADIUS抓回來的版本。 tar zxvf freeradius tar.gz

8 實驗方法與步驟 Authentication Server (2/10)
切換到FREERADIUS解壓縮後的目錄,並且執行./configure設定編譯時所需用到的相關參數。 cd freeradius-1.1.3 ./configure 對程式作編譯。 make 安裝編譯好的執行檔與相關設定檔。 make install

9 實驗方法與步驟 Authentication Server (3/10)
切換到設定檔預設安裝的目錄,並且對RADIUS Server進行設定,首先修改允許連線到此台RADIUS Server的AP,即802.1x中的Authenticator相關資訊。 cd /usr/local/etc/raddb vi clients.conf

10 實驗方法與步驟 Authentication Server (4/10)
設定將要連線進來的AP相關資訊。包括對AP之間traffic所使用加密的key,以及AP的名稱。 在第99行中新增四行資訊: client /24{  IP address and mask of AP secret = secret  encryption key between AP and AS shortname = netlab15  Name of AP }

11 實驗方法與步驟 Authentication Server (5/10)
修改使用者登入時所需要的設定檔。 cd /usr/local/etc/raddb vi users 增加使用者帳號,並且設定使用者密碼與認證的方式。 在第96行新增兩行資訊: “netlab” Auth-Type := EAP, User-Password == “hello” Reply-Message = “Hello, %u”

12 實驗方法與步驟 Authentication Server (6/10)
Open the main configuration file radiusd.conf a. Make sure mschap contains: mschap { authtype = MS-CHAP 認證方法 use_mppe = yes assign key require_encryption = yes 要加密 require_strong = yes 128 bit }

13 實驗方法與步驟 Authentication Server (7/10)
Make sure the authorize and authenticate contains: authorize{ 設定mschap作的動作 preprocess 事前處理的動作 mschap 認證機制 suffix parser user name的準則 eap 採用eap files 開user檔看user是否合法 } authenticate { Auth-Type MS-CHAP { mschap eap

14 實驗方法與步驟 Authentication Server (8/10)
Open eap.conf Set default_eap_type to peap station認證方式 default_eap_type = peap Since PEAP is using TLS, the TLS section must contain: tls { private_key_password = whatever private_key_file = ${raddbdir}/certs/cert-srv.pem certificate_file = ${raddbdir}/certs/cert-srv.pem # Trusted Root CA list CA_file = ${raddbdir}/certs/root.pem dh_file = ${raddbdir}/certs/dh random_file = ${raddbdir}/certs/random }

15 實驗方法與步驟 Authentication Server (9/10)
Find the peap section, and make sure it contain the following peap { # The tunneled EAP session needs a default # EAP type which is separate from the one for # the non-tunneled EAP module. Inside of the # PEAP tunnel, we recommend using MS-CHAPv2, # as that is the default type supported by # Windows clients. default_eap_type = mschapv2 }

16 實驗方法與步驟 Authentication Server (10/10)
execute the RADIUS server radiusd –f –X

17

18 實驗方法與步驟 Authenticator (1/7)
首先架設hostap。FC5 已預設安裝 HostAP driver, 只要搭配 Intersil Prism2 (2/2.5/3) 晶片的無線網卡, 就能將 Linux 電腦變成AP (若使用RH9,請參考課程網頁所提供文件來安裝hostap) vi /etc/sysconfig/network-scripts/ifcfg-wlan0 DEVICE=wlan0 BOOTPROTO=none HWADDR=00:60:B3:8D:D0:BF ONBOOT=no TYPE=Wireless MODE=Master ESSID=netlab Disable=no

19 實驗方法與步驟 Authenticator (2/7)
設定bridge Install yum utility yum install yum-utils Set bridge yum install bridge-utils brctl addbr br0 brctl addif br0 eth0 brctl addif br0 wlan0

20 實驗方法與步驟 Authenticator (3/7)
ifconfig eth0 down ifconfig wlan0 down ifconfig eth up ifconfig wlan up ifconfig br netmask up echo "1" > /proc/sys/net/ipv4/ip_forward route add default gw 請man brctl,eth0與wlan0請依你的device名稱而定

21 實驗方法與步驟 Authenticator (4/7)
HOSTAP (hostapd) 需另外下載 cd hostapd-0.4.9 make

22 實驗方法與步驟 Authenticator (5/7)
修改內部跑的Host AP Daemon的設定檔來啟用802.1x的功能。 vi hostapd.conf 新增或修改部份資訊: # Require IEEE 802.1X authorization ieee8021x=1 # The own IP address of the access point (used as NAS-IP-Address) own_ip_addr=

23 實驗方法與步驟 Authenticator (6/7)
# RADIUS authentication server auth_server_addr= auth_server_port=1812 auth_server_shared_secret=secret # RADIUS accounting server acct_server_addr= acct_server_port=1813 acct_server_shared_secret=secret

24 實驗方法與步驟 Authenticator (7/7)
執行./hostapd可以得知各參數 啟動hostap 執行./hostapd ./hostapd.conf 請另外開啟終端機下指令 iwconfig wlan0 ,檢查encryption key是否off,若為on請下指令: Iwconfig wlan0 enc off encryption key是對傳輸連線加密,使用者端亦須擁有解密金鑰,本次實驗著重身分認證流程,不考慮這方面。

25 實驗方法與步驟 Supplicant 設定(1/3)

26 實驗方法與步驟 Supplicant 設定(2/3)

27 實驗方法與步驟 Supplicant 設定(3/3)

28

29

30

31

32 實驗記錄(請詳細說明) Free RADIUS架設過程中更改了哪些設定,遇到哪些困難? 架設hostap過程中,遇到了哪些困難?
hostapd更改了哪些設定,遇到哪些困難? station採用哪種方法,遇到哪些困難? 請抓取station與AP之間的EAP無線封包。(用Ethereal抓取之後可用EAP或EAPOL來秀出此類封包) 請抓取AP與RADIUS Server的RADIUS有線封包。 (用Ethereal抓取之後可用RADIUS來秀出此類封包)

33 問題討論 分析EAP的封包結構。(請貼圖證明) 分析RADIUS的封包結構。(請貼圖證明)
故意打錯密碼,再抓一次封包,分析其運作方式與封包內容有何不同。 請分析認證成功與失敗的流程。

34 注意事項 繳交時間:2006/11/16(週四課堂上繳交) 報告撰寫請以投影片所列項目(實驗紀錄與問題討論)為準,並請詳細說明。
報告以組別為單位繳交,請雙面列印。 需借網卡之組別至工三446B登記,期限一週。

35 加分題 根據原始設定大約十秒斷線,請同學去研究AP的hostapd.conf,找出讓station保持連線的解決方法。
同學亦可嘗試MD5認證方式,參照課本附錄 請多做其他嘗試,請問可以對hostap與RADIUS server做哪些設定方面的更動?

36 參考資料 802.1X Port-Based Authentication HOWTO Free RADIUS網站: Host AP
Free RADIUS網站: READE, INSTALL, doc/README, doc/* Host AP hostapd.conf內的說明


Download ppt "實驗三 無線網路與802.1x與RADIUS 瞭解802.1x的認證機制 Supplicant →使用peap方案"

Similar presentations


Ads by Google