Hi Benoit,
this makes sense as the IP restriction is application based. For restrictions on role, the user needs to be logged in first.
With this module, you'll be able to get the users IP address. https://appstore.home.mendix.com/link/app/106768/
You can build custom functionality, to verify this for each user.