Question

nginx proxy hidind ip of vps backend

Hello, can someone help me with one configuration. I want to setup 2 vps. On will run my site and one will act like a proxy (not load balansing). That proxy need to hide entirely the IP of the backend. Also I want that backend to communicate ONLY with that proxy on specific port. And also need to make that no one can’t access that backend, even he/she know the IP of it. So the setup need to look like this: User -> Internet -> Proxy <–> Backend. And it is possible to make some kind of tunneling between proxy and backend or something like this?


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Yea I am aware with this method, but I was wondering if it is possible that someone to know with what server my proxy commucinate and prevent this… I thinking that tunneling Proxy and Backend (to communicate more secure)…Sorry if my explanation is poor… Simply want I need is ot make proxy hit backend on ssl or some kind secure tunnel not directly on HTTP, need the most secure way as possible

This should help you out with proxying with NGINX A more detailed look can be found here

As for only allowing the proxy server to access the backend, your standard operating system firewall (iptables, ufw) should be able to do that for you.