Allow few pages based on IPs | Community
Skip to main content
Level 5
May 24, 2023 4:17 PM UTC
Solved

Allow few pages based on IPs

Hi Team,

 

We are trying to allow/restrict few page access based on IP adress. Requirement is if user is connected with VPN, can access resource /content/mysite/us/en/private/*, if not connected, it should give 403 to all.

 

What we tried as below but its not working. Although IP address is correct in our real filter.

 

/filter {

........................

......................
   /0110 {
       /type "deny"
       /path "/content/mysite/us/en/private/*"
       /ips {
           "0.0.0.0/0"
       }
   }
   /0111 {
       /type "allow"
       /glob "/content/mysite/us/en/private/*"
       /ips {
           "192.0.0.0/8"
          
       }
   }
  
}

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

7 replies

arvind-1Author
Level 5
May 26, 2023 7:31 AM UTC

Thanks all for your kind reply. It helped.

 

We followed below link and able to get the same done.

 

https://experienceleague.adobe.com/docs/experience-cloud-kcs/kbarticles/KA-17455.html?lang=en#

Translate
Umesh_Thakur
New Participant
May 25, 2023 4:06 AM UTC

Do you have CDN?
It will be better, safe and easy if you manage these kind of stuff at CDN level.

Hope this helps

Umesh Thakur

Translate
praveenk9057427
Level 2
May 24, 2023 6:46 PM UTC

Hi @arvind-1 , Have you tried using 'allowedClients'.

/allowedClients {
/0 { /type "deny" /glob "0.0.0.0" }
/1 { /type "allow" /glob "192.0.0.0" }

}

Translate
aanchal-sikka
New Participant
May 24, 2023 6:23 PM UTC

Hello @arvind-1 

 

Can you configure two virtual host at the dispatcher level?

  • one for your intranet
  • one for your internet

 Deny rule for the internet and an allow rule for the intranet.

Translate
Aanchal Sikka
Saravanan_Dharmaraj
New Participant
May 24, 2023 4:32 PM UTC

@arvind-1 If you know the audience and can create a group for them then you can use the Closed User Groups(CUG) on the published site.

https://experienceleague.adobe.com/docs/experience-manager-65/administering/security/cug.html?lang=en 

Sorry thats not what you asked for, but i am throwing the idea since the IP changes needs to be maintained in dispatcher level.

Translate
arvind-1Author
Level 5
May 24, 2023 5:52 PM UTC

Thanks @saravanan_dharmaraj . 

 

Unfortunately CUG/audience is not known. we need to deny/allow based on IP only.

 

Making change at Dispatcher level is in our scope so Its not an issue 🙂

Translate