Hi,
We've setup an Apache website and using .htaccess to allow access only to a specific set of internal ip addresses. This works well as long as my computer is connected to the internal network, but as soon as I try it at home and connect to the Openvpn server, I can no longer access it.
I've added the ip address that is my laptop receives from the Openvpn server to the htaccess file, but still no access. I also tried adding the internal and public ip address of the Openvpn server to htaccess but still no luck.
How can I make this work ?
Thanks for your help.
Best regards
Joeri
htaccess
- novaflash
- OpenVPN Inc.
- Posts: 1073
- Joined: Fri Apr 13, 2012 8:43 pm
Re: htaccess
Figure out which IP address your Apache2 server is seeing when you make a connection and then add that? See the Apache2 log files for that information.
I'm still alive, just posting under the openvpn_inc alias now as part of a larger group.
-
- OpenVpn Newbie
- Posts: 11
- Joined: Tue Jul 11, 2023 1:29 pm
Re: htaccess
If you're trying to access the Apache website with limited access from external IP addresses through an OpenVPN connection, you may need to adjust your configuration to allow traffic from the OpenVPN network.
Add add the following lineon your .htaccess.
Also check your Apache configuration and add the lne...
Then Restart Apache hope it work to you.
Add add the following lineon your .htaccess.
Code: Select all
Allow from <OpenVPN_client_IP_address>
Code: Select all
<Directory "/path/to/your protected_directory">
AllowOverride All
</Directory>