networking:cisco:extd-acl

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
networking:cisco:extd-acl [2026/02/04 22:50] – [Cisco : Extended Access Control List [U]] ilyasanetworking:cisco:extd-acl [2026/02/04 23:38] (current) – [Testing] ilyasa
Line 3: Line 3:
 Pada Halaman sebelumnya [[std-acl|]] kita telah menkonfigurasi Acess Control list standard sekarang kita akan konfigurasi Extended Access control list. Berbeda dengan standard ACL ,extended ACL berkemampuan untuk menfilter paket tidak hanya dengan source ip address melainkan dengan sourceip, destination ip, Port, Type connection (tcp/udp). Sehingga memungkinkan filtering paket lebih tepat sasaran. Pada Halaman sebelumnya [[std-acl|]] kita telah menkonfigurasi Acess Control list standard sekarang kita akan konfigurasi Extended Access control list. Berbeda dengan standard ACL ,extended ACL berkemampuan untuk menfilter paket tidak hanya dengan source ip address melainkan dengan sourceip, destination ip, Port, Type connection (tcp/udp). Sehingga memungkinkan filtering paket lebih tepat sasaran.
 ===== Syntax ===== ===== Syntax =====
-==== Some acction ==== +Berikut adallah syntax dalam menkongfigurasi Extended ACL: 
-^ Command ^ Description ^ + 
-| ''S1(config)#vlan [vlan-ID]'' | Membuat VLAN baru dan menetapkan nomor VLAN | +==== Membuat Extended ACL (number) ==== 
-| ''S1(config-vlan)#name [name]'' | Memberikan nama pada VLAN |+ 
 +<code js> 
 +Router(config)# access-list [ACL_NUMBER[permit|deny] protocol source source-wildcard destination destination-wildcard [eq port] 
 +</code> 
 + 
 +  * ACL_NUMBER : 100-199, 2000-2699 
 +  * permit: Mengizinkan lalu lintas dari alamat IP yang ditentukan. 
 +  * deny: Menolak lalu lintas dari alamat IP yang ditentukan. 
 +  * source/destinantion: source/destination ip address yang ingin di filter. 
 +  * wildcard: wildcard untuk menentukan range network. w 
 +  * eq port : equal, port yang akan di filter. bisa berupa nama
 Contoh: Contoh:
-<code> + 
-vlan 10 +<code js
- name VLAN-10 +Router(config)# access-list 101 permit tcp 192.168.1.0 0.0.0.255 172.16.0.0 0.0.0.255 eq 80 
-vlan 20 +</code> 
- name VLAN-20 + 
-vlan 99 +==== Membuat Standard ACL (Named) ==== 
- name VLAN-Management+ 
 +<code js> 
 +Router(config)# ip access-list extended [ACL_NAME] 
 +Router(config-ext-nacl)# [permit|deny] protocol source source-wildcard destination destination-wildcard [eq port] 
 +</code> 
 + 
 +contoh: 
 + 
 +<code js> 
 +Router(config)# ip access-list extended WEB_FILTER 
 +Router(config-ext-nacl)# permit tcp 192.168.1.0 0.0.0.255 172.16.0.0 0.0.0.255 eq 80 
 +Router(config-ext-nacl)# deny tcp any any eq 23 
 +</code> 
 + 
 +==== Terapkan ACL ke interface ==== 
 + 
 +<code js> 
 +Router(config)# interface <nama_interface> 
 +Router(config-if)# access-list <nomor_acl>/<named_acl> in/out 
 +</code> 
 + 
 +  * in: Menerapkan ACL pada paket yang kearah interface. 
 +  * out: Menerapkan ACL pada paket yang keluar dari interface. 
 + 
 +Contoh: 
 + 
 +<code js> 
 +Router(config)# interface FastEthernet0/
 +Router(config-if)# access-list 10 in 
 +</code> 
 + 
 +<code js> 
 +Router(config)# interface GigabitEthernet 0/0 
 +Router(config-if)# ip access-group WEB_FILTER in 
 +</code> 
 + 
 +==== Troubleshot ==== 
 + 
 +<code js> 
 +Router# show access-lists
 </code> </code>
  
 ===== Topologi ===== ===== Topologi =====
-Gambar topology +{{ :networking:cisco:cisco_extendedacl_rev.png?nolink |}} 
-Goals Topology +Tujuan:  
-===== Konfigurasi ===== +  - Block akses http pada LAN ke Server  
-  * **Step : Pembuatan VLANs** +  Block akses ssh pada LAN 2 ke Server-C
-<code> +
-Switch(config)#vlan 10 +
-Switch(config-vlan)#name BIRU +
-Switch(config-vlan)#exit+
  
-Switch(config)#vlan 20 +<hidden Preconfig> 
-Switch(config-vlan)#name MAGENTA +* **R1: Preconfig** 
-Switch(config-vlan)#exit+<code js> 
 +hostname R1 
 +
 +ip dhcp excluded-address 192.168.1.1  
 +ip dhcp excluded-address 192.168.2.1 
 +
 +ip dhcp pool LAN1 
 +   network 192.168.1.0 255.255.255.0 
 +   default-router 192.168.1.1 
 +
 +ip dhcp pool LAN2 
 +   network 192.168.2.0 255.255.255.0 
 +   default-router 192.168.2.1 
 +
 +interface FastEthernet0/
 + ip address 172.16.1.1 255.255.255.252 
 + no shutdown 
 +
 +interface FastEthernet0/
 + ip address 192.168.1.1 255.255.255.0 
 + no shutdown 
 +
 +interface FastEthernet1/
 + ip address 192.168.2.1 255.255.255.0 
 + no shutdown 
 +
 +router ospf 1 
 + network 172.16.1.0 0.0.0.3 area 0 
 + network 192.168.1.0 0.0.0.255 area 0 
 + network 192.168.2.0 0.0.0.255 area 0 
 +!
 </code> </code>
-  * **Step 2 : Assign VLANs ke Ports** 
-<code> 
-Switch(config)#interface f0/1 
-Switch(config-if)#switchport mode access  
-Switch(config-if)#switchport access vlan 10 
-Switch(config-if)#exit 
  
-Switch(config)#interface f0/2 +* **R2: Preconfig** 
-Switch(config-if)#switchport mode access  +<code js> 
-Switch(config-if)#switchport access vlan 10 +hostname R2 
-Switch(config-if)#exit+
 +ip dhcp pool SERVER 
 +   network 10.10.10.0 255.255.255.0 
 +   default-router 10.10.10.1 
 +
 +interface FastEthernet0/
 + ip address 172.16.1.255.255.255.252 
 + no shutdown 
 +
 +interface FastEthernet0/
 + ip address 10.10.10.1 255.255.255.0 
 + no shutdown 
 +
 +router ospf 1 
 + network 10.10.10.0 0.0.0.255 area 0 
 + network 172.16.1.0 0.0.0.3 area 0
 </code> </code>
 +</hidden>
 +===== Konfigurasi =====
 +<WRAP center round info 90%>
 +Apabilsa standar ACL umumnya ditempatkan paling dekat dengan tujuan. Extended ACL lebih baik ditempatkan paling dekat dengan sumber.
 +</WRAP>
  
 +==== Membuat extended ACL rules ====
 +=== block https access dari lan1 ===
 +  * Membuat access control liss
 +<code js>
 +R1(config)#ip access-list extended Block-HTTP
 +R1(config-ext-nacl)#$192.168.1.0 0.0.0.255 10.10.10.0 0.0.0.255 eq 80
 +R1(config-ext-nacl)#  permit ip any any
 +</code>
 +  * terapkan pada interface
 +<code js>
 +R1(config)#interface fa0/1
 +R1(config-if)# ip access-group Block-HTTP in
 +</code>
 +=== block ssh access dari lan2 ===
 +  * Membuat access control list
 +<code js>
 +R1(config)#ip access-list extended Block-SSH
 +R1(config-ext-nacl)#$192.168.2.0 0.0.0.255 10.10.10.0 0.0.0.255 eq 22
 +R1(config-ext-nacl)#  permit ip any any
 +</code>
 +  * terapkan pada interface
 +<code js>
 +R1(config)#interface fa1/0
 +R1(config-if)# ip access-group Block-SSH in
 +</code>
 ===== Testing ===== ===== Testing =====
 +  * **LAN1 Mencoba akses http❌, dan ssh✅**
 +{{ :networking:cisco:cisco_extendedacl_test02.png?nolink&400 |}}
 +  * **LAN2 Mencoba akses http✅, dan ssh❌**
 +{{ :networking:cisco:cisco_extendedacl_test01.png?nolink&400 |}}
 +
  • networking/cisco/extd-acl.1770220220.txt.gz
  • Last modified: 2026/02/04 22:50
  • by ilyasa