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

Route static on firewall asa 8.4(2)

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

  • Route static on firewall asa 8.4(2)

    Click image for larger version

Name:	route.jpg
Views:	1
Size:	20.4 KB
ID:	208917
    Em có 1 topo như trên. Em đã cấu hình trên ASA như sau
    Code:
    ASA Version 8.4(2)
    !
    hostname ciscoasa
    enable password 8Ry2YjIyt7RRXU24 encrypted
    passwd 2KFQnbNIdI.2KYOU encrypted
    names
    !
    interface GigabitEthernet0
     nameif OUTSIDE
     security-level 0
     ip address 100.1.1.2 255.255.255.0
    !
    interface GigabitEthernet1
     nameif INSIDE
     security-level 100
     ip address 192.168.1.2 255.255.255.0
    !
    ftp mode passive
    access-list 100 extended permit ip any any
    access-group 100 in interface OUTSIDE
    !
    
    route OUTSIDE 0.0.0.0 0.0.0.0 100.1.1.1 1
    route INSIDE 192.168.2.0 255.255.255.0 192.168.1.1 1
    Trên các Router em chưa định tuyến thì thấy rằng :
    - Từ máy C1 có thể Ping được tới cổng e1 của ASA và ngược lại
    - Từ R1 có thể ping được tới cổng e0 và ngược lại
    Em muốn hỏi mọi người là :
    1. Điều kiện để em có thể ping được từ máy C1 đến cổng f0/0 của R1 là gì ạ ?
    Em cảm ơn mọi người nhiều :D
    Attached Files

  • #2
    Originally posted by trungductk8utehy View Post
    [ATTACH=CONFIG]5695[/ATTACH]
    Em có 1 topo như trên. Em đã cấu hình trên ASA như sau
    Code:
    ASA Version 8.4(2)
    !
    hostname ciscoasa
    enable password 8Ry2YjIyt7RRXU24 encrypted
    passwd 2KFQnbNIdI.2KYOU encrypted
    names
    !
    interface GigabitEthernet0
     nameif OUTSIDE
     security-level 0
     ip address 100.1.1.2 255.255.255.0
    !
    interface GigabitEthernet1
     nameif INSIDE
     security-level 100
     ip address 192.168.1.2 255.255.255.0
    !
    ftp mode passive
    access-list 100 extended permit ip any any
    access-group 100 in interface OUTSIDE
    !
    
    route OUTSIDE 0.0.0.0 0.0.0.0 100.1.1.1 1
    route INSIDE 192.168.2.0 255.255.255.0 192.168.1.1 1
    Trên các Router em chưa định tuyến thì thấy rằng :
    - Từ máy C1 có thể Ping được tới cổng e1 của ASA và ngược lại
    - Từ R1 có thể ping được tới cổng e0 và ngược lại
    Em muốn hỏi mọi người là :
    1. Điều kiện để em có thể ping được từ máy C1 đến cổng f0/0 của R1 là gì ạ ?
    Em cảm ơn mọi người nhiều :D
    Bạn phải định tuyến trên ASA1, R1 và R2 và tạo ACLs trên ASA1 cho phép mạng 192.168.2.0/24 cho phép đi qua ASA1 với giao thức ICMP và áp vào interface e1 theo chiều vào hay e0 theo chiều ra đều được.

    Comment


    • #3
      Originally posted by lucandat View Post
      Bạn phải định tuyến trên ASA1, R1 và R2 và tạo ACLs trên ASA1 cho phép mạng 192.168.2.0/24 cho phép đi qua ASA1 với giao thức ICMP và áp vào interface e1 theo chiều vào hay e0 theo chiều ra đều được.
      Em cảm ơn anh ạ !
      Giờ em Ping từ C1 đến R1 thì Request time out ! Em cũng có biết cơ chế của ASA là chỉ cho phép gói tin đi từ mức bảo mật cao xuống thấp là được phép và ngược lại thì không. Tức là Gói icmp của em gửi từ PC đến được R1 rồi. Nhưng khi R1 trả về thì bị chặn ở ASA đúng ko ạ ? Vậy em nghĩ mình phải áp chính sách của anh nói ở trên vào chiều 'in' của e0 (OUTSIDE) chứ ạ ? Anh giải thích giúp em chỗ này
      P/s : Em đã thử áp rùi mà không chạy :( Lần trước em làm định tuyến động thì chạy vô tư. Nhưng mạng nhỏ thì em thấy nói là nên dùng static route :(

      Comment


      • #4
        bạn tạo ACLs cho phép host 100.1.1.1 vào ASA1 CHƯA?

        Comment


        • #5
          Originally posted by lucandat View Post
          bạn tạo ACLs cho phép host 100.1.1.1 vào ASA1 CHƯA?
          Em tạo rùi ạ. Cụ thể là em tạo và áp vào cổng như sau ạ
          ciscoasa(config)# access-list ICMP extended permit icmp any any echo
          ciscoasa(config)# access-list ICMP extended permit icmp any any echo-reply
          ciscoasa(config)# access-list ICMP extended permit icmp any any time-exceeded

          ciscoasa(config)# access-group ICMP in interface OUTSIDE

          Comment


          • #6
            Trước khi tạo ACLs trên ASA1 bạn phải đảm bảo các router và máy C1 có thể ping được đến ASA1 và ngược lại bằng định tuyến tĩnh như sau:

            R1(config)#ip route 192.168.1.0 255.255.255.0 100.1.1.2
            R1(config)#ip route 192.168.2.0 255.255.255.0 100.1.1.2
            R1(config)#do sh ip ro
            Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
            D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
            N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
            E1 - OSPF external type 1, E2 - OSPF external type 2
            i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
            ia - IS-IS inter area, * - candidate default, U - per-user static route
            o - ODR, P - periodic downloaded static route
            Gateway of last resort is not set
            100.0.0.0/24 is subnetted, 1 subnets
            C 100.1.1.0 is directly connected, FastEthernet0/0
            S 192.168.1.0/24 [1/0] via 100.1.1.2
            S 192.168.2.0/24 [1/0] via 100.1.1.2

            trên R2 bạn định tuyến tĩnh như sau:
            R2(config)#ip route 100.1.1.0 255.255.255.0 192.168.1.2
            R2(config)#do sh ip ro
            Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
            D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
            N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
            E1 - OSPF external type 1, E2 - OSPF external type 2
            i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
            ia - IS-IS inter area, * - candidate default, U - per-user static route
            o - ODR, P - periodic downloaded static route
            Gateway of last resort is not set
            100.0.0.0/24 is subnetted, 1 subnets
            S 100.1.1.0 [1/0] via 192.168.1.2
            C 192.168.1.0/24 is directly connected, FastEthernet0/0
            C 192.168.2.0/24 is directly connected, FastEthernet0/1

            bạn định tuyến trên ASA1:
            ciscoasa(config)#route inside 192.168.2.0 255.255.255.0 192.168.1.1
            ciscoasa(config)# route outside 0 0 100.1.1.1
            ciscoasa(config)# sho ro
            Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
            D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
            N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
            E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
            i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
            * - candidate default, U - per-user static route, o - ODR
            P - periodic downloaded static route
            Gateway of last resort is 100.1.1.1 to network 0.0.0.0
            C 100.1.1.0 255.255.255.0 is directly connected, outside
            C 192.168.1.0 255.255.255.0 is directly connected, inside
            S 192.168.2.0 255.255.255.0 [1/0] via 192.168.1.1, inside
            S* 0.0.0.0 0.0.0.0 [1/0] via 100.1.1.1, outside

            cuối cùng bạn mới tạo ACLs như sau:
            ASA1:
            ciscoasa(config)#
            access-list ICMP permit icmp any any echo
            access-list ICMP permit icmp any any echo-reply
            access-list ICMP deny ip any any
            access-group ICMP in interface outside

            kiểm tra kết quả:

            mình dủng router R3 thay cho máy C1 và kết quả ping thành công mà:
            R3#ping 100.1.1.1
            Type escape sequence to abort.
            Sending 5, 100-byte ICMP Echos to 100.1.1.1, timeout is 2 seconds:
            !!!!!
            Success rate is 100 percent (5/5), round-trip min/avg/max = 40/50/84 ms

            mình ping ngược lại từ R1 đến C1 cũng thành công mà:
            R1#ping 192.168.2.2
            Type escape sequence to abort.
            Sending 5, 100-byte ICMP Echos to 192.168.2.2, timeout is 2 seconds:
            !!!!!
            Success rate is 100 percent (5/5), round-trip min/avg/max = 40/59/88 ms

            chúc bạn học tốt!
            Last edited by lucandat; 16-03-2014, 11:11 AM.

            Comment


            • #7
              Originally posted by lucandat View Post
              Trước khi tạo ACLs trên ASA1 bạn phải đảm bảo các router và máy C1 có thể ping được đến ASA1 và ngược lại bằng định tuyến tĩnh như sau:

              R1(config)#ip route 192.168.1.0 255.255.255.0 100.1.1.2
              R1(config)#ip route 192.168.2.0 255.255.255.0 100.1.1.2
              R1(config)#do sh ip ro
              Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
              D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
              N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
              E1 - OSPF external type 1, E2 - OSPF external type 2
              i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
              ia - IS-IS inter area, * - candidate default, U - per-user static route
              o - ODR, P - periodic downloaded static route
              Gateway of last resort is not set
              100.0.0.0/24 is subnetted, 1 subnets
              C 100.1.1.0 is directly connected, FastEthernet0/0
              S 192.168.1.0/24 [1/0] via 100.1.1.2
              S 192.168.2.0/24 [1/0] via 100.1.1.2

              trên R2 bạn định tuyến tĩnh như sau:
              R2(config)#ip route 100.1.1.0 255.255.255.0 192.168.1.2
              R2(config)#do sh ip ro
              Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
              D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
              N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
              E1 - OSPF external type 1, E2 - OSPF external type 2
              i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
              ia - IS-IS inter area, * - candidate default, U - per-user static route
              o - ODR, P - periodic downloaded static route
              Gateway of last resort is not set
              100.0.0.0/24 is subnetted, 1 subnets
              S 100.1.1.0 [1/0] via 192.168.1.2
              C 192.168.1.0/24 is directly connected, FastEthernet0/0
              C 192.168.2.0/24 is directly connected, FastEthernet0/1

              bạn định tuyến trên ASA1:
              ciscoasa(config)#route inside 192.168.2.0 255.255.255.0 192.168.1.1
              ciscoasa(config)# route outside 0 0 100.1.1.1
              ciscoasa(config)# sho ro
              Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
              D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
              N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
              E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
              i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
              * - candidate default, U - per-user static route, o - ODR
              P - periodic downloaded static route
              Gateway of last resort is 100.1.1.1 to network 0.0.0.0
              C 100.1.1.0 255.255.255.0 is directly connected, outside
              C 192.168.1.0 255.255.255.0 is directly connected, inside
              S 192.168.2.0 255.255.255.0 [1/0] via 192.168.1.1, inside
              S* 0.0.0.0 0.0.0.0 [1/0] via 100.1.1.1, outside

              cuối cùng bạn mới tạo ACLs như sau:
              ASA1:
              ciscoasa(config)#
              access-list ICMP permit icmp any any echo
              access-list ICMP permit icmp any any echo-reply
              access-list ICMP deny ip any any
              access-group ICMP in interface outside

              kiểm tra kết quả:

              mình dủng router R3 thay cho máy C1 và kết quả ping thành công mà:
              R3#ping 100.1.1.1
              Type escape sequence to abort.
              Sending 5, 100-byte ICMP Echos to 100.1.1.1, timeout is 2 seconds:
              !!!!!
              Success rate is 100 percent (5/5), round-trip min/avg/max = 40/50/84 ms

              mình ping ngược lại từ R1 đến C1 cũng thành công mà:
              R1#ping 192.168.2.2
              Type escape sequence to abort.
              Sending 5, 100-byte ICMP Echos to 192.168.2.2, timeout is 2 seconds:
              !!!!!
              Success rate is 100 percent (5/5), round-trip min/avg/max = 40/59/88 ms

              chúc bạn học tốt!
              Em cảm ơn anh ạ :)
              Em biết mình sai ở đâu rùi ạ :D

              Comment

              Working...
              X