Expand my Community achievements bar.

SOLVED

How to whitelist IP address in AEM Dispatcher for specific path

Avatar

Level 3

Hi Team,

 

I do follow the post https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/how-to-whitelist-ip-throug... but we have a use case where location (like /content/abc) is also required along with IP address to whitelist.

 

May be if anyone came across such usecase and can share any information would be really helpful.

 

Thanks

1 Accepted Solution

Avatar

Correct answer by
Level 9

Hi @Sumit30908642ioye 

For restricting the IP whitelisting based on location you can try to add the IP restriction tags inside the Location URL tag which might help to achieve your usecase

 

LocationMatch "/content/abc*"
    Require ip 10.42.137.123
    Require ip 122.6.218.101
    #Repeat the "Require ip ..." for each IP you want to allow
    /RequireAll
    /LocationMatch

 

couple of links you can refer

https://httpd.apache.org/docs/2.4/mod/core.html#location

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

 

 

 

View solution in original post

4 Replies

Avatar

Correct answer by
Level 9

Hi @Sumit30908642ioye 

For restricting the IP whitelisting based on location you can try to add the IP restriction tags inside the Location URL tag which might help to achieve your usecase

 

LocationMatch "/content/abc*"
    Require ip 10.42.137.123
    Require ip 122.6.218.101
    #Repeat the "Require ip ..." for each IP you want to allow
    /RequireAll
    /LocationMatch

 

couple of links you can refer

https://httpd.apache.org/docs/2.4/mod/core.html#location

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

 

 

 

Avatar

Level 3

Thank you @sherinregi 

 

This looks interesting. Let me try and update here.

 

Thanks

Avatar

Level 1
<LocationMatch "^/content/abc/*.*$">
<RequireAny>
# We make sure the environment variable AllowIP is enforced
Require env AllowIP
 
Require ip 123.11.12.123
 
</RequireAny>
</LocationMatch>
 
i tried this in my rules file. but this did not work. Am i going wrong anywhere?

Avatar

Level 9

hi @Jayaa 

Can you check whether the location/locationMatch directive was picked . Try to give a generic rule like just to make sure its picking to start with debugging

<Location "/">
AllowOverride None
<RequireAny>
Require ip 192.168.1.1
...
</RequireAny>
</Location>