0

For example: I have LAMP installed on a publicly accessible server with IP 160.x.x.x along with pptpd. When connected to pptpd to the same server, Google reports my IP as 160.x.x.x which verifies that I am connected to the VPN server and the remote gateway setting on my windows machine is turned on. I furthermore updated phpmyadmin.conf to only allow the same server IP ie 160.x.x.x. While connecting to phpmyadmin I still get a forbidden message.

Apache log shows that the connection to phpmyadmin is rejected as it is not in the allow list.

Why would it detect my internet connection IP rather than the server IP because I am already connected to VPN?

Louis
  • 1

1 Answers1

0

You're running a web server on the same machine as your "VPN" server. Thus when you connect to the virtual network, that server sees your IP address as the private internal IP address that it assigns to you, not as the global IPv4 address. That private address is the address you must whitelist.

Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
  • Thank you for taking the time to answer my question. The error log for phpmyadmin shows that my dynamic public IP for my internet connection is the one that is being blocked. If I add the same IP to phpmyadmin.conf I am able to get a login screen. If I add my VPN LAN IP to phpmyadmin.conf I get the forbidden message again. – Louis Feb 25 '18 at 09:29
  • My reasoning for a VPN server is to assign a static IP to my machine when connecting to certain sites which is access controlled by means of an allow list. This setup works great if the VPN server is located on a seperate host. What I'm ultimately trying to get at is: How can I manipulate the host 160.x.x.x where the httpd and pptpd is installed on the same server and still be able to lockdown phpmyadmin to a single IP in the allow list? – Louis Feb 25 '18 at 09:44