I am using Nginx reverse proxy with Kubernetes services. Config is following:

    events {
    http {
          upstream my-service-3000 {
              server my-service:3000;
        server {
              listen 443 ssl;
              server_name myserver.net;
              ssl_certificate     /key.pem;
              ssl_certificate_key /key.pem;
              location / {
                    allow myIP;
                    deny all;
                    proxy_pass http://my-service-3000;
        server {

It works fine (doing reverse proxy, terminating ssl, changing port, finding Kubernetes service), till the moment I try whitelist only my IP. When I try to access service via https - I got 403 from Nginx. I've tried to move around allow/deny commands, but it do not help. Any suggestions where could be the problem?
Also I am behind proxy by my self - so I am using my external organisation IP.

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.