# Configuring haproxy to access a protected url

**URL:** <https://discourse.haproxy.org/t/configuring-haproxy-to-access-a-protected-url/8943>\
**Category:** Help!\
**Created:** [August 18, 2023, 3:56pm UTC](https://discourse.haproxy.org/t/configuring-haproxy-to-access-a-protected-url/8943 "2023-08-18T15:56:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![thewhiterabbit](https://avatars.discourse-cdn.com/v4/letter/t/b38774/32.png) [@thewhiterabbit](https://discourse.haproxy.org/u/thewhiterabbit)\
**Post date:** [August 18, 2023, 3:56pm UTC](https://discourse.haproxy.org/t/configuring-haproxy-to-access-a-protected-url/8943/1 "2023-08-18T15:56:32Z")

</div>

Hello,  
I need some help.  
I don’t know if Haproxy allows me to do what I want, but I’ll give you some context.

I have 30 game rooms that need to access a URL protected by ip whitelisting. For technical and cost reasons, I can’t use a VPN or have a fixed ip for these rooms.

I came up with the idea of having a proxy server in our central building that is whitelisted, so that our rooms can use this proxy to access the protected URL.

Is this possible?

---

<div class="post-metadata">

**Author:** ![Markus](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@Markus](https://discourse.haproxy.org/u/Markus)\
**Post date:** [August 21, 2023, 8:28am UTC](https://discourse.haproxy.org/t/configuring-haproxy-to-access-a-protected-url/8943/2 "2023-08-21T08:28:13Z")

</div>

HAProxy is no proxy server like Squid.  
You use haproxy to load balance backendservers or to use it as a “forward” in a DMZ/Firewall setup.  
the question is, where you will edit and maintain your whitelists. sure, you could use a proxy (like squid) and access your game rooms and whitlist the ip of the proxy server. BUT you have to be sure, that only “valid/allowed” clients can connect to this proxy server.  
i wonder where haproxy is in this setup? As said, haproxy is now proxy server. but sure you can add the ip address of a proxy server as whitelist in haproxy and let haproxy then forward the request to the backend. in this case

client → proxy-server → haproxy → backend/game rooms

markus

---

<div class="post-metadata">

**Author:** ![thewhiterabbit](https://avatars.discourse-cdn.com/v4/letter/t/b38774/32.png) [@thewhiterabbit](https://discourse.haproxy.org/u/thewhiterabbit)\
**Post date:** [September 11, 2023, 9:41am UTC](https://discourse.haproxy.org/t/configuring-haproxy-to-access-a-protected-url/8943/3 "2023-09-11T09:41:32Z")

</div>

Thanks for your answer but finally I’ve just set up a squid server and it work in 10 minutes ^^

---

<div class="post-metadata">

**Author:** ![lukastribus](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lukastribus](https://discourse.haproxy.org/u/lukastribus)\
**Post date:** [September 11, 2023, 11:51am UTC](https://discourse.haproxy.org/t/configuring-haproxy-to-access-a-protected-url/8943/4 "2023-09-11T11:51:33Z")

</div>

Indeed, use the right tool for the job, which haproxy is not.

---

<div class="post-metadata">

**Author:** ![thewhiterabbit](https://avatars.discourse-cdn.com/v4/letter/t/b38774/32.png) [@thewhiterabbit](https://discourse.haproxy.org/u/thewhiterabbit)\
**Post date:** [September 11, 2023, 1:21pm UTC](https://discourse.haproxy.org/t/configuring-haproxy-to-access-a-protected-url/8943/5 "2023-09-11T13:21:47Z")

</div>

Easy to say when we answer after the war ;-).
