I’ve recently set up PritunlVPN and a staging web application on the same server. To enhance security, I want to restrict access to the web application based on IP addresses.
Previously, the web application was safeguarded using Nginx’s basic authentication. Now, I aim to limit access using IP restrictions. I’ve configured Nginx to allow access only from the VPN server’s IP address, but the web application still detects my original IP rather than the VPN server’s IP.
Essentially, I’d like to ensure that I can access the web application only through the VPN, given that both the VPN and the web application are on the same server.
Could you guide me on how to configure this properly?
Thank you in advance for your assistance.