apisix
apisix copied to clipboard
feat: ip-restriction shoud strict the real_ip
Description
The ip-restriction Plugin now restricting access with remote_addr, not suitable for where there's a proxy standing between the client and apisix. Using http_x_real_ip is considerable.
You can use ip-restriction with real-ip, e.g. https://docs.api7.ai/hub/ip-restriction#restrict-access-using-modified-ip
I enabled the apisix ip-restriction plugin and I whitelisted my ip address but still cant access my end point when I disable I can access the end point please any idea on how to get this solved @kayx23 can you help please
@Eunice2000 please share reproducible steps.
@kayx23
for ip-restriction the expected behavior is when i whitelist my device ip, i should be able to have access. However at the moment, when i whitelist a devices network ip, they still dont have access? Any guidance?
This is an sample image of how i am getting my IP
And this is a sample on how i am whitelisting
@NellyNakhero the given ip address on the screenshot might not be the same as seen by APISIX.
please remove the ip-restriction plugin and then log your ip address using logger plugins. Then use that ip address under ip-restriction. This should work for you.
Any more issue here to address?
@shreemaan-abhishek you mean i should add the ip address i want to whitelist under this ?