1

I want to protect my admin page not only with a login and password, but also with IP filtering as described here: https://security.stackexchange.com/a/30649/68841

But I have two questions:

  1. Can I use a proxy instead of a VPN?
  2. I also need to use one more proxy on the server, for API requests to the specific site which blocked in my country. Can I use the same proxy to access the admin page on my server and for the API requests from this server to another site?

1 Answers1

1

Yes, you can use a proxy. Your two questions will answer with one application, you need to set up this. You can use NGINX.

NGINX is opensource software for web serving, reverse proxying, caching, load balancing, media streaming, and more.

Here's my answer to your questions:

  1. Yes you can use nginx proxy to protect your admin panel, Here's the link https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-http-basic-authentication/

  2. You use Nginx proxy again in the same server, what you need to do is setup a virtual host or server Blocks and proxy pass if you want to other api to your domain https://www.nginx.com/resources/wiki/start/topics/examples/server_blocks/

schroeder
  • 123,438
  • 55
  • 284
  • 319
Al Francis
  • 278
  • 1
  • 11
  • Many thanks for your detailed answer! But 1. I don't want to set up my own proxy server from scratch, I just want to buy proxy as a service. 2. I want to do something simpler, as in the link provided in my question: when I want to use admin page, I will enable proxy on my local computer and connect to the my admin page which allow only IP of my proxy server. Is it ok? And do I really need any other additional settings? – konstantin_doncov Nov 10 '19 at 20:25
  • 3. Can you explain why I need a virtual host? In the described case I need a proxy for API requests from my server to another, not mine, site. So, maybe I can just make API requests to this site via proxy without virtual host and proxy pass settings? – konstantin_doncov Nov 10 '19 at 20:25
  • Ok, you didn't mention that you want to use proxy as a service, in your number 2 question, It is ok to use the proxy server but you need to whitelist the IP of your proxy server so that the admin page can allow on the whitelisted IP. – Al Francis Nov 13 '19 at 02:16
  • No need to use a virtual host, you can use it to access your admin page as well as connecting to another API. – Al Francis Nov 13 '19 at 02:17