I'm trying to setup Network Policy for kubernetes, and more general question, that I have can be found here.
For the purpose of this particular question, this is the line I'm getting in nginx logs:
10.244.0.0 - - [18/Mar/2020:19:47:16 +0000] "GET / HTTP/1.1" 200 612 "-" "curl/7.69.1-DEV" "192.168.80.88"
$remote_addr that nginx sees, it's
10.244.0.0. But this is not a real IP address!
I read this question and it appears, that sometimes addresses like that can be valid, but this is not standard.
For the purpose of this question, the CNI plugin that manages
10.244.0.0/16 is Calico.
For what it worth, if I try to white-list in the NetworkPolicy object
10.244.0.0/32, the requests such as above stop coming through, which once again confirms to me that this is not the real IP. But if I white-list
10.244.0.0/16 they come through no problem.
What makes nginx think, that the request is coming from this x.y.0.0 address? How do I emulate it, say with curl?