• 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: Thực hiện cut-through cơ bản

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

  • Lab: Thực hiện cut-through cơ bản


    Hình 2.1
    1. Mô tả

    Thực hiện việc xác thực cho tất cả các loại dịch vụ hoạt động trên TCP cho các PC thuộc mạng 192.168.1.0/24. Dùng local database để thực hiện xác thực.

    Những dịch vụ cho phép thực hiện xác thực:
    1. HTTP (80).
    2. HTTPS (443).
    3. FTP (21).
    4. TELNET (23).
    2. Cấu hình

    Xác định luồng dữ liệu sẽ được xác thực, những luồng dữ liệu được cho phép trong ACL sẽ được xác thực:

    Code:
    ciscoasa(config)# access-list AUTHEN permit tcp 192.168.1.0 255.255.25.0 any
    Lưu ý: Trong trường hợp ACL là permit ip hoặc permit udp, thì những dịch vụ yêu cầu sự phân giải qua DNS, sẽ không hoạt động được, do đó cần thực hiện deny đối với dịch vụ DNS.

    Cho phép echo-reply trở về:

    Code:
    ciscoasa(config)# access-list PING permit icmp any 192.168.1.0 255.255.255.0 echo-reply
    
    ciscoasa(config)# access-group PING in interface outside
    Tắt tính năng NAT (tùy chọn):

    Code:
    ciscoasa(config)# no nat-control
    Định nghĩa local database:

    Code:
    ciscoasa(config)# username vnpro password vnpro
    Kích hoạt tính năng Cut-through proxy cho tất cả luồng dữ liệu xuất phát từ cổng inside mà so trùng với ACL:

    Code:
    ciscoasa(config)# aaa authentication match AUTHEN inside LOCAL
    3. Cấu hình đầy đủ

    ciscoasa
    Code:
    [INDENT][SIZE=14px][FONT=Tahoma]ASA Version 7.2(3)
    
    !
    
    hostname ciscoasa
    
    enable password 8Ry2YjIyt7RRXU24 encrypted
    
    names
    
    !
    
    interface Ethernet0/0
    
    nameif inside
    
    security-level 100
    
    ip address 192.168.1.1 255.255.255.0
    
    !
    
    interface Ethernet0/1
    
    nameif outside
    
    security-level 0
    
    ip address 192.168.2.1 255.255.255.0
    
    !
    
    interface Ethernet0/2
    
    shutdown
    
    no nameif
    
    no security-level
    
    no ip address
    
    !
    
    interface Ethernet0/3
    
    shutdown
    
    no nameif
    
    no security-level
    
    no ip address
    
    !
    
    interface Management0/0
    
    shutdown
    
    no nameif
    
    no security-level
    
    no ip address
    
    !
    
    [B]access-list AUTHEN extended permit tcp 192.168.1.0 255.255.25.0 any[/B]
    
    [B]access-list PING extended permit icmp any 192.168.1.0 255.255.255.0 echo-reply[/B]
    
     
    
    [B]access-group PING in interface outside[/B]
    
    route outside 0.0.0.0 0.0.0.0 192.168.2.2 1
    
     
    
    timeout uauth 0:05:00 absolute
    
    [B]aaa authentication match AUTHEN inside LOCAL[/B]
    
    !
    
    [B]username vnpro password e8rujZhPXEdSbbnI encrypted[/B][/FONT][/SIZE][/INDENT]
     
    [SIZE=14px][FONT=Tahoma] [/FONT][/SIZE]

    GATEWAY
    Code:
    [INDENT][SIZE=14px][FONT=Tahoma]Building configuration...
    
    Current configuration : 1191 bytes
    
    !
    
    hostname GATEWAY
    
    !
    
    interface FastEthernet0/0
    
    ip address 192.168.2.2 255.255.255.0
    
    [B]ip nat inside[/B]
    
    ip virtual-reassembly
    
    duplex auto
    
    speed auto
    
    !
    
    interface FastEthernet0/1
    
    [B]ip address dhcp[/B]
    
    [B]ip nat outside[/B]
    
    ip virtual-reassembly
    
    duplex auto
    
    speed auto
    
    !
    
    [B]ip route 192.168.1.0 255.255.255.0 192.168.2.1[/B]
    
    !
    
    [B]ip nat inside source list 1 interface FastEthernet0/1 overload[/B]
    
    !
    
    [B]access-list 1 permit 192.168.1.0 0.0.0.255[/B]
    
    [B]access-list 1 permit 192.168.2.0 0.0.0.255[/B]
    
    ![/FONT][/SIZE][/INDENT]
     
    [SIZE=14px][FONT=Tahoma] [/FONT][/SIZE]
    4. Kiểm tra


    Code:
    GATEWAY#sh ip interface brief fa0/1
    
    Interface        IP-Address       OK?   Method Status   Protocol
    
    FastEthernet0/1 10.215.219.187   YES   DHCP    up       up
    Code:
    GATEWAY# sh ip route static
    
    S 192.168.1.0/24 [1/0] via 192.168.2.1
    
    S* 0.0.0.0/0 [254/0] via 10.215.219.254
    Giao tiếp thành công với ICMP, vì ICMP không được yêu cầu thực hiện xác thực. Tuy nhiên tất cả dịch vụ hoạt động trên TCP không thể thực hiện giao tiếp cho đến khi được xác thực.



    Hình 2.2

    Thực hiện truy cập dịch vụ Web (hình 2.3).


    Hình 2.3

    Yêu cầu thực hiện xác thực nếu chưa được xác thực trước đó (hình 2.4).


    Hình 2.4
    Xác thực thành công (hình 2.5).

    Trạng thái xác thực:

    Code:
    ciscoasa(config)# sh uauth
    
    Current Most Seen
    
    Authenticated Users 1 1
    
    Authen In Progress 0 2
    
    user 'vnpro' at 192.168.1.2, authenticated
    
    absolute timeout: 0:05:00
    
    inactivity timeout: 0:00:00




    Phan Trung Tín
    Email: phantrungtin@vnpro.org
    .
Trung Tâm Tin Học VnPro
149/1D Ung Văn Khiêm, P.25, Q.Bình Thạnh, Tp.HCM
Tel: (028) 35124257 (028) 36222234
Fax: (028) 35124314

Home Page: http://www.vnpro.vn
Forum: http://www.vnpro.org
Twitter: https://twitter.com/VnVnpro
LinkedIn: https://www.linkedin.com/in/VnPro
- 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

Videos: http://www.dancisco.com
Blog: http://www.vnpro.org/blog
Facebook: http://facebook.com/VnPro
Zalo: https://zalo.me/1005309060549762169
​​​​​​
Working...
X