# Blocking by IP Address

{% hint style="info" %}
To block longer lists of IP addresses, please check [network ACLs](https://docs.transparentedge.eu/getting-started/dashboard/auto-provisioning/network-acls).
{% endhint %}

To block traffic coming from one or multiple IP addresses, you can incorporate the following configuration snippet within the vcl\_recv function.

```javascript
sub vcl_recv{
    if (req.http.True-Client-Ip ~ "(1.1.2.2|1.2.3.4)") { 
        call deny_request;
    } 
}

```

In this example, we use the IP address provided in the [True-Client-Ip](https://docs.transparentedge.eu/getting-started/faq/cabeceras-por-defecto/true-client-ip-y-x-forwarded-for) header. If the request comes from any of the listed IP addresses, it will be blocked immediately.
