# How to set IP Address by range to Whitelist

**URL:** <https://community.auth0.com/t/how-to-set-ip-address-by-range-to-whitelist/51973>\
**Category:** Get Help\
**Created:** [October 22, 2020, 5:23am UTC](https://community.auth0.com/t/how-to-set-ip-address-by-range-to-whitelist/51973 "2020-10-22T05:23:13Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![hiroyuki.nakajima](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/hiroyuki.nakajima/32/14833_2.png) [@hiroyuki.nakajima](https://community.auth0.com/u/hiroyuki.nakajima)\
**Post date:** [October 22, 2020, 5:23am UTC](https://community.auth0.com/t/how-to-set-ip-address-by-range-to-whitelist/51973/1 "2020-10-22T05:23:13Z")

</div>

Hi, there!

I’d like to know how to set IP Address by range to Whitelist.  
I tried to use IP Address Whitelist but I was not enable to IP Address whitelist by range.  
e.g. x.x.x.x/24

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [October 22, 2020, 7:35pm UTC](https://community.auth0.com/t/how-to-set-ip-address-by-range-to-whitelist/51973/3 "2020-10-22T19:35:23Z")

</div>

Hi @hiroyuki.nakajima,

Welcome to the Community!

Are you talking about in the Anomaly Detection feature or in a rule?

---

<div class="post-metadata">

**Author:** ![hiroyuki.nakajima](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/hiroyuki.nakajima/32/14833_2.png) [@hiroyuki.nakajima](https://community.auth0.com/u/hiroyuki.nakajima)\
**Post date:** [October 23, 2020, 12:57am UTC](https://community.auth0.com/t/how-to-set-ip-address-by-range-to-whitelist/51973/4 "2020-10-23T00:57:00Z")

</div>

Hi @dan.woda,

Thank you for your replay.

I’d like to deny access from specific source IP Address.  
I’ll use IP Address Whitelist on Rules. [Auth0](https://auth0.com/rules/ip-address-whitelist)  
I couldn’t register the IP Address by the range. e.g. x.x.x.x/24  
Could you tell me how to config whitelist to IP Address by the range?

Best Regards,  
Hiroyuki Nakajima

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [October 23, 2020, 3:15pm UTC](https://community.auth0.com/t/how-to-set-ip-address-by-range-to-whitelist/51973/5 "2020-10-23T15:15:02Z")

</div>

@hiroyuki.nakajima,

If you want to blacklist a specific IP, you can do that by throwing an unauthorized error when a user from that IP tries to log in.

Otherwise you can set your rule to look at a range of values. Checkout this SO topic on how to set that up:

> <https://stackoverflow.com/questions/46200086/how-to-check-if-a-given-ip-falls-between-a-given-ip-range-using-node-js>

---

<div class="post-metadata">

**Author:** ![hiroyuki.nakajima](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/hiroyuki.nakajima/32/14833_2.png) [@hiroyuki.nakajima](https://community.auth0.com/u/hiroyuki.nakajima)\
**Post date:** [October 26, 2020, 12:44am UTC](https://community.auth0.com/t/how-to-set-ip-address-by-range-to-whitelist/51973/6 "2020-10-26T00:44:44Z")

</div>

Hi @dan.woda,

Thank you for your answer!  
I’d like to use whitelist.  
So I’ll checkout SO topic and try it!

Best Regards,  
Hiroyuki Nakajima

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [October 26, 2020, 4:34pm UTC](https://community.auth0.com/t/how-to-set-ip-address-by-range-to-whitelist/51973/7 "2020-10-26T16:34:19Z")

</div>

Great! Let us know if you have any other questions!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [November 10, 2020, 4:34pm UTC](https://community.auth0.com/t/how-to-set-ip-address-by-range-to-whitelist/51973/8 "2020-11-10T16:34:20Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
