---
title: Reflect-acl Configuration Guide
slug: routing/reflect-acl-configuration-guide
description: Reflect-acl Configuration Guide
createdAt: 2025-12-03T02:28:42.997Z
---

## <font color="#1d50a2">Introduction</font>

Reflective ACL is a state-based dynamic access control technology primarily used for network security protection. Its core principle involves monitoring outbound sessions initiated from the internal network to automatically generate temporary reverse rules. These rules permit response traffic to return while blocking unauthorized access initiated from external sources.

## <font color="#1d50a2">Reflect-acl Configuration</font>

### <font color="#1d50a2">Create reflect-acl table</font>

| **Operation**                                  | **Command**                                                                                              | **Description** |
| ---------------------------------------------- | -------------------------------------------------------------------------------------------------------- | --------------- |
| Enter the system configuration view            | **configure terminal**                                                                                   |                 |
| Create and enter the system configuration view | **access-list \{REFLECT\_L3\|REFLECT\_L3V6}** *string* **\{ingress\|egress} \[des\_crip** *string* **]** |                 |

### <font color="#1d50a2">L3/L3v6 Matching Filter</font>

| **Keywords**  | **Description**                                                                     |
| ------------- | ----------------------------------------------------------------------------------- |
| ip-protocol   | IP protocol type, can be configured using either the numeric value or protocol name |
| src-ip        | Source IP address (with subnet mask), e.g., "10.1.1.1/24"                           |
| dst-ip        | Destination IP address (with subnet mask), e.g., "10.1.1.1/24"                      |
| src-port      | Protocol source port number                                                         |
| dst-port      | Protocol destination port number                                                    |
| dst-dns-group | DNS field, see Chapter 14 for details                                               |
| geosite       | Geosite field, see Chapter 15 for details                                           |
| geoip         | Geoip field, see Chapter 15 for details                                             |

## <font color="#1d50a2">Example of Reflect-acl Configuration</font>

**Network Requirements**

Interface 1 of the router connects to internal network users, while Interface 2 connects to the Internet. Configure a reflexive ACL on the outbound direction of Interface 2. Internal network hosts must first access servers on the Internet before Internet servers are permitted to access internal network hosts.

::Image[]{src="https://app.archbee.com/api/optimize/zl-MD6bX0o2Ab3p8w66u1/6DngcdUEDCeBzMLFh9k-Z-20251203-063330.png" size="80" width="2180" height="586" position="center" showCaption="false"}

**Procedure**

```plaintext
sonic(config)# access-list REFLECT_L3 test egress
sonic(config-REFLECT_L3-acl-test)# rule 1 src-ip 80.0.0.100 packet-action permit
sonic(config-REFLECT_L3-acl-test)# exit
sonic(config)# interface ethernet 2
sonic(config-if-2)# acl test
```

