0

I have two servers, lets call A (main) and B (other). B needs a VPN in order to acess and A doesn't need a vpn and is in the same IP range. I want to use A server in order to access B server without using a VPN, I tried using Redirects and ProxyPass, but didn't work as well since the user still require a VPN in order to access to B server.

How can you access to B server through A server without using a VPN? The main is using apache2 and the other is a GitLab server using NGINX.

It would be something like this:

Client --------> Server A --------> Server B

Right now is this:

Client -------> Server A

Client -------> vpn -------> Server B

Using Mod_Proxy

The first approach I used was mod_proxy configuration in apache2.conf file.

Adding the lines

ProxyPass "/gitlab" "xxx.xxx.x.xxx" 
ProxyPassReverse "/gitlab" "xxx.xxx.x.xxx" 

Meaning xxx.xxx.x.xxx is the IP of the Server B, the result was the same as an redirect, the client uses Server A without VPN to go throuh /gitlab and goes to Server B, but still need a VPN in order to access Server B.

3
  • Use HAProxy or even mod_proxy. If you've tried them, then show the config/error that you've tried.
    – tater
    Oct 6, 2020 at 7:52
  • Hello, thank you for answering, I don't get any errors by doing mod_proxy and I edited in order to show the configuration and explain what happened, I will test HAProxy and edit the question soon. Oct 6, 2020 at 8:02
  • You need to configure the backend server correctly to work behind a reverse proxy. See serverfault.com/questions/1035016/… Oct 6, 2020 at 8:04

0

You must log in to answer this question.

Browse other questions tagged .