• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.
Xin chào ! Nếu đây là lần đầu tiên bạn đến với diễn đàn, xin vui lòng danh ra một phút bấm vào đây để đăng kí và tham gia thảo luận cùng VnPro.

Announcement

Collapse
No announcement yet.

Lab pki (phần 2)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Lab pki (phần 2)

    Thực hành bài Lab cấu hình Windows server 2003 làm CA Server

    Mô hình như sau:



    Các thiết bị bao gồm: 2 Router 2800, 1 Switch 3550, 1 Windows server 2003

    Client 1:

    Router#config terminal

    Router(config)#hostname client1

    Client1(config)# interface f0/1

    Client1(config-if)# ip address 172.30.2.2 255.255.255.0

    Client1(config-if)# no shut

    Client1(config-if)# exit

    Client1(config)# interface f0/1

    Client1(config-if)# ip address 192.168.1.2 255.255.255.0

    Client1(config-if)# no shut

    Client1(config-if)# exit

    # cấu hình domain name cho Router

    Client1(config)# ip domain-name cisco.com

    Client1(config)# ip host caserver 172.30.1.2

    # cấu hình trustpoint

    Client1(config)# crypto ca trustpoint CA

    Client1(ca-trustpoint)# enrollment url http://172.30.1.2/certsrv/mscep/mscep.dll

    Client1(ca-trustpoint)# subject-name cn=client1@vnpro.org

    Client1(ca-trustpoint)# exit

    Client1(config)# crypto ca authenticate CA

    #cấu hình VPN

    Client1(config)# crypto isakmp policy 10

    Client1(config-isakmp)# hash md5

    Client1(config-isakmp)# exit

    Client1(config)# crypto ipsec transform-set myset esp-des esp-md5-hmac

    Client1(config-crypto-trans)# exit

    Client1(config)# crypto map mymap 10 ipsec-isakmp

    Client1(config-crypto-map)# set peer 172.30.3.2

    Client1(config-crypto-map)# set transform-set myset

    Client1(config-crypto-map)# match address 101

    Client1(config-crypto-map)# exit

    Client1(config)# access-list 101 permit ip 192.168.1.0 0.0.0.255 192.168.2.0 0.0.0.255

    # áp crypto map vào cổng

    Client1(config)# interface f0/1

    Client1(config-if)# crypto map mymap

    Client1(config-if)# exit

    Client1(config)#



    Client 2:

    Router#config terminal

    Router(config)#hostname client1

    Client2(config)# interface f0/1

    Client2(config-if)# ip address 172.30.3.2 255.255.255.0

    Client2(config-if)# no shut

    Client2(config-if)# exit

    Client2(config)# interface f0/1

    Client2(config-if)# ip address 192.168.2.2 255.255.255.0

    Client2(config-if)# no shut

    Client2(config-if)# exit

    # cấu hình domain name cho Router

    Client2(config)# ip domain-name cisco.com

    Client2(config)# ip host caserver 172.30.1.2

    # cấu hình trustpoint

    Client2(config)# crypto ca trustpoint CA

    Client2(ca-trustpoint)# enrollment url http://172.30.1.2/certsrv/mscep/mscep.dll

    Client2(ca-trustpoint)# subject-name cn=client1@vnpro.org

    Client2(ca-trustpoint)# exit

    Client2(config)# crypto ca authenticate CA

    #cấu hình VPN

    Client2(config)# crypto isakmp policy 10

    Client2(config-isakmp)# hash md5

    Client2(config-isakmp)# exit

    Client2(config)# crypto ipsec transform-set myset esp-des esp-md5-hmac

    Client2(config-crypto-trans)# exit

    Client2(config)# crypto map mymap 10 ipsec-isakmp

    Client2(config-crypto-map)# set peer 172.30.2.2

    Client2(config-crypto-map)# set transform-set myset

    Client2(config-crypto-map)# match address 101

    Client2(config-crypto-map)# exit

    Client2(config)# access-list 101 permit ip 192.168.2.0 0.0.0.255 192.168.1.0 0.0.0.255

    # áp crypto map vào cổng

    Client2(config)# interface f0/1

    Client2(config-if)# crypto map mymap

    Client2(config-if)# exit

    Client2(config)#

    Cấu hình CAServer :

    Các bước cấu hình Windows server 2003 làm CA

    để xây dựng 1 CA ta làm như sau:

    Bước1: cài đặt dịch vụ IIS

    Để cài được dịch vụ CA tr ên windowns server 2003 ta cần có IIS :

    1. vào start--> control panel-->add or remove programs

    2. Trong add or remove programs, nhấn add/remove windowns components

    3. nhấn vào application server (nhưng không tích vào ô chọn)



    à chọn detail

    4. Tích vào Internet Information Service (IIS)



    5. Nhấn Next à finish để hoàn thành cài đặt



    Bước 2: cài đặt dịch vụ CA

    1. vào start-->control panel--> add or remove program

    2. trong mục add or remove program, nhấn add/remove windowns components

    3. Tích vào o certificates services



    4. lúc này nhận được thong báo về việc không thay đổi tên máy tính

    à chọn yes



    5. Trong CA type --> chọn Stand-alone root CA -->next



    6. Trong mục Common name for this CA, nhấp vào tên máy tính đang cài đặt

    giả sử đang cài trên máy C0111



    7. Để mặc định nơi lưu trữ database và log file của CA à nhấn Next



    8. sau khi nhấn Next ta nhận được thông báo phải dừng Internet Information Service à chọn Yes



    9. sau khi nhấn Yes xuất hiện yêu cầu File I386 à chọn thư mục có chứa file I386 à OK



    10. Trong quá trình hoàn thành cài đặt, nhận được thông báoà chọn Yes



    11. Nhấn finish để hoàn thành cài đặt



    Bước 3: để hoàn thành được CA, ta cài thêm phần SCEP



    2. sau đó click Next à chọn use the local system account



    3,Nhấn Next à và bỏ chọn require SCEP challenge Phrase to enroll





    4. Nhấn Next à chọn Yes và điền thông tin



    5. Nhấn Next à finish để hoàn thành



    KIểm tra hoạt động:

    Thực hiện đối với client1 :

    Client1# show run

    Building configuration...

    Current configuration : 3484 bytes

    !

    ! Last configuration change at 17:39:57 UTC Tue Apr 1 2008

    !

    version 12.4

    service timestamps debug datetime msec

    service timestamps log datetime msec

    no service password-encryption

    !

    hostname client1

    !

    no aaa new-model

    !

    ip cef

    !

    ip domain name cisco.com

    ip host caserver 172.30.1.2

    !

    multilink bundle-name authenticated

    !

    !

    voice-card 0

    no dspfarm

    !

    crypto pki trustpoint CA

    enrollment mode ra

    enrollment url http://172.30.1.2:80/certsrv/mscep/mscep.dll

    subject-name cn=client2@vnpro.org

    revocation-check none

    !

    crypto pki certificate chain CA

    certificate ca 2AE3AB73C8740484449E6747E831C315

    quit

    !

    !

    crypto isakmp policy 10

    hash md5

    !

    crypto ipsec transform-set myset esp-des esp-md5-hmac

    !

    crypto map mymap 10 ipsec-isakmp

    set peer 172.30.3.2

    set transform-set myset

    match address 150

    !

    interface FastEthernet0/0

    ip address 192.168.1.2 255.255.255.0

    duplex auto

    speed auto

    !

    interface FastEthernet0/1

    ip address 172.30.2.2 255.255.255.0

    duplex auto

    speed auto

    crypto map mymap

    !

    !

    ip route 0.0.0.0 0.0.0.0 172.30.2.1

    !

    ip http server

    no ip http secure-server

    !

    access-list 150 permit ip 192.168.1.0 0.0.0.255 192.168.2.0 0.0.0.255

    !

    !

    end



    Thực hiện đối với client2

    Client2# show run

    Building configuration...



    Current configuration : 5774 bytes

    !

    ! Last configuration change at 17:23:41 UTC Tue Apr 1 2008

    !

    version 12.4

    !

    hostname client2

    !

    !

    no aaa new-model

    ip cef

    !

    ip domain name cisco.com

    ip host caserver 172.30.1.2

    !

    !

    crypto pki trustpoint CA

    enrollment mode ra

    enrollment url http://172.30.1.2:80/certsrv/mscep/mscep.dll

    subject-name cn=client1@vnpro.org

    revocation-check none

    !

    crypto pki certificate chain CA

    certificate 618FFBFC000000000004

    quit

    certificate ca 2AE3AB73C8740484449E6747E831C315

    quit

    !

    crypto isakmp policy 10

    hash md5

    !

    crypto ipsec transform-set myset esp-des esp-md5-hmac

    !

    crypto map mymap 10 ipsec-isakmp

    set peer 172.30.2.2

    set transform-set myset

    match address 150

    !

    !

    interface FastEthernet0/0

    ip address 192.168.2.2 255.255.255.0

    duplex auto

    speed auto

    !

    interface FastEthernet0/1

    ip address 172.30.3.2 255.255.255.0

    duplex auto

    speed auto

    crypto map mymap

    !

    interface Serial0/1/0

    no ip address

    shutdown

    no fair-queue

    clock rate 2000000

    !

    ip route 0.0.0.0 0.0.0.0 172.30.3.1

    !

    !

    ip http server

    no ip http secure-server

    !

    access-list 150 permit ip 192.168.2.0 0.0.0.255 192.168.1.0 0.0.0.255

    !

    !

    scheduler allocate 20000 1000

    end



    client2# show crypto ca certificates

    Certificate

    Status: Available

    Certificate Serial Number: 618FFBFC000000000004

    Certificate Usage: General Purpose

    Issuer:

    cn=CA

    Subject:

    Name: client2.cisco.com

    cn=client1@vnpro.org

    hostname=client2.cisco.com

    CRL Distribution Points:



    Validity Date:

    start date: 10:10:13 UTC Apr 1 2008

    end date: 10:20:13 UTC Apr 1 2009

    Associated Trustpoints: CA



    CA Certificate

    Status: Available

    Certificate Serial Number: 2AE3AB73C8740484449E6747E831C315

    Certificate Usage: Signature

    Issuer:

    cn=CA

    Subject:

    cn=CA

    CRL Distribution Points:



    Validity Date:

    start date: 10:07:30 UTC Apr 1 2008

    end date: 10:17:09 UTC Apr 1 2013

    Associated Trustpoints: CA



    Thực hiện Ping từ PC 2 đến PC 1:



    kết quả là 2 PC đã kết nối được với nhau.
    Email : vnpro@vnpro.org
    ---------------------------------------------------------------------------------------------------------------
Trung Tâm Tin Học VnPro
149/1D Ung Văn Khiêm P25 Q.Bình thạnh TPHCM
Tel : (08) 35124257 (5 lines)
Fax: (08) 35124314

Home page: http://www.vnpro.vn
Support Forum: http://www.vnpro.org
- Chuyên đào tạo quản trị mạng và hạ tầng Internet
- Phát hành sách chuyên môn
- Tư vấn và tuyển dụng nhân sự IT
- Tư vấn thiết kế và hỗ trợ kỹ thuật hệ thống mạng

Network channel: http://www.dancisco.com
Blog: http://www.vnpro.org/blog
Working...
X