Hi, I am using following parameters in Nginx configuration file.
real_ip_header X-Real-IP; real_ip_recursive off; set_real_ip_from <Public IP of NGINX>; Thanks Jatinder [https://d3ilhdmygrlpl2.cloudfront.net/images/signature/ebs-logo.png]<http://www.escalon.services> Jatinder Kaur Technical Architect, Escalon Services www.escalon.services<http://www.escalon.services> [email protected] <mailto:[email protected]> ________________________________ From: JinChao Shuai <[email protected]> Sent: Wednesday, November 10, 2021 8:13 AM To: [email protected] <[email protected]> Subject: Re: IP Restriction Plugin Please refer to Yang Li answer, first observe the source IP address through APISIX access log. If the address is a proxy IP address, set real_ip at the proxy layer Nginx. Jatinder Kaur <[email protected]> 于2021年11月9日周二 下午10:52写道: > Thanks for answering. > > When I am trying IP:PORT its working fine but when I am using nginx > reverse proxy it is showing Apisix container IP in access logs and apisix > does not validate the IP and says "IP does not allowed". > > What you suggest I can do further. > > Zexuan Luo<https://app.slack.com/team/U01P169M64F> answer did not help > me. I am not able to understand that > > Thanks > > [https://d3ilhdmygrlpl2.cloudfront.net/images/signature/ebs-logo.png]< > http://www.escalon.services> > > > Jatinder Kaur > Technical Architect, Escalon Services > www.escalon.services<http://www.escalon.services><http://www.escalon.services<http://www.escalon.services>> > > [email protected] <mailto:[email protected]> > > > > > > ________________________________ > From: Zhiyuan Ju <[email protected]> > Sent: Tuesday, November 9, 2021 11:17 AM > To: [email protected] <[email protected]> > Subject: Re: IP Restriction Plugin > > Hi, > > > I posted the same on slack but didn't get the answer. Please help me on > it. > > I noticed Zexuan Luo has replied you here[1], please take a look :) > > [1] https://the-asf.slack.com/archives/CUC5MN17A/p1636165161039100 > > Best Regards! > @ Zhiyuan Ju <https://github.com/juzhiyuan> > > > Jatinder Kaur <[email protected]> 于2021年11月8日周一 > 下午10:08写道: > > > Hi Li Yang, > > > > Thanks for answering me. > > > > When I am trying IP:PORT its working fine but when I am using nginx > > reverse proxy it is showing Apisix container IP in access logs and apisix > > does not validate the IP and says "IP does not allowed". > > > > What you suggest I can do further. > > > > Thanks > > > > > > [https://d3ilhdmygrlpl2.cloudfront.net/images/signature/ebs-logo.png]< > > http://www.escalon.services> > > > > > > Jatinder Kaur > > Technical Architect, Escalon Services > > www.escalon.services<http://www.escalon.services><<http://www.escalon.services<http://www.escalon.services><> > http://www.escalon.services<http://www.escalon.services>> > > > > [email protected] <mailto:[email protected]> > > > > > > > > > > > > ________________________________ > > From: Li Yang <[email protected]> > > Sent: Friday, November 5, 2021 7:45 PM > > To: [email protected] > > <[email protected]> > > Cc: [email protected] <[email protected]> > > Subject: Re: IP Restriction Plugin > > > > [You don't often get email from [email protected]. Learn why this is > > important at http://aka.ms/LearnAboutSenderIdentification.] > > > > Hi Jatinder, > > > > You can check the access log and the remote address will show you what > > the IP address APISIX got from the request. > > > > If the IP is what you expect, try debugging this: > > 1. See whether there is one or more nodes between the APISIX and your > > request client. > > 2. Check real_ip_module, it's possible that APISIX thinks the direct > > previous hop's IP is the client's IP. > > > > On Fri, Nov 5, 2021 at 10:06 PM Jatinder Kaur > > <[email protected]> wrote: > > > > > > Hi Team, > > > > > > I am trying IP restriction Plugin I have whitelisted 2 Ips on one route > > but it says "IP does not allowed" > > > when I am hitting the endpoint from servers which is Ip is allowed on > > endpoint. How can I debug this issue ? How IP restriction plugin detect > the > > IPs from the request ? > > > > > > I am using PHP curl to request the apisix endpoint... > > > > > > I posted the same on slack but didn't get the answer. Please help me on > > it. > > > > > > Thanks > > > Jatinder > > > > > > [https://d3ilhdmygrlpl2.cloudfront.net/images/signature/ebs-logo.png]< > > http://www.escalon.services> > > > > > > > > > Jatinder Kaur > > > Technical Architect, Escalon Services > > > www.escalon.services<http://www.escalon.services><<<http://www.escalon.services<http://www.escalon.services><<> > http://www.escalon.services<http://www.escalon.services><> > > http://www.escalon.services<http://www.escalon.services>> > > > > > > [email protected] <mailto:[email protected]> > > > > > > > > > > > > > > > > > > -- Thanks, Janko
