VPN access to ip-secured .htaccess file

This forum is for admins who are looking to build or expand their OpenVPN setup.
Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See https://forums.openvpn.net/viewtopic.php?f=30&t=21589 for an example.
Jera
OpenVpn Newbie
Posts: 1
Joined: Sun Mar 19, 2017 9:40 am

VPN access to ip-secured .htaccess file

Postby Jera » Sun Mar 19, 2017 9:41 am

I am trying to get external access to update my self-hosted websites through my self-hosted vpn. The sites are locked to accept certain ip ranges, which is fine for updating when I'm on my home network. However, I wanted to be able to VPN into the network to update them.

For some reason, whenever I use my VPN the server sees my ip as my original public one rather than either an internal address assigned by the VPN or as the web-facing address of the server.

Ideally I want to be able to whitelist the VPN assigned internal addresses, but the server (in this case Apache) only sees the original ip of the connecting machine, which is a bit useless as it's dynamic.

Clients show the correct ip when accessing the web and all client traffic is set to direct through the VPN.

Any advice greatly appreciated!

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 2420
Joined: Fri Jun 03, 2016 1:17 pm

Re: VPN access to ip-secured .htaccess file

Postby TinCanTech » Sun Mar 19, 2017 11:54 am

Jera wrote:Clients show the correct ip when accessing the web and all client traffic is set to direct through the VPN
Jera wrote:For some reason, whenever I use my VPN the server sees my ip as my original public one rather than either an internal address assigned by the VPN or as the web-facing address of the server.
That is how --redirect-gateway works .. it is explained in the manual.

Try using the VPN address of the server.


Return to “Server Administration”

Who is online

Users browsing this forum: No registered users and 3 guests