Score:0

How to redirect to on premise node not on vpn

ua flag

I have haproxy server running on linode port 80 that redirects traffic to on premise haproxy port 8082

 ---  linode node,
 |
VPN
 |
 --- onpremise haproxy node

and I have another node on premise that is not on the vpn for security reason.

I want to redirect traffic from linode:80 to on_premise via haproxy:8082

is it possible ?

I have been thinking to use (on linode)

redirect location http://10.8.0.3:8082/octopus 302 if { path_beg /octopus }

then on, on premise node (sees nodes on 10.8... as well as 192.168...) I have usual acl setup:

acl host_octopus_pix path_beg -i /octopus

use_backend octopus_pix if host_octopus_pix

backend octopus_pix
   server octopus 192.168.1.11:80

the octopus app is running on port 80 on 192.168.1.11

Score:0
ke flag

I guess haproxy can behave any way you configure it to. Your question is related more as of whether that would work for your users on your network.

You did not mention where your clients are coming from. The request received by haproxy is not forwarded to the on-premise haproxy. Instead, the linode haproxy returns a 302 to the client, and the client is supposed to connect to the on-premise haproxy directly.

Only you will know or can try whether that setup will work. In case it does not, you could still configure your haproxy to proxy-forward the request to the on-premise haproxy instead of sending a redirect.

Chang Zhao avatar
ua flag
the haproxy running on on premise web port 8082 hosts different app then /octopus, which is why I wanted to pass from linode to on premise:8082/octopus only then haproxy running on on premise within vpn can redirect user to the node running service on port 80 not on vpn.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.