茫茫網海中的冷日
         
茫茫網海中的冷日
發生過的事,不可能遺忘,只是想不起來而已!
 恭喜您是本站第 1671810 位訪客!  登入  | 註冊
主選單

Google 自訂搜尋

Goole 廣告

隨機相片
IMG_00033.jpg

授權條款

使用者登入
使用者名稱:

密碼:


忘了密碼?

現在就註冊!

小企鵝開談 : [轉貼]在 Linux 上建構一個 RADIUS 伺服器

發表者 討論內容
冷日
(冷日)
Webmaster
  • 註冊日: 2008/2/19
  • 來自:
  • 發表數: 15771
[轉貼]在 Linux 上建構一個 RADIUS 伺服器

在 Linux 上建構一個 RADIUS 伺服器

Build a RADIUS server on Linux


將遠端網路登入集中化並保證其安全    

Centralize and secure your remote network login s

2005 年 6 月 23 日


作為一名網路管理員,您需要為您所需管理的每個網路設備存放用於管理的用戶資訊。但是網路設備通常只支援有限的用戶管理功能。學習如何使用 Linux™ 上的一個外部 RADIUS 伺服器來驗證用戶,具體來說是透過一個 LDAP 伺服器進行驗證,可以集中放置儲存在 LDAP 伺服器上並且由 RADIUS 伺服器進行驗證的用戶資訊,從而既可以減少用戶管理上的管理開銷,又可以使遠端登入過程更加安全。

Summary:   As a network administrator, you need to keep administrative user information for each network device you need to manage. But network devices usually support only limited functions for user management. Learn how to use an external RADIUS server on Linux™ to authenticate users, particularly against an LDAP server, allowing you to centralize user information stored in the LDAP server and authenticated by the RADIUS server, thereby both reducing administrative overhead on user management and making the remote login process more secure.

 

    資料安全作為現代系統中網路安全的一部分,與系統安全一樣的重要,所以保護資料 —— 確保提供機密性、完整性和可用性 —— 對管理員來說至關重要。

    Data security is as important a component of network security to contemporary systems as systems security is, so protecting your data -- making sure you provide confidentiality, integrity, and availability -- is a paramount concern to administrators.

    在本文中,我將談到資料安全性的機密性方面:確保受保護的資料只能被授權用戶或系統存取。您將學習如何在 Linux 系統上建立和配置一個 Remote Authentication Dial-In User Service 伺服器(RADIUS),以執行對用戶的驗證、授權和記費(AAA)。

    In this article, I will address the confidentiality aspect of data security: Making sure protected data can only be accessed by authorized people or systems. You'll learn how to set up and configure a Remote Authentication Dial-In User Service server (RADIUS) on a Linux system to perform authentication, authorization, and accounting (AAA) for users.



各組成元素介紹

         首先讓我們談一談 RADIUS 協定、AAA 元件以及它們如何工作,另外還有 LDAP 協定。

        Let's start by talking about the RADIUS protocol, the AAA components and how they work, and the LDAP protocol.

        Remote Authentication Dial-In User Service 協定是在 IETF 的 RFC 2865 中定義的(請參閱 
參考資料
 獲 得相關鏈結)。它允許網路存取伺服器(NAS)執行對用戶的驗證、授權和記費。RADIUS 是基於 UDP 的一種用戶端/伺服器協定。RADIUS 用戶端是網路存取伺服器,它通常是一個路由器、交換機或無線存取點(存取點是網路上專門配置的節點;WAP 是無線版本)。RADIUS 伺服器通常是在 UNIX 或 Windows 2000 伺服器上運行的一個監護程式。

    The Remote Authentication Dial-In User Service protocol is defined in the IETF's RFC 2865 (see  Resources
 for a link). It allows a network access server (NAS) to perform authentication, authorization, and accounting for users. RADIUS is a client/server protocol based on UDP. The RADIUS client, the network access server, is typically a router, switch, or wireless access point (access points are specially configured nodes on networks; WAPs are wireless versions). The RADIUS server is usually a daemon process running on a UNIX or Windows 2000 server.


RADIUS 和 AAA

        如果 NAS 收到用戶連接請求,它會將它們傳遞到指定的 RADIUS 伺服器,後者對用戶進行驗證,並將用戶的配置資訊回傳給 NAS。然後,NAS 接受或拒絕連接請求。


        If the NAS receives user-connection requests, it passes them to the designated RADIUS server which authenticates the user and returns the user's configuration information to the NAS. Then, the NAS accepts or rejects the connection requests.

        功能完整的 RADIUS 伺服器可以支援很多不同的用戶驗證機制,除了 LDAP 以外,還包括:

        A full-featured RADIUS server can support a variety of mechanisms to authenticate users in addition to LDAP, including

  • PAP(Password Authentication Protocol,密碼驗證協定,與 PPP 一起使用,在此機制下,密碼以明文形式被發送到用戶端進行比較);PAP (Password Authentication Protocol, used with PPP in which the password is sent to the client as clear text for comparison);

  • CHAP(Challenge Handshake Authentication Protocol,挑戰交握驗證協定,比 PAP 更安全,它同時使用用戶名和密碼);CHAP (Challenge Handshake Authentication Protocol, more secure than PAP, it uses a username and password);
  • 本地 UNIX/Linux 系統密碼資料庫(/etc/passwd);the local UNIX/Linux system password database (/etc/passwd);
  • 其他本地資料庫。other local databases.


    在 RADIUS 中,驗證和授權是組合在一起的。如果發現了用戶名,並且密碼正確,那麼 RADIUS 伺服器將回傳一個  Access-Accept  回應,其中包括一些參數(屬性-值對),以保證對該用戶的存取。這些參數是在 RADIUS 中配置的,包括存取類型、協定類型、用戶指定該用戶的 IP 位址以及一個存取控制列表(ACL)或要在 NAS 上應用的靜態路由,另外還有其他一些值。


        Authentication and authorization are combined together in RADIUS. If the username is found and the password is correct, the RADIUS server returns an Access-Accept response including some parameters (attribute-value pairs) that grants access to the user. These parameters are configured in RADIUS and include service type, protocol type, IP address to assign the user, an access control list (ACL) or a static route to apply on the NAS, as well as other values.

    RADIUS 記費特性(在 RFC 2866 中定義;請參閱  參考資料  獲得相關鏈結)允許在連接 session 的開始和結束髮送資料,表明在 session 期間使用的可能用於安全或計費(billing)需要的大量資源 —— 例如時間、封包和位元組。     


        RADIUS accounting features (as defined in RFC 2866; see  Resources for a link) allow data to be sent at the start and end of connection sessions, indicating the amount of resources -- such as time, packets, and bytes -- used during the session which might be used for security or billing needs.


羽量級目錄存取協定     Lightweight Directory Access Protocol


    羽量級目錄存取協定(Lightweight Directory Access Protocol,LDAP)是一種開放標準,它定義了用於存取和更新類 X.500 目錄中資訊的一種方法。LDAP 可用於將用戶資訊保存在一個中央場所,從而不必將相同的資訊儲存在每個系統上。它還可以用於以一種一致的、可控制的方式維護和存取資訊。

    The Lightweight Directory Access Protocol (LDAP) is an open standard that defines a method for accessing and updating information in a X.500-like directory. LDAP can be used to keep user information in a central locale to avoid having to store identical user information on each system; it can also be used to maintain and access the information in a consistent and controlled manner.

    LDAP 在一個集中的目錄中管理用戶,從而簡化了用戶管理工作。除了儲存用戶資訊外,在 LDAP 中定義用戶還可以使一些可選特性得到啟用,例如限制登入的數量。在本文中,您將學習如何配置 RADIUS 伺服器,以便基於 LDAP 驗證用戶 —— 由於本文的重點在於 RADIUS,我不會描述關於 LDAP 伺服器的安裝和配置的細節。 OpenLDAP 是 LDAP 的一種開放源碼實作。在 OpenLDAP.org 上可以找到關於它的詳細資訊(請參閱 
參考資料 獲得相關鏈結)。

    LDAP simplifies user administration tasks by managing users in a central directory. In addition to storing user information, defining users in LDAP allows for such optional features as limiting the number of logins. In this article you'll learn how a RADIUS server is configured to authenticate users against LDAP -- since the article focuses on RADIUS, I will not describe the details on the installation and configuration of an LDAP server.OpenLDAP is an open source implementation of LDAP; you can find detailed information on it at OpenLDAP.org (see  Resourcesfor a link).



場景     The scenario

     想像以下場景:

    Imagine the following scenario:

  • 用戶在家裡可以透過撥號驗證存取他公司的內部網。 The user at home can access his company's intranet by dial-up authentication.
  • 帶無線支援的筆記本電腦可以透過無線驗證連接到一個校園網。 Wireless-enabled laptops can be connected to a campus network by wireless authentication.
  • 管理員使用他們的工作站透過管理用戶驗證以 telnet 或 HTTP 登入到網路設備。 Administrators use their workstations to log into network devices via telnet or HTTP via administrative user authentication.


    所有這些驗證任務都可以透過一個 RADIUS 伺服器基於一個中央 LDAP 伺服器來完成(見圖 1)。

    All the these authentication tasks can be done by a RADIUS server against a central LDAP server (see Figure 1).



圖 1. 透過 RADIUS 和 LDAP 進行驗證
     Authentication via RADIUS and LDAP
 
Authentication via RADIUS and LDAP

    在本文中,我將重點描述對最後一種選項的實作,作為對該解決方案的一個介紹。首先安裝 RADIUS 伺服器。

    In this article, I'll focus on implementing the last option as an introduction to the solution. Let's start by installing the RADIUS server.


安裝 RADIUS     Installing RADIUS

    RADIUS 伺服器軟體可以從多個地方獲得。在本文中,我將使用 FreeRADIUS(請參閱  參考資料  獲 得相關鏈結),但 Cisco Secure Access Control Server (ACS) 是一種集中式用戶存取控制框架,可用於跨 UNIX 和 Windows 上多個 Cisco 設備的用戶管理,並支援 Cisco 特有的協定 TACACS+(據說在支援 TACACS+ 的設備上可擁有更多的特性)。      


       RADIUS server software can be obtained from several sources. I'll be using FreeRADIUS in this article (see  Resources  for a link), but the Cisco Secure Access Control Server (ACS) is a centralized user access control framework for user management across Cisco devices that runs on UNIX and Windows and also supports the the Cisco proprietary protocol TACACS+ (which sports more user-management features on TACACS+-enabled devices).

    FreeRADIUS 是來自開放源碼社區的一種強大的 Linux 上的 RADIUS 伺服器,可用於如今的分散式和異質計算環境。FreeRADIUS 1.0.2 支援 LDAP、MySQL、PostgreSQL 和 Oracle 資料庫,並與諸如 EAP 和 Cisco LEAP 之類的網路協定相容。FreeRADIUS 目前被部署在很多大型生產網路系統中。


        FreeRADIUS is a powerful RADIUS server on Linux from the open source community which can fit in today's distributed and heterogeneous computing environment. FreeRADIUS 1.0.2 supports LDAP, MySQL, PostgreSQL, and Oracle databases and is compatible with such network protocols as EAP and Cisco LEAP. FreeRADIUS is currently being deployed in many large-scale production network systems.
 


    下面的步驟示範如何在 Red Hat Enterprise Linux Advanced Server 3.0 上安裝和測試 FreeRADIUS 1.0.2:

        The following steps demonstrate how to install and test FreeRADIUS 1.0.2 on Red Hat Enterprise Linux Advanced Server 3.0:       
清單 1. 安裝和測試 FreeRADIUS    
Installing and testing FreeRADIUS

tar -zxvf freeradius-1.0.2.tar.gz         - extract it with gunzip and tar
./configure
make
make install - run this command as root
radiusd or - start RADIUS server
radiusd -X - start RADIUS server in debug mode
radtest test test localhost 0 testing123 - test RADIUS server

    如果 radtest 收到一個回應,則表明 FreeRADIUS 伺服器工作正常。

    If  radtest receives a response, the FreeRADIUS server is working.

    同時我還推薦另一種免費工具,那就是 NTRadPing(請參閱  參考資料  獲得相關鏈結),它可用於測試來自 Windows 用戶端的驗證和授權請求。它可以顯示從 RADIUS 伺服器發回的詳細的回應,例如屬性值。

        I also recommend another free tool, NTRadPing (see  Resources  for a link), to test authentication and authorization requests from Windows clients. It can display detailed responses such as attributes value sent back from the RADIUS server.

    現在讓我們來配置 FreeRADIUS。

        Now let's configure FreeRADIUS.


配置 FreeRADIUS     Configuring FreeRADIUS

    RADIUS 伺服器的配置包括對伺服器、用戶端和用戶的配置(都是用於驗證和授權)。出於不同的需要,對 RADIUS 伺服器可以有不同的配置。幸運的是,大多數配置都是類似的。

        Configuring the RADIUS server consists of configuring the server, the client, and the user (both for authentication and authorization). There can be different configurations of the RADIUS server for different needs; fortunately most of the configurations are similar.



配置伺服器     Configuring the server

    FreeRADIUS 配置檔通常位於 /etc/raddb 資料夾下。首先,我們需要像下面這樣修改 radiusd.conf 文件。

       FreeRADIUS configuration files are usually stored in the /etc/raddb folder. First we need to modify the radiusd.conf file as shown.


清單 2. 修改 radiusd.conf     Modifying radiusd.conf



1) Global settings:

log_auth = yes - log authentication requests to the log file
log_auth_badpass = no - don't log passwords if request rejected
log_auth_goodpass = no - don't log passwords if request accepted

2) LDAP Settings:


modules {
ldap {
server = "bluepages.ibm.com" - the hostname or IP address of the LDAP server
port = 636 - encrypted communications
basedn = "ou=bluepages,o=ibm.com" - define the base Distinguished Names (DN),
- under the Organization (O) "ibm.com",
- in the Organization Unit (OU) "bluepages"
filter = "(mail=%u)" - specify search criteria
base_filter = "(objectclass=person)" - specify base search criteria
}

authenticate { - enable authentication against LDAP
Auth-Type LDAP {
ldap
}

    參數被設為使用 IBM BluePages,這是 LDAP 服務的一個實例。對於其他 LDAP 伺服器,參數可能有所不同。

        The parameters are set for working with IBM BluePages, an instance of an LDAP service. Parameters may be different for other LDAP servers.


配置用戶端     Configuring the client

    用戶端是在 /etc/raddb/clients.conf 檔中配置的。有兩種方式可用於配置 RADIUS 用戶端。您可以按 IP subnet 將 NAS 分組(清單 3),或者可以按主機名或 IP 位址列出 NAS(清單 4)。如果按照第二種方法,可以定義 shortname 和 nastype。


        Clients are configured in /etc/raddb/clients.conf. There are two ways to configure RADIUS clients. You can group the NAS by IP subnet (Listing 3) or you can list the NAS by hostname or IP address (Listing 4). When you follow the second method, shortnameand nastype can be defined.


清單 3. 按 IP subnet 將 NAS 分組     Grouping the NAS by IP subnet


client 192.168.0.0/24 {
secret = mysecret1 - the "secret" should be the same as configured on NAS
shortname = mylan - the "shortname" can be used for logging
nastype = cisco - the "nastype" is used for checkrad and is optional
}


清單 4. 按主機名或 IP 位址列出 NAS     Listing the NAS by hostname or IP address

client 192.168.0.1 {
secret = mysecret1
shortname = myserver
nastype = other
}



為驗證而配置用戶     Configuring the user for authentication

     檔 /etc/raddb/user 包含每個用戶的驗證和配置資訊。       

        The file /etc/raddb/user contains authentication and configuration information for each user.



清單 5. /etc/raddb/user 文件     The /etc/raddb/user file


1) Authentication type:

Auth-Type := LDAP - authenticate against LDAP
Auth-Type := Local, User-Password == "mypasswd"
- authenticate against the
- password set in /etc/raddb/user
Auth-Type := System - authenticate against the system password file
- /etc/passwd or /etc/shadow

2) Service type:


Service-Type = Login, - for administrative login


為授權而配置用戶     Configuring the user for authorization

    下面的驗證伺服器屬性-值對(AV)應該為用戶授權而進行配置。在驗證被接受後,這個屬性-值對被回傳給 NAS,作為對管理員登入請求的回應。      

        The following authentication server attribute value (AV) pair should be configured for user authorization. It is returned to the NAS for an administrator login request after authentication is accepted.

    對於 Cisco 路由器,有不同的授權級別:

        For a Cisco router, there are different privilege levels:

  • 級別 1 是 無特權(non-privileged) 。提示符是 router>,這是用於登入的預設級別。 Level 1 is non-privileged. The prompt is router>, the default level for login.
  • 級別 15 是
    特權(privileged)
    。 提示符是 router#,這是進入 enable 模式後的級別。 Level 15 is privileged. The prompt is router#, the level after going into enable mode.
  • 級別 2 到 14 在預設配置中不使用。 Levels 2 through 14 are not used in a default configuration.

    下面的命令可以使一個用戶從網路存取伺服器登入,並獲得對 EXEC 命令的立即存取:

        The following command causes a user logging in from a network access server to have immediate access to EXEC commands:

cisco-avpair ="shell:priv-lvl=15"


    下面的程序碼處理相同的任務,這一次是對於 Cisco 無線存取點:

        The following code handles the same task for a Cisco wireless access point:

Cisco:Avpair = "aironet:admin-capability=write+snmp+ident+firmware+admin"

    任何功能組合都和這個屬性一起回傳:

    Any combination of capabilities is returned with this attribute:


Cisco:Avpair = "aironet:admin-capability=ident+admin"
Cisco:Avpair = "aironet:admin-capability=admin"


    請與 Cisco 聯繫,以獲得關於這些命令的更多資訊。

        Contact Cisco for more information on these commands.

配置網路存取伺服器     Configuring the network access server

   
接下來我們將配置 NAS,首先是配置一個 Cisco 路由器,然後輪到一個 Cisco WAP。
       

        Next we'll configure the NAS, first for a Cisco router, then for a Cisco WAP.

    對於 Cisco IOS 12.1 路由器,我們將啟用 AAA,然後配置驗證、授權和記費。

        For the Cisco IOS 12.1 router, we'll enable AAA, then configure authentication, authorization, and accounting.


清單 6. 啟用 AAA     Enabling AAA


aaa new-model
radius-server host 192.168.0.100
radius-server key mysecret1

    AAA 在路由器上應該被啟用。然後,指定能為 NAS 提供 AAA 服務的 RADIUS 伺服器的列表。加密密鑰用於加密 NAS 和 RADIUS 伺服器之間的資料傳輸。它必須與 FreeRADIUS 上配置的一樣。

        AAA should be enabled on the router. Then, a list of RADIUS servers that will provide AAA services for the NAS can be specified. The encryption key is used to encrypt the data transfer between the NAS and the RADIUS server. It must be identical with the one configured on FreeRADIUS.


清單 7. 配置驗證     Configuring authenticatio n


aaa authentication login default group radius local
line vty 0 4
login authentication default

     在這個例子中,網路管理員使用 RADIUS 驗證。如果 RADIUS 伺服器不可用,則使用 NAS 的本地用戶資料庫密碼。        

        In this example, network administrators use RADIUS authentication. If a RADIUS server is not available, use the NAS's local user database password.


清單 8. 配置授權     Configuring authorization


aaa authorization exec default group radius if-authenticated

    允許用戶在登入到 NAS 中時運行 EXEC shell。

        Allow the user to run an EXEC shell when logging into the NAS.


清單 9. 配置記費     Configuring accounting


aaa accounting system default start-stop group radius
aaa accounting network default start-stop group radius
aaa accounting connection default start-stop group radius
aaa accounting exec default stop-only group radius
aaa accounting commands 1 default stop-only group radius
aaa accounting commands 15 default wait-start group radius

    必須對路由器進行特別的配置,以使之發送記費記錄到 RADIUS 伺服器。使用清單 9 中的命令記錄關於 NAS 系統事件、網路連接、輸出連接、EXEC 操作以及級別 1 和級別 15 上的命令的記費資訊。

        The router must be specifically configured to send accounting records to the RADIUS server. Use the commands in Listing 9 to record accounting information on NAS system events, network connections, outbound connections, EXEC operations, and commands at levels 1 and 15.


    這樣就好了。現在讓我們看看為 Cisco 無線存取點而進行的配置。下面的配置適用於帶有 Firmware 12.01T1 的 Cisco 1200 Series AP。如圖 2 中的螢幕截圖所示,您:

         That's it. Now let's look at configuring for a Cisco wireless access point. The following configuration applies to the Cisco 1200 Series AP with Firmware 12.01T1. As shown in the screen shot in Figure 2, you:

  • 輸入伺服器名或 IP 位址和共用的密碼。 Input the server name or IP address and shared secret.
  • 選擇「Radius」作為類型,並選取「User Authentication」。 Select type as "Radius" and check "User Authentication."


圖 2. 為 WAP 配置 NAS   
Configuring NAS for WAP

 
Configuring NAS for WAP

    實際上,在這裡您還可以配置 EAP Authentication,使 FreeRADIUS 可用於驗證無線 LAN 的一般用戶。

         Actually, here you can also configure EAP Authentication so FreeRADIUS can be used to authenticate general users to wireless LAN.




記費:工作中的 RADIUS    Accounting: RADIUS at work

     現在所有配置都已經完成,FreeRADIUS 伺服器可以開始記錄 NAS 發送的所有資訊,將該資訊儲存在 /var/log/radius/radius.log 檔中,就像這樣:

        Now that all the configurations have been completed, the FreeRADIUS server can start logging all information sent by NAS, storing it in the /var/log/radius/radius.log file like so:


清單 10. /var/log/radius/radius.log 文件    The /var/log/radius/radius.log file


Thu Mar 3 21:37:32 2005 : Auth: Login OK: [David] (from client 
                                  mylan port 1 cli 192.168.0.94)
Mon Mar 7 23:39:53 2005 : Auth: Login incorrect: [John] (from 
                                client mylan port 1 cli 192.168.0.94)

    詳細的記費資訊被存放在 /var/log/radius/radacct 目錄中。清單 11 表明,David 在 2005 年 3 月 4 日 19:40 到 19:51 這段時間裡從 192.168.0.94 登入到了路由器 192.168.0.1。這麼詳細的資訊對於正在調查安全事故以及試圖維護易於審計的記錄的管理員來說無疑是一大幫助。


         Detailed accounting information is stored in the /var/log/radius/radacct directory. Listing 11 shows that David logged into router 192.168.0.1 from 192.168.0.94 between 19:40 to 19:51 on March 4, 2005. This level of detailed information will definitely be a help to administrators investigating security incidents and trying to maintain easily auditable records.


清單 11. RADIUS 提供的記費細節範例    Sample of the RADIUS-supplied accounting details



Fri Mar  4 19:40:12 2005
NAS-IP-Address = 192.168.0.1
NAS-Port = 1
NAS-Port-Type = Virtual
User-Name = "David"
Calling-Station-Id = "192.168.0.94"
Acct-Status-Type = Start
Acct-Authentic = RADIUS
Service-Type = NAS-Prompt-User
Acct-Session-Id = "00000026"
Acct-Delay-Time = 0
Client-IP-Address = 192.168.0.1
Acct-Unique-Session-Id = "913029a52dacb116"
Timestamp = 1109936412

Fri Mar 4 19:51:17 2005
NAS-IP-Address = 192.168.0.1
NAS-Port = 1
NAS-Port-Type = Virtual
User-Name = "David"
Calling-Station-Id = "192.168.0.94"
Acct-Status-Type = Stop
Acct-Authentic = RADIUS
Service-Type = NAS-Prompt-User
Acct-Session-Id = "00000026"
Acct-Terminate-Cause = Idle-Timeout
Acct-Session-Time = 665
Acct-Delay-Time = 0
Client-IP-Address = 192.168.0.1
Acct-Unique-Session-Id = "913029a52dacb116"
Timestamp = 1109937077



結論     Conclusion

        透過遵循本文中列出的簡單步驟,您可以建立一個 Remote Authentication Dial-In User Service 伺服器,該伺服器使用一個外部的 LDAP 伺服器來處理為網路安全問題而進行的驗證、授權和記費。本文提供了以下內容來幫助您完成此任務:

 
       By following the simple steps outlined in this article, you can set up a Remote Authentication Dial-In User Service server that uses an external LDAP server to handle authentication, authorization, and accounting for your network security issues. This article has provided the following to help you accomplish this task:


  • 對 RADIUS 和 LDAP 伺服器以及 AAA 概念的介紹。 An introduction to the RADIUS and LDAP servers and to the AAA concept.
  • 一個融入了安裝和配置任務的場景。 A scenario to put the installation and implementation into context.
  • 關於安裝和配置 RADIUS 伺服器的說明。 Instructions on installing and configuring the RADIUS server.
  • 關於配置網路存取伺服器的細節。Details on configuring the network access server.

  • RADIUS 將提供和管理的詳細資訊的一個範例。A sample of the detailed information that RADIUS will provide and manage.

        這些指示可以快速確保受保護的資料只能由 Linux 系統上已授權的實體存取。

        These instructions can make quick work of the task of making sure protected data can only be accessed by authorized entities on your Linux system.



參考資料    Resources


關於作者     About the author



        Wei Zhang 是一名網路和資訊安全專家。在過去六年裡,他設計和實作了不同類型的大規模網路系統,涵蓋了很多種技術,從 SNA、VoIP、IDS、VPN 和防火牆到無線 LAN。他於 2003 年加入 IBM,擔任一名 IT 專家。目前,他的工作重點是資訊安全技術和管理。您可以透過  zhangwd@cn.ibm.com  與他聯繫。

        
Wei Zhang is a network and information security specialist. He designed and implemented various large-scale network systems in the past six years covering a broad range of technologies, from SNA, VoIP, IDS, VPN, and firewalls to wireless LAN. He joined in IBM as an IT specialist in 2003. Currently, his concentration is information security technology and management. You can reach him at 
zhangwd@cn.ibm.com
.


原文出處: 在 Linux 上建構一個 RADIUS 伺服器 @ 藍色情懷 :: 隨意窩 Xuite日誌
冷日
(冷日)
Webmaster
  • 註冊日: 2008/2/19
  • 來自:
  • 發表數: 15771
[轉貼]輕鬆架好RADIUS伺服器

輕鬆架好RADIUS伺服器~

前一周多,小組內的同事碰到了客戶的新問題

對方提問咱家的產品是否有提供與AAA伺服器的服務

其實就是有無提供RADIUS伺服器認證

剛好我在上一家公司有做過相關部分的工作,所以就毛遂自薦嚕

環境如下:

1. Lenovo notebook with Ubuntu Linux(版本我忘了)充當RADIUS的伺服器,選用的是freeradius這個軟體

2. Dlink DI-427+ wireless router一台 (很爛,只有支援到WPA EAP的認證)

3. 遠端的隨便notebook with Windows XP一台充當client端

由於離上次架RADIUS的時間已經超過一年多了 囧rz,很多基本的東西都忘了

加上Ubuntu裡面有apt-get這個大魔鬼,所以很自然的就先apt-get install freeradius,八特.....

人算不人天算,學tarball起家的我,時間很不能接受時代變遷的新產品

過程除了產生很多build denpendency的問題(迷之聲: apt-get不是很強大,可以解掉相依性問題)

還有就是一些freeradius所用到的相關data base問題

最後乾脆全部移除,跑去下載了最新的freeradius tarball (在下用的是2.1.6版)

用土法煉鋼的方式,終於把伺服器架起來了

廢話不說,咱馬上進入正題

1. 上網下載freeradius,網址 http://freeradius.org/download.html,小弟用的版號是2.1.6,不要跟我差太多版應該就還好


2. 解壓縮並切換到此目錄下 (以下#號開頭的皆為linux下root的權限,不習慣換到root的人請不要忘了加 sudo)

#tar zxvf freeradius-server-2.1.6.tar.gz (各位看官阿,指令、檔案名之間都有空格,不要像上次某人還跑過來問我:你的網誌上寫的都是騙人的 囧rz)

#cd freeradius-server-2.1.6

3. 產生makefile與開始編譯程式

#./configure (若這步驟有問題,請試試看後面加參數 --with-system-libtool,這要視你的error message去判斷,小弟是遇到libtool的問題)

#make

#make install

4. 編譯完之後,主要的幾個設定檔會放在系統目錄下 /usr/local/etc/raddb,若是不習慣的請自行在產生make檔案的時候去指定prefix

由於小弟沒有使用data base或其他的外掛模組,基本使用者就是系統上的使用者了,下面是幾個主要的設定檔案 (內容後面會貼上)

radiusd.conf: 最主要的設定檔案,設定此RADIUS伺服器是否有支援eap, sql, proxy等等等,小弟只是希望快速驗證,所以只有mark掉sql部分

clients.conf: client端的設定檔案,我AP的設定檔就寫在裡面了,沒有複雜的設定

eap.conf: 認證最重要的設定,舉凡tls, ttls等等,都在此設定

5. 產生伺服器憑證與客戶端憑證,這個是我搞最久的部分,google好多文章,最後trial and error才搞出來的,要產生憑證前先確認自己的linux上已經有裝好了openssl


#cd /usr/lib/ssl/misc/ (這個路徑是我電腦預設裝好的openssl的目錄,各位看官自行前往相對應的目錄)

#./CA.pl -newca (預設會在此目錄下產生一個名為demoCA的新目錄,裡面會有基本相關的檔案,若是想更名的,請自行修改 CA.pl)

......(下來是一連串產生憑證的問答,只列出我有填寫且重要的部分,紅字部分為電腦提問,藍字是我自己填入的)

Enter PEM pass phrase: 12345 (自行輸入憑證密碼)

Country Name (2 letter code) [AU]: TW

State or Province Name (full name) [Some-State]: Taipei

Locality Name (eg, city) []: Taipei

Organization Name (eg, company) [Internet Widgits Pty Ltd]: SOD


Organizational Unit Name (eg, section) []: AV

Common Name (eg, YOUR name) []: Makoto

Email Address []: makoto@sod.com

6. 伺服器端認證檔案

#openssl req -new -nodes -keyout srv_key.pem -out srv_req.pem -config ../openssl.cnf (請注意openssl.cnf這個檔案,在小弟的電腦內此檔案位於/usr/lib/ssl/裡面)

#openssl ca -config ../openssl.cnf -policy policy_anything -out srv_cert.pem -infiles ./srv_req.pem

#cat srv_key.pem srv_cert.pem > srv_keycert.pem

7. 客戶端認證檔案,產生後請將cli_cert.pem複製到自己想要認證的電腦上面,點選右鍵->匯入憑證,這樣就可以了

#openssl req -new -keyout cli_key.pem -out cli_req.pem -config ../openssl.cnf

#openssl ca -config ../openssl.cnf -policy policy_anything -out cli_cert.pem -infiles ./cli_req.pem


#openssl pkcs12 -export -in cli_cert.pem -inkey cli_key.pem -out cli_cert.p12 -clcerts (此步驟為要轉成windows XP下可用的憑證檔案格式)

8. 產生兩個使用tls憑證需要用到的檔案

#openssl dhparam -check -text -5 512 -out dh

#dd if=/dev/urandom of=random count=2

9. 記得把上述的伺服器端檔案copy到/usr/local/etc/raddb/certs,因為freeradius內的設定檔預設憑證會放在這邊,若是想改到自己的喜歡的目錄下,請自行修改

10. 接下來編輯一下第四點所提到的三個檔案,小弟用的是tls憑證

radiusd.conf: (mark了三行,下面的紅色井字號為mark)

# $INCLUDE sql.conf

#INCLUDE sql/mysql/counter.conf

#$INCLUDE sqlippool.conf

clients.conf
: (添加了下列幾行,192.168.1.1是小弟AP的IP位址,secret是密碼請自行設定)

client 192.168.1.1 {
        secret          = sodisgood
        shortname   = sod-ap
}

eap.conf: (修改了一些部分,並且添加了tls憑證部分)

default_eap_type = tls (原本是md5)

private_key_password = 12345 (產生憑證時輸入的密碼)

private_key_file = ${certdir}/srv_keycert.pem (當時後產生的伺服器憑證)

certificate_file = ${certdir}/server_keycert.pem (同上)

CA_file = ${cadir}/cacert.pem (這個檔案會在demoCA裡面)

dh_file = ${certdir}/dh (tls需要用到的檔案)

random_file = ${certdir}/random (同上)

11. 這時候可以啟動伺服器了,有問題的話請注意一下error message喔,每個人遇到的狀況不一定會相同

#radiusd -X & (-X是debug mode,&是背景執行)

12. 設定AP,這點也是端看各位使用的AP不同而會有所不同,所以我只說明大概的設定法,其他的請看倌自行設定了(請記得連接RADIUS伺服器電腦與AP)


登入AP設定網頁>>無線網路設定>>安全模式>>選擇WPA>>填入RADIUS伺服器的IP位址(看AP的資訊就有了)、連接埠(內建是1812)、RADIUS密碼(與在clients.conf裡面的要一致)

13. 在windows xp下直接用WZC去連接自己的AP,若一切都順利你會看到無線網路會顯示正在驗證你的憑證之類的訊息


以上........

呼~寫得有點亂,希望對有要架設RADIUS的人有所幫助

若是有人要分享更仔細的設定或是SSL的用法,請不吝指教^^


原文出處:輕鬆架好RADIUS伺服器~ @ Memory :: 痞客邦 PIXNET ::
冷日
(冷日)
Webmaster
  • 註冊日: 2008/2/19
  • 來自:
  • 發表數: 15771
[轉貼]Windows 2003 Server IAS網際網路驗證服務伺服器(Radius Server)研究與教學

Windows 2003 Server IAS網際網路驗證服務伺服器(Radius Server)研究與教學

Windows 2003 Server IAS網際網路驗證服務伺服器(Radius Server)研究與教學

Windows XP和Windows 2008 Server請參考另一篇

Writer by 門神JanusLin
Date:2010/11/2

研究的原因是因為很多設備都有支援Radius Server
比如Vigor的User Profile Mode
不管是Lan端或是Wireless端的IEEE 802.1x上網驗證都可以透過他來做
或是VPN的驗證
或是Switch的IEEE 802.1x的驗證都是有Support Radius Server的驗證方式的


 
比如台灣端架一台Radius Server
那麼不管公司在那一個地方
散佈在全球也沒有關係
通通在台灣控管就可以了
或是社區寬頻
比如您管理幾十棟或是幾百棟的社區大樓
驗證Server一台一台架設也挺累人的
如果用一台Radius Server就能搞定
就很簡單了
還有安全性的部份
Radius Server也可以在Site to Site的VPN內部跑
安全性很高的



但是網路上找到很多的 for Linux的研究
而Windows的Radius Server設定部份比較少
找的到的大部份像文言文一樣艱深難懂
所以小弟花的一點時間研究他一下

Windows Server的Radius Server稱之為IAS service網際網路驗證服務
安裝是藏在控制台-->新增/移除程式-->Windows元件-->Networking Services
 
安裝好之後我們在
開始-->程式集-->系統管理工具-->網際網路驗證服務
這就是IAS Service Radius Server的控制選項
像我們以Vigor 2920的User ProFile Mode設定方式
IAS Server要指定Client端

 
在RADIUS用戶端新增一個戶端
給他一個好記的名字:Vigor2920n
他的位址(IP或DNS):192.168.254.42
用戶端廠商:RADIUS Standard
共用密碼跟確認共用密碼我們是輸入vigor


在遠端存取原則那邊我們要新增新的存取原則

Vigor的User Profiles需要的是
NAS-IP-Address
Service-Type
還有驗證方式要加選

然後在AD的使用者和電腦那邊的撥入原則要打開允許遠端存取
然後在Vigor 2920那邊設定好User Profile mode即可
這樣Radius Server就可以Work了

如果對此產品有其他問題
歡迎洽詢本公司各區服務處



原文出處:Windows 2003 Server IAS網際網路驗證服務伺服器(Radius Server)研究與教學
備註:
冷日先說明,本商品冷日並沒有使用,只是看到官方的說明挺清楚明瞭,所以轉載過來,任何技術疑問請移駕該公司官方網站,亦不做任何背書與廣告,謝謝!
冷日
(冷日)
Webmaster
  • 註冊日: 2008/2/19
  • 來自:
  • 發表數: 15771
[轉貼]Windows 2008 Server NPS網路原則與存取服務(Radius Server)研究與教學

Windows 2008 Server NPS網路原則與存取服務(Radius Server)研究與教學

Windows 2008 Server NPS網路原則與存取服務(Radius Server)研究與教學

Windows XP或Windows 2003 Server請參考另一篇

Writer by 門神JanusLin
Date:2010/11/4

之前寫了一篇Windows 2003 Server的IAS網際網路驗證服務內含Radius Server之後
繼續處理Windows 2008 Server的Radius Server
但是…..
發現Microsoft超愛改名字的
在Windows 2008 Server已經不叫做IAS
或者應該是說NPS(Network Policy Server)包含IAS又包含Radius Server了
我看考MCSE的人又得重新驗證了 ^^

研究的原因是因為很多設備都有支援Radius Server
比如Vigor的User Profile Mode
不管是Lan端或是Wireless端的IEEE 802.1x上網驗證都可以透過他來做
或是VPN的驗證
或是Switch的IEEE 802.1x的驗證都是有Support Radius Server的驗證方式的


比如台灣端架一台Radius Server
那麼不管公司在那一個地方
散佈在全球也沒有關係
通通在台灣控管就可以了
或是社區寬頻
比如您管理幾十棟或是幾百棟的社區大樓
驗證Server一台一台架設也挺累人的
如果用一台Radius Server就能搞定
就很簡單了
還有安全性的部份
Radius Server也可以在Site to Site的VPN內部跑
安全性很高的

但是網路上找到很多的 for Linux的研究
而Windows的Radius Server設定部份比較少
找的到的大部份像文言文一樣艱深難懂
所以小弟花的一點時間研究他一下
 
我們還是以Vigor 2920的User Profile為示範的範例
第一步先將Vigor 2920改為User-Base Mode

指定User Profile的Index 3的帳號janus為Radius Server認證的帳號



 
設定認證的Radius Server IP和Shared Secret
再來就是關鍵的Windows 2008 Server的NPS網路原則與存取服務(Radius Server)的設定了


 
角色要有NPS網路原則與存取服務


 
開一個帳號在撥入選項要允許存取
或是透過NPS網路原則控制存取也可以


 
在NPS要新增一個RADIUS用戶端


 
在NPS的原則
網路原則那邊要新增一個原則
設定的內容如下


這個地方大概就是重點了
服務類型要選Autheniticate Only
NAS-IPv4位址要指定192.168.1.1


 
EAP全部都要勾選


 
User存取的Log
OK這樣就設定好Windows 2008 Server的NPS伺服器角色了



 
OK我們在Vigor 2920的後端打開Browser
他會先跳出安全性警告
這是告訴User我們跟Vigor 2920中間的驗證是有經過加密的
不會被旁人擷取


 
輸入我們在Radius Server上面的帳號跟Password


 
通過驗證
他就會跳出指定的網頁


 
還有Login的資訊

這樣Windows 2008 Server的NPS的Radius Server就可以Work了


如果對此產品有其他問題
歡迎洽詢本公司各區服務處


原文出處: Windows 2008 Server NPS網路原則與存取服務(Radius Server)研究與教學
備註:
冷日先說明,本商品冷日並沒有使用,只是看到官方的說明挺清楚明瞭,所以轉載過來,任何技術疑問請移駕該公司官方網站,亦不做任何背書與廣告,謝謝!
冷日
(冷日)
Webmaster
  • 註冊日: 2008/2/19
  • 來自:
  • 發表數: 15771
[分享]MS 官方 Windows 2008 Server NPS Radius Server 說明

讓我們來看看 M$ 官方的說法:

RADIUS 伺服器

適用於: Windows Server 2008

網路原則伺服器 (NPS) 可用來做為遠端驗證撥號使用者服務 (RADIUS) 伺服器,為 RADIUS 用戶端執行驗證、授權以及帳戶處理。RADIUS 用戶端可以是存取伺服器 (例如撥號伺服器或無線存取點) 或 RADIUS Proxy。當 NPS 做為 RADIUS 伺服器時,可提供下列功能:

  • 針對 RADIUS 用戶端所傳送的所有存取要求,提供集中的驗證與授權服務。

    NPS 使用 Microsoft(R) Windows NT(R) Server 4.0 網域、Active Directory(R) 網域服務 (AD DS) 網域或本機安全性帳戶管理員 (SAM) 使用者帳戶資料庫,來驗證嘗試連線的使用者認證。NPS 使用使用者帳戶的撥入內容以及網路原則來授權連線。

  • 針對 RADIUS 用戶端所傳送的所有帳戶處理要求,提供集中的帳戶處理記錄服務。

    帳戶處理要求會儲存在本機記錄檔或 Microsoft(R) SQL Server(TM) 資料庫中以供分析。

以下圖例顯示做為各種存取用戶端之 RADIUS 伺服器的 NPS,同時還顯示 RADIUS Proxy。NPS 使用 Active Directory(R) 網域對傳入的 RADIUS Access-Request 訊息進行使用者認證驗證。

NPS 作為 RADIUS 伺服器

當 NPS 做為 RADIUS 伺服器時,RADIUS 訊息會以下列方式,為網路存取連線提供驗證、授權以及帳戶處理:

  1. 存取伺服器,例如撥號網路存取伺服器、VPN 伺服器以及無線存取點,都會從存取用戶端接收連線要求。

  2. 設定使用 RADIUS 做為驗證、授權以及帳戶處理通訊協定的存取伺服器,會建立 Access-Request 訊息並將它傳送到 NPS 伺服器。

  3. NPS 伺服器會評估 Access-Request 訊息。

  4. 必要時,NPS 伺服器會傳送一份 Access-Challenge 訊息給存取伺服器。存取伺服器會處理挑戰,並傳送更新的 Access-Request 給 NPS 伺服器。

  5. 檢查使用者認證以及取得使用者帳戶的撥入內容時,是透過連到網域控制站的安全連線。

  6. 授權連線嘗試時,是同時透過使用者帳戶的撥入內容以及網路原則。

  7. 如果連線嘗試同時通過驗證與授權,NPS 伺服器就會傳送 Access-Challenge 訊息給存取伺服器。

    如果連線嘗試未通過驗證或授權,NPS 伺服器就會傳送 Access-Reject 訊息給存取伺服器。

  8. 存取伺服器會完成與存取用戶端的連線程序,然後傳送 Accounting-Request 訊息給記錄訊息的 NPS 伺服器。

  9. NPS 伺服器則會傳送 Accounting-Response 給存取伺服器。


note備註
當存取用戶端連線關閉時,以及當存取伺服器啟動和停止時,存取伺服器也會在建立連線期間傳送 Accounting-Request 訊息。

您可以在下列情況使用 NPS 做為 RADIUS 伺服器:

  • 您使用 Windows NT Server 4.0 網域、AD DS 網域或是本機 SAM 使用者帳戶資料庫,做為存取用戶端的使用者帳戶資料庫。

  • 您在多個撥號伺服器、VPN 伺服器或指定撥號路由器上使用路由及遠端存取,而想要集中管理網路原則的設定以及帳戶處理的連線記錄。

  • 您將撥號、VPN 或無線存取外包給服務提供者。存取伺服器使用 RADIUS 來驗證和授權您組織成員所建立的連線。

  • 您想要集中管理一組異質存取伺服器的驗證、授權以及帳戶處理。

note備註
在 Windows Server(R) 2003 作業系統的網際網路驗證服務 (IAS) 中,網路原則又稱為遠端存取原則。


原文出處: RADIUS 伺服器


802.1X 無線或有線連線的 RADIUS 伺服器

適用於: Windows Server 2008

當您使用網路原則伺服器 (NPS) 做為遠端驗證撥號使用者服務 (RADIUS) 伺服器來部署 802.1X 有線或無線存取時,必須採取下列步驟:

  • 安裝和設定網路存取伺服器 (NAS) 做為 RADIUS 用戶端。

  • 部署驗證方法的元件。

  • 將 NPS 設定為 RADIUS 伺服器。

安裝和設定網路存取伺服器 (RADIUS 用戶端)

若要部署 802.1X 無線存取,必須安裝和設定無線存取點。若要部署 802.1X 有線存取,必須安裝和設定 802.1X 驗證交換器。

Important重要
用戶端電腦 (例如無線可攜式電腦及其他執行用戶端作業系統的電腦) 不屬於 RADIUS 用戶端。RADIUS 用戶端是使用 RADIUS 通訊協定來與 RADIUS 伺服器 (如網路原則伺服器 (NPS) 等伺服器) 進行通訊,因此 RADIUS 用戶端是一種網路存取伺服器,例如無線存取點、802.1X 型交換器、虛擬私人網路 (VPN) 伺服器及撥號伺服器等。


這兩種情況的網路存取伺服器都必須符合下列需求:

  • 支援國際電機電子工程師學會 (IEEE) 標準 802.1X 驗證

  • 支援 RADIUS 驗證與 RADIUS 帳戶處理

如果您使用需要工作階段相互關聯的收費或帳戶應用程式,則需要下列項目:

  • 支援網際網路工程任務推動小組 (IETF) 在 RFC 2865「遠端驗證撥入使用者服務 (RADIUS)」中定義的類別屬性,以允許 RADIUS 驗證與帳戶處理記錄的工作階段相互關聯。就工作階段相互關聯而言,當您在 NPS 伺服器或 Proxy 設定 RADIUS 帳戶處理時,必須記錄所有的帳戶處理資料,以允許應用程式 (例如收費應用程式) 查詢資料庫、關聯相關的欄位,然後在查詢結果中傳回每個工作階段的彙總檢視。為了至少能夠提供工作階段相互關聯,您必須記錄下列 NPS 帳戶處理資料:NAS-IP-Address;NAS-Identifier (您需要 NAS-IP-Address 與 NAS-Identifier,因為存取伺服器可以傳送任一屬性);Class;Acct-Session-Id;Acct-Multi-Session-Id;Packet-Type;Acct-Status-Type;Acct-Interim-Interval;NAS-Port;以及 Event-Timestamp。

  • 支援帳戶處理暫時要求,這些要求會在使用者工作階段期間由部分網路存取伺服器 (NAS) 定期傳送,並加以記錄。將 Acct-Interim-Interval RADIUS 屬性設定成支援 NPS 伺服器遠端存取設定檔中的定期要求時,可以使用此類型的要求。如果您要在 NPS 伺服器記錄暫時要求,NAS 必須支援使用帳戶處理暫時要求。

如果您使用虛擬區域網路 (VLAN),則 NAS 必須支援 VLAN。

網路存取伺服器應該針對廣域網路 (WAN) 環境提供下列項目:


  • 支援動態重新傳輸逾時 (RTO) 預估或指數退後,以處理 WAN 環境中的壅塞與延遲。

此外,還有網路存取伺服器應該支援的篩選功能,以便為網路提供增強的安全性。這些篩選選項包括:

  • DHCP 篩選。NAS 必須篩選 IP 連接埠,以防止用戶端若為動態主機設定通訊協定 (DHCP) 伺服器時,傳輸 DHCP 廣播訊息。網路存取伺服器必須封鎖用戶端從連接埠 68 傳送 IP 封包到網路。

  • DNS 篩選。NAS 必須篩選 IP 連接埠,以防止用戶端以 DNS 伺服器的方式執行。NAS 必須封鎖用戶端從連接埠 53 傳送 IP 封包到網路。

如果您正在部署無線存取點,最好採用支援 Wi-Fi 保護的存取 (WPA)。Windows Vista® 與 Windows XP Service Pack 2 皆支援 WPA。若要部署 WPA,請同時使用支援 WPA 的無線網路介面卡。

部署驗證方法的元件

您可以針對 802.1X 無線與有線使用下列驗證方法:

  • 具有傳輸層安全性 (TLS) 之可延伸的驗證通訊協定 (EAP),又稱為 EAP-TLS。

  • 具有 Microsoft Challenge Handshake 驗證通訊協定版本 2 (MS-CHAP v2) 的受保護 EAP (PEAP),又稱為 PEAP-MS-CHAP v2。

  • 具有 EAP-TLS 的 PEAP,又稱為 PEAP-TLS。


如果是 EAP-TLS 與 PEAP-TLS,您必須安裝和設定 Active Directory(R) 憑證服務 (AD CS),發行憑證給網域成員用戶端電腦和 NPS 伺服器,以部署公開金鑰基礎結構 (PKI)。這些憑證是在驗證程序期間做為用戶端與 NPS 伺服器的識別證明。您也可以部署智慧卡,而不使用用戶端電腦憑證。在此情況下,您必須發行智慧卡與智慧卡讀取裝置給組織員工。

如果是 PEAP-MS-CHAP v2,您可以使用 AD CS 部署自己的憑證授權單位 (CA),以便將憑證簽發給 NPS 伺服器,或者,您可以向用戶端信任的公開受信任的根 CA 購買伺服器憑證,例如 VeriSign。

如需相關資訊,請參閱 EAP 概觀 以及 PEAP 概觀

將 NPS 設定為 RADIUS 伺服器

當您將 NPS 設定為 RADIUS 伺服器時,必須設定 RADIUS 用戶端、網路原則以及 RADIUS 帳戶處理。

設定 RADIUS 用戶端

設定 RADIUS 用戶端有兩個階段:

  • 透過可允許網路存取伺服器與 NPS 伺服器通訊的資訊設定實體 RADIUS 用戶端,例如無線存取點或是驗證交換器。此資訊包括設定 NPS 伺服器的 IP 位址以及在存取點或交換器使用者介面中的共用密碼。


  • 在 NPS 中,新增 RADIUS 用戶端。在 NPS 伺服器上,將每個存取點或驗證交換器新增為 RADIUS 用戶端。NPS 可讓您為每個 RADIUS 用戶端提供好記的名稱,以及 RADIUS 用戶端的 IP 位址與共用密碼。

如需相關資訊,請參閱 新增 RADIUS 用戶端

設定網路原則

網路原則是條件、限制和設定的集合,可讓您指定獲得連線到網路之授權的對象以及可進行連線的情況。

如需相關資訊,請參閱 網路原則

設定 RADIUS 帳戶處理

RADIUS 帳戶處理可讓您將使用者驗證及帳戶處理要求記錄在本機記錄檔中,或記錄在本機電腦或遠端電腦上的 Microsoft(R) SQL Server(R) 資料庫中。

如需相關資訊,請參閱 RADIUS 帳戶處理

另請參閱


原文出處: 802.1X 無線或有線連線的 RADIUS 伺服器

撥號或 VPN 連線的 RADIUS 伺服器

適用於: Windows Server 2008

部署與網路原則伺服器 (NPS) 的撥號或虛擬私人網路 (VPN) 連線做為 RADIUS 伺服器時,必須採取下列步驟:

  • 安裝和設定網路存取伺服器 (NAS) 做為 RADIUS 用戶端。

  • 部署驗證方法的元件。

  • 將 NPS 設定為 RADIUS 伺服器。

安裝和設定網路存取伺服器 (RADIUS 用戶端)


若要部署撥號存取,您必須安裝和設定 [路由及遠端存取] 做為撥號伺服器。若要部署 VPN 存取,您必須安裝和設定 [路由及遠端存取] 做為 VPN 伺服器。

Important重要
用戶端電腦 (例如無線可攜式電腦及其他執行用戶端作業系統的電腦) 不屬於 RADIUS 用戶端。RADIUS 用戶端是使用 RADIUS 通訊協定來與 RADIUS 伺服器 (如網路原則伺服器 (NPS) 等伺服器) 進行通訊,因此 RADIUS 用戶端是一種網路存取伺服器,例如無線存取點、802.1X 型交換器、虛擬私人網路 (VPN) 伺服器及撥號伺服器等。

您可以在本機 NPS 伺服器或遠端電腦上安裝 [路由及遠端存取]。

部署驗證方法的元件

如果是 VPN,您可以使用下列驗證方法:

  • 具有傳輸層安全性 (TLS) 之可延伸的驗證通訊協定 (EAP),又稱為 EAP-TLS。

  • Microsoft Challenge Handshake 驗證通訊協定第 2 版 (MS-CHAP v2) 的受保護 EAP (PEAP),又稱為 PEAP-MS-CHAP v2。

  • 具有傳輸層安全性 (TLS) 的 PEAP,又稱為 PEAP-TLS。


如果是 EAP-TLS 與 PEAP-TLS,您必須安裝和設定 Active Directory(R) 憑證服務 (AD CS),發行憑證給網域成員用戶端電腦和 NPS 伺服器,以部署公開金鑰基礎結構 (PKI)。這些憑證是在驗證程序期間做為用戶端與 NPS 伺服器的識別證明。您也可以部署智慧卡,而不使用用戶端電腦憑證。在此情況下,您必須發行智慧卡與智慧卡讀取裝置給組織員工。

如果是 PEAP-MS-CHAP v2,您可以使用 AD CS 部署自己的憑證授權單位 (CA),以便將憑證簽發給 NPS 伺服器,或者,您可以向用戶端信任的公開受信任的根 CA 購買伺服器憑證,例如 VeriSign。

如需相關資訊,請參閱 EAP 概觀 以及 PEAP 概觀

將 NPS 設定為 RADIUS 伺服器

當您將 NPS 設定為 RADIUS 伺服器時,必須設定 RADIUS 用戶端、網路原則以及 RADIUS 帳戶處理。

設定 RADIUS 用戶端

設定 RADIUS 用戶端有兩個階段:

  • 透過可允許網路存取伺服器與 NPS 伺服器通訊的資訊設定實體 RADIUS 用戶端,例如 VPN 伺服器或撥號伺服器。此資訊包括設定 NPS 伺服器的 IP 位址以及在 VPN 伺服器或撥號伺服器使用者介面中的共用密碼。


  • 在 NPS 中,新增 RADIUS 用戶端。在 NPS 伺服器上,新增每部 VPN 伺服器或撥號伺服器做為 RADIUS 用戶端。NPS 可讓您為每個 RADIUS 用戶端提供好記的名稱,以及 RADIUS 用戶端的 IP 位址與共用密碼。

如需相關資訊,請參閱 新增 RADIUS 用戶端

設定網路原則

網路原則是條件、限制和設定的集合,可讓您指定獲得連線到網路之授權的對象以及可進行連線的情況。

如需相關資訊,請參閱 網路原則

設定 RADIUS 帳戶處理

RADIUS 帳戶處理可讓您將使用者驗證及帳戶處理要求記錄在本機記錄檔中,或記錄在本機電腦或遠端電腦上的 Microsoft(R) SQL Server(R) 資料庫中。


原文出處: 撥號或 VPN 連線的 RADIUS 伺服器
冷日
(冷日)
Webmaster
  • 註冊日: 2008/2/19
  • 來自:
  • 發表數: 15771
[轉貼]Windows 2008 R2 Radius 無線AD整合驗證

Windows 2008 R2 Radius 無線AD整合驗證

利用windows 2008 server R2 擔任Radius Server ,讓無線的使用著可以利用AD帳號驗證來取得網路連線

NPS

 

環境中如下

網域 : pmail.idv.tw


兩台AD Server 其中一台AD 擔任NPS Server

一台 Windows 2003 CA Server

Firewall  多擔任 DHCP功能

Cisco LinkSYS Wireless 無線分享器

達成目標 :

行動用戶 (NB / 手機 / IPAD) 用戶直接利用AD帳號認證後取得IP,上網

設定

1.NPS 角色安裝及設定

在AD Server2 安裝NPS角色,請在伺服器管理員新增角色即可

adnps

打開NPS 管理工具 —> RADIUS 用戶端 滑鼠右鍵 新增


adnps1

輸入名稱  及 ip (此ip 為 LinkSYS Wireless AP )

輸入一組共享金鑰

adnp21

因為該台無線分享器算是cisco 所以選cisco


adnps3

設定連線要求原則

直接編輯預設的要求即可

驗證方法 —> 新增 PEAP  (如下圖)

adnps4

在新增的 peap 點選編輯

將[強制網路存取保護]勾取消


adnps5

2. LinkSYS Wireless 設定

設定wireless 驗證方式

驗證模式 : WPA2 Enterprise

WAP Algorithmes : AES

RADIUS Server address : x.x.x.x

共享金鑰 : 要輸入和NPS 伺服器上面一樣

adnps6

3. 用戶端CA 申請 憑證 (利用WEB申請即可,將該憑證匯入到信任的根憑證存放去)


CA1

4.NB用戶端設定

無線網卡上修改設定

ca2

選 WAP2 及AES (和AP上相同)


ca3

EAP類型選 PEAP

ca4

勾選確認伺服器憑證,及勾選前面步驟匯入的憑證


ca6

驗證方式: 點選設定

如果該台NB有加入網域可以直接勾選,如果沒有就不用勾

ca8

選到該SSID連線時 就會跳出輸入帳號密碼的視窗


ca88

輸入網域帳號密碼後 即可連線成功

ca99

ipad 連線時 會跳出伺服器認證訊息,點選接受就會把憑證自動裝上且可以成功連線


IMAG0096


原文出處: Windows 2008 R2 Radius 無線AD整合驗證 | MIS的背影
前一個主題 | 下一個主題 | 頁首 | | |



Powered by XOOPS 2.0 © 2001-2008 The XOOPS Project|