• 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.

Giúp mình bài lab cơ bản về asa

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

  • Giúp mình bài lab cơ bản về asa

    Mình mới bắt đầu nghiên cứu về ASA, tính làm 1 cái lab cơ bản như này

    G1: inside
    G3: DMZ
    G0: outside
    Mình đã rip trên ASA rồi mà ko ping được giữa các vùng. Ping từ ASA đã thấy hết, nhưng từ in-out, in-dmz, out-dmz đều ko được
    Ko biết còn cần viết thêm gì nữa ko. Mọi người giúp mình với nhé
    Attached Files

  • #2
    hi...đương nhiên là bạn không thể ping được rồi. Mặc định trên firewall của cisco PIX/ASA thì không cho các gói tin kiểu connectionless protocols như icmp đi qua, ASA chỉ khởi tạo các phiên một chiều, đó là lí do vì sao bạn ping từ ASA đi thì được nhưng từ in-out, in-dmz, out-dmz đều ko được. Để làm được điều này thì mình cần tạo 1 access-list cho phép việc ping in-out, in-dmz, out-dmz.
    access-list 101 extended permit icmp any any echo
    access-list 101 extended permit icmp any any echo-reply
    access-list 101 extended permit icmp any any time-exceeded

    Rồi gán vào các cổng theo chiều in
    access-group 101 in interface inside
    access-group 101 in interface outside
    access-group 101 in interface dmz


    .
    vậy là ping được. :)

    Comment


    • #3
      Originally posted by cv.mi0 View Post
      access-list 101 extended permit icmp any any echo
      access-list 101 extended permit icmp any any echo-reply
      access-list 101 extended permit icmp any any time-exceeded

      Rồi gán vào các cổng theo chiều in
      access-group 101 in interface inside
      access-group 101 in interface outside
      access-group 101 in interface dmz
      Trên các router và asa mình đã rip hết rồi
      Sửa lại acl giống bạn mà vẫn ko ping được :(

      Comment


      • #4
        Bạn show file cấu hình lên để mọi người tiện theo dõi và support nhé!

        Comment


        • #5
          Show run của mình như vầy:

          ASA Version 8.4(2)
          !
          hostname asa1
          enable password 8Ry2YjIyt7RRXU24 encrypted
          passwd PLBb27eKLE1o9FTB encrypted
          names
          !
          interface GigabitEthernet0
          nameif outside
          security-level 0
          ip address 1.0.0.10 255.0.0.0
          !
          interface GigabitEthernet1
          nameif inside
          security-level 100
          ip address 192.168.1.1 255.255.255.0
          !
          interface GigabitEthernet3
          nameif dmz
          security-level 50
          ip address 192.168.3.1 255.255.255.0
          !
          ================================================== =============
          ssh 192.168.1.10 255.255.255.255 inside
          ssh timeout 5
          console timeout 0
          threat-detection basic-threat
          threat-detection statistics access-list
          no threat-detection statistics tcp-intercept
          username asa1 password z6IYX/XIg0X6rXYz encrypted
          !
          ================================================== =============
          router rip
          network 1.0.0.0
          network 192.168.1.0
          network 192.168.3.0
          passive-interface default
          default-information originate
          version 2
          no auto-summary
          !
          route outside 0.0.0.0 0.0.0.0 1.0.0.1 1
          ================================================== =============
          access-list cached ACL log flows: total 0, denied 0 (deny-flow-max 4096)
          alert-interval 300
          access-list 101; 3 elements; name hash: 0xe7d586b5
          access-list 101 line 1 extended permit icmp any any echo (hitcnt=0) 0xd43dbb9e
          access-list 101 line 2 extended permit icmp any any echo-reply (hitcnt=0) 0x030901cd
          access-list 101 line 3 extended permit icmp any any time-exceeded (hitcnt=0) 0x12127ce7

          Comment


          • #6
            hi..vậy bạn không ping được chỗ nào thế ? Các router kia có học được các mạng mà bạn rip không ?
            bạn có thể xem file cấu hình này (dựa trên sơ đồ của bạn)
            R1(inside)
            R1#sh run
            Building configuration...

            Current configuration : 559 bytes
            !
            version 12.2
            service timestamps debug datetime msec
            service timestamps log datetime msec
            no service password-encryption
            !
            hostname R1
            !
            logging queue-limit 100
            !
            memory-size iomem 15
            ip subnet-zero
            !
            !
            no ip domain lookup
            !
            !
            !
            !
            !
            interface Ethernet0
            no ip address
            shutdown
            half-duplex
            !
            interface FastEthernet0
            ip address 192.168.1.2 255.255.255.0
            speed auto
            !
            router rip
            version 2
            network 192.168.1.0
            !
            ip classless
            no ip http server
            !
            !
            !
            !
            !
            line con 0
            exec-timeout 0 0
            logging synchronous
            line aux 0
            line vty 0 4
            !
            no scheduler allocate
            end

            R2(dmz)
            R2#sh run
            Building configuration...

            Current configuration : 559 bytes
            !
            version 12.2
            service timestamps debug datetime msec
            service timestamps log datetime msec
            no service password-encryption
            !
            hostname R2
            !
            logging queue-limit 100
            !
            memory-size iomem 15
            ip subnet-zero
            !
            !
            no ip domain lookup
            !
            !
            !
            !
            !
            interface Ethernet0
            no ip address
            shutdown
            half-duplex
            !
            interface FastEthernet0
            ip address 192.168.3.2 255.255.255.0
            speed auto
            !
            router rip
            version 2
            network 192.168.3.0
            !
            ip classless
            no ip http server
            !
            !
            !
            !
            !
            line con 0
            exec-timeout 0 0
            logging synchronous
            line aux 0
            line vty 0 4
            !
            no scheduler allocate
            end
            R3(outside)
            R3#sh run
            Building configuration...

            *Mar 1 00:16:32.831: %SYS-5-CONFIG_I: Configured from console by console
            Current configuration : 547 bytes
            !
            version 12.2
            service timestamps debug datetime msec
            service timestamps log datetime msec
            no service password-encryption
            !
            hostname R3
            !
            logging queue-limit 100
            !
            memory-size iomem 15
            ip subnet-zero
            !
            !
            no ip domain lookup
            !
            !
            !
            !
            !
            interface Ethernet0
            no ip address
            shutdown
            half-duplex
            !
            interface FastEthernet0
            ip address 1.0.0.1 255.0.0.0
            speed auto
            !
            router rip
            version 2
            network 1.0.0.0
            !
            ip classless
            no ip http server
            !
            !
            !
            !
            !
            line con 0
            exec-timeout 0 0
            logging synchronous
            line aux 0
            line vty 0 4
            !
            no scheduler allocate
            end

            ASA
            ciscoasa# sh run
            : Saved
            :
            ASA Version 8.4(2)
            !
            hostname ciscoasa
            enable password 8Ry2YjIyt7RRXU24 encrypted
            passwd 2KFQnbNIdI.2KYOU encrypted
            names
            !
            interface GigabitEthernet0
            nameif inside
            security-level 100
            ip address 192.168.1.1 255.255.255.0
            !
            interface GigabitEthernet1
            nameif dmz
            security-level 50
            ip address 192.168.3.1 255.255.255.0
            !
            interface GigabitEthernet2
            nameif outside
            security-level 0
            ip address 1.0.0.10 255.0.0.0
            !
            interface GigabitEthernet3
            shutdown
            no nameif
            no security-level
            no ip address
            !
            interface GigabitEthernet4
            shutdown
            no nameif
            no security-level
            no ip address
            !
            interface GigabitEthernet5
            shutdown
            no nameif
            no security-level
            no ip address
            !
            ftp mode passive
            access-list 101 extended permit icmp any any echo
            access-list 101 extended permit icmp any any echo-reply
            access-list 101 extended permit icmp any any time-exceeded
            pager lines 24
            mtu inside 1500
            mtu dmz 1500
            mtu outside 1500
            icmp unreachable rate-limit 1 burst-size 1
            no asdm history enable
            arp timeout 14400
            access-group 101 in interface inside
            access-group 101 in interface dmz
            access-group 101 in interface outside
            !
            router rip
            network 1.0.0.0
            network 192.168.1.0
            network 192.168.3.0
            passive-interface default
            default-information originate
            version 2
            !
            route outside 0.0.0.0 0.0.0.0 1.0.0.1 1
            timeout xlate 3:00:00
            timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02
            timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 mgcp-pat 0:05:00
            timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00
            timeout sip-provisional-media 0:02:00 uauth 0:05:00 absolute
            timeout tcp-proxy-reassembly 0:01:00
            timeout floating-conn 0:00:00
            dynamic-access-policy-record DfltAccessPolicy
            user-identity default-domain LOCAL
            no snmp-server location
            no snmp-server contact
            snmp-server enable traps snmp authentication linkup linkdown coldstart warmstart
            telnet timeout 5
            ssh timeout 5
            console timeout 0
            threat-detection basic-threat
            threat-detection statistics access-list
            no threat-detection statistics tcp-intercept
            !
            !
            prompt hostname context
            no call-home reporting anonymous
            call-home
            profile CiscoTAC-1
            no active
            destination address http https://tools.cisco.com/its/service/...es/DDCEService
            destination address email callhome@cisco.com
            destination transport-method http
            subscribe-to-alert-group diagnostic
            subscribe-to-alert-group environment
            subscribe-to-alert-group inventory periodic monthly
            subscribe-to-alert-group configuration periodic monthly
            subscribe-to-alert-group telemetry periodic daily
            crashinfo save disable
            Cryptochecksum:bb9ae4004f03f09b0ec7f568432a6945
            : end

            Comment


            • #7
              Chán thật, vẫn ko được. Từ Asa ping được hết thì ko nói, ping từ R1-R3; R1-R4, R3-R4 đều ko được
              Ko biết lúc console bạn dùng router nào vậy, mình dùng c2691 ver 12.3
              Last edited by [Uchiha]; 04-08-2012, 02:37 PM.

              Comment


              • #8
                Cho mình hỏi thêm. trên con asa mình có cho phép R1 Telnet đến. Vậy thì mình được phép telnet đến tất cả các cổng của asa đúng ko hay là chỉ telnet đến được cái cổng R1 kết nối tới.

                Comment


                • #9
                  hi..mình làm trên r1700, bạn chỉ telnet được tới cổng R1 kết nối đến thôi.

                  Comment


                  • #10
                    Originally posted by [Uchiha]
                    Hình như NAT của mình có vấn đề thì phải.
                    Có ai cho mình xin cái config NAT bài lab này được ko
                    Cái này do bạn cấu hình ACL sai thôi.

                    - Thứ nhất bạn phải hiểu gói tin đi từ Security Level cao đến Security Level thấp thì được ASA xử lí thế nào?
                    - Thứ hai bạn phải hiểu ping hoạt động thế nào?

                    Từ đấy đưa ra cấu hình ACL thích hợp và áp dụng cho đúng interface. Còn cấu hình như bạn trên kia, áp dụng ACL cho cả 3 interface thì không được là tất nhiên, do cuối mỗi ACL đều có 1 luật là deny all

                    Comment


                    • #11
                      Hầy da, mình biết bị sao rồi từ con R1 ping được đến R4 nhưng ko ping được đến E0 của ASA.
                      Mình toàn ping đến E0 của ASA => ko được, ping đến R4 thì ok
                      Có ai biết tại sao ko:-/:-/:-/
                      Last edited by [Uchiha]; 09-08-2012, 02:32 PM.

                      Comment


                      • #12
                        Originally posted by [Uchiha] View Post
                        Hầy da, mình biết bị sao rồi từ con R1 ping được đến R4 nhưng ko ping được đến E0 của ASA.
                        Mình toàn ping đến E0 của ASA => ko được, ping đến R4 thì ok
                        Có ai biết tại sao ko:-/:-/:-/
                        Theo mình ASA không thể kiểm tra gói tin xuất phát từ nó--->gói eho-reply trả về bị drop--->không ping được

                        Comment


                        • #13
                          bạn thử bỏ "passive-interface default" trong cấu hình RIP tại ASA thử xem
                          Bùi Quốc Kỳ
                          Email: buiquocky@vnpro.org
                          Yahoo: buiquocky_vnpro
                          -------------------------------------------------------------------------------------------
                        Trung Tâm Tin Học VnPro
                        Địa chỉ: 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
                        Network channel: http://www.dancisco.com
                        • 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

                        Blog: http://www.vnpro.org/blog
                        Wifi forum: http://www.wifipro.org

                        Comment


                        • #14
                          câu lệnh "passive-interface default" có ý nghĩa là sẽ không gửi gói tin quảng bá RIP ra tất cả các port
                          Bùi Quốc Kỳ
                          Email: buiquocky@vnpro.org
                          Yahoo: buiquocky_vnpro
                          -------------------------------------------------------------------------------------------
                          Trung Tâm Tin Học VnPro
                          Địa chỉ: 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
                          Network channel: http://www.dancisco.com
                          • 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

                          Blog: http://www.vnpro.org/blog
                          Wifi forum: http://www.wifipro.org

                          Comment


                          • #15
                            Trên con ASA:

                            icmp permit any inside
                            icmp permit any dmz
                            icmp permit any outside

                            policy-map global_policy
                            class inspection_default
                            inspect icmp

                            access-list 101 extended permit icmp any any echo
                            access-list 101 extended permit icmp any any echo-reply
                            access-list 101 extended permit icmp any any time-exceeded

                            access-group 101 in interface inside
                            access-group 101 in interface outside
                            access-group 101 in interface dmz
                            Last edited by ptran; 16-08-2012, 11:21 AM.
                            Trần Nhân Hòa
                            CMND #0146257668

                            Comment

                            • Working...
                              X