Revolyssup commented on issue #2117:
URL: 
https://github.com/apache/apisix-ingress-controller/issues/2117#issuecomment-1874909956

   @Gitttttttt 
   1. 
   
   > > > the ip of k8s cluster master node is end with 100.70... So I request 
by 'xx.xx.100.70:32722'
   > > 
   > > 
   > > `remote addrs` is used to restrict which client IP can access the route. 
But you mentioned it was the k8s master node address. Is that also the IP your 
request originates from?
   > 
   > yes, but It responds different result in different situation: ①.Without 
the remoteAddrs field: It responds correctly by requesting from xx.xx.100.70, 
but responds 404 error by requesting from browser. ②.With the remoteAddrs 
field: It responds 404 error wherever I request from.
   
   1. Without remote_addr field, it should be matched from everywhere. The curl 
request succeeds means everything is fine. Can you use something like wireshark 
to look at the http request when you send it via postman or whichever client 
when it doesn't match and gives you 404?
   
   2. With remote_addr field:
     a. 0.0.0.0 won't work. If you want to match all. Use the CIDR 0.0.0.0/0 
which matches all IP addresses
     b. When you send a request from Machine Port A to the same machine's Port 
B, the client IP address as seen by NGINX will 
     be the loopback address, which is usually 127.0.0.1 for IPv4 or ::1 for 
IPv6. This is because the communication is happening 
     within the same machine. So the remote_addr as host IP is not working as 
well.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to