# Securing Token Endpoint by Client IPs

**URL:** <https://forum.keycloak.org/t/securing-token-endpoint-by-client-ips/16214>\
**Category:** Securing applications\
**Tags:** authentication, oidc\
**Created:** [June 29, 2022, 7:23am UTC](https://forum.keycloak.org/t/securing-token-endpoint-by-client-ips/16214 "2022-06-29T07:23:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![DixonLCK](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/dixonlck/32/6090_2.png) [@DixonLCK](https://forum.keycloak.org/u/DixonLCK)\
**Post date:** [June 29, 2022, 7:23am UTC](https://forum.keycloak.org/t/securing-token-endpoint-by-client-ips/16214/1 "2022-06-29T07:23:55Z")

</div>

Hi Experts,

On KC token endpoint (/auth/realms/xxx/protocol/openid-connect/token), how do I apply IP whitelist for the client that are allow to access it?

Dixon

---

<div class="post-metadata">

**Author:** ![weltonrodrigo](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/weltonrodrigo/32/3104_2.png) [@weltonrodrigo](https://forum.keycloak.org/u/weltonrodrigo)\
**Post date:** [June 30, 2022, 5:28pm UTC](https://forum.keycloak.org/t/securing-token-endpoint-by-client-ips/16214/2 "2022-06-30T17:28:19Z")

</div>

Hi, this is not possible out of the box with Keycloak, but take a look at [Limit login of a specific users from whitelist IP address](http://forum.keycloak.org/t/limit-login-of-a-specific-users-from-whitelist-ip-address/11089) for a look into how you could write a SPI to do that.
