What is the CPL to block/deny certain client IP addresses when trying to access a website?
search cancel

What is the CPL to block/deny certain client IP addresses when trying to access a website?

book

Article ID: 167283

calendar_today

Updated On:

Products

ProxySG Software - SGOS

Issue/Introduction

The purpose of this article is to show how to deny certain client IP addresses when trying to access specific website

 

Resolution

There are two ways to define CPL to achieve this.

  • The following CPL will only MATCH or DENY once both conditions are true (client.address and url.domain)

<proxy>
     client.address=10.1.1.2 url.domain=www.example.com deny

 

  • The following CPL lets you specify multiple client.addresses and multiple url.domains in the condition.

<proxy>
     condition=client_IP condition=url_domain deny

define condition client_IP
     client.address=10.1.1.0/24
     client.address=192.168.1.15
end

define condition url_domain
     url.domain=www.example.com
end