HAProxy - Multiple sites, multiple acl's The 2019 Stack Overflow Developer Survey Results Are InNginx/haproxy/IIS - Configuration questions and concernsVarnish before HAProxy seems to reuse (wrong) backend connection503 with Varnish to HAproxymulti-backends haproxy best practicesHAProxy, Varnish and Multiple websites with SSLhaproxy 1.5 specific source IP address show <NOSRV> 503 SC in haproxy logHAproxy health checking multiple sites within a poolRun redundant haproxy with clientcertificate authentication behind physical loadbalancerhaproxy ACL - how to route traffic based on destination port or addressHAProxy reverse proxy - multiple sites
I looked up a future colleague on linkedin before I started a job. I told my colleague about it and he seemed surprised. Should I apologize?
"To split hairs" vs "To be pedantic"
A poker game description that does not feel gimmicky
Inversion Puzzle
Why could you hear an Amstrad CPC working?
Can't find the latex code for the ⍎ (down tack jot) symbol
How are circuits which use complex ICs normally simulated?
What is this 4-propeller plane?
Is bread bad for ducks?
What function has this graph?
Spanish for "widget"
Are there any other methods to apply to solving simultaneous equations?
The difference between dialogue marks
Does duplicating a spell with wish count as casting that spell?
What is the best strategy for white in this position?
In microwave frequencies, do you use a circulator when you need a (near) perfect diode?
How to create dashed lines/arrows in Illustrator
Lethal sonic weapons
Geography at the pixel level
If Wish Duplicates Simulacrum, Are Existing Duplicates Destroyed?
Manuscript was "unsubmitted" because the manuscript was deposited in Arxiv Preprints
What do hard-Brexiteers want with respect to the Irish border?
On the insanity of kings as an argument against Monarchy
Is this food a bread or a loaf?
HAProxy - Multiple sites, multiple acl's
The 2019 Stack Overflow Developer Survey Results Are InNginx/haproxy/IIS - Configuration questions and concernsVarnish before HAProxy seems to reuse (wrong) backend connection503 with Varnish to HAproxymulti-backends haproxy best practicesHAProxy, Varnish and Multiple websites with SSLhaproxy 1.5 specific source IP address show <NOSRV> 503 SC in haproxy logHAproxy health checking multiple sites within a poolRun redundant haproxy with clientcertificate authentication behind physical loadbalancerhaproxy ACL - how to route traffic based on destination port or addressHAProxy reverse proxy - multiple sites
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
We are busy with setting up HAProxy. Almost everything is working, except setting it up without multiple sites with different acl's.
What we want:
Using HAProxy with multiple sites, all on the same IP, all with the same backends but with different IP Blockings/Username-Password protection.
What we have working:
Get incoming traffic to backend (with an acl to use https instead of http).
The situation without haproxy/varnish:
Now, we are using apache to handle the acl (allow,deny ip's and use username-password protection).
We tried to capture this through X-Forwarded-For inside apache. However, the web servers themselves can no longer communicate with each other. We had to remove the allow role for the subnet (loadbalancer and webserver are in the same subnet). With this allow, apache don't look at the x-forward-header, and will allow all traffic. Without it, the webservers cannot communicate with each other.
Does anyone have an example or mindset for us to get there?
Now: internet->firewall->apache
What we want: internet->firewall->haproxy(ssl offloading)->varnish->apache (haproxy and varnish running on the same machine)
apache-2.4 haproxy access-control-list blocking
add a comment |
We are busy with setting up HAProxy. Almost everything is working, except setting it up without multiple sites with different acl's.
What we want:
Using HAProxy with multiple sites, all on the same IP, all with the same backends but with different IP Blockings/Username-Password protection.
What we have working:
Get incoming traffic to backend (with an acl to use https instead of http).
The situation without haproxy/varnish:
Now, we are using apache to handle the acl (allow,deny ip's and use username-password protection).
We tried to capture this through X-Forwarded-For inside apache. However, the web servers themselves can no longer communicate with each other. We had to remove the allow role for the subnet (loadbalancer and webserver are in the same subnet). With this allow, apache don't look at the x-forward-header, and will allow all traffic. Without it, the webservers cannot communicate with each other.
Does anyone have an example or mindset for us to get there?
Now: internet->firewall->apache
What we want: internet->firewall->haproxy(ssl offloading)->varnish->apache (haproxy and varnish running on the same machine)
apache-2.4 haproxy access-control-list blocking
add a comment |
We are busy with setting up HAProxy. Almost everything is working, except setting it up without multiple sites with different acl's.
What we want:
Using HAProxy with multiple sites, all on the same IP, all with the same backends but with different IP Blockings/Username-Password protection.
What we have working:
Get incoming traffic to backend (with an acl to use https instead of http).
The situation without haproxy/varnish:
Now, we are using apache to handle the acl (allow,deny ip's and use username-password protection).
We tried to capture this through X-Forwarded-For inside apache. However, the web servers themselves can no longer communicate with each other. We had to remove the allow role for the subnet (loadbalancer and webserver are in the same subnet). With this allow, apache don't look at the x-forward-header, and will allow all traffic. Without it, the webservers cannot communicate with each other.
Does anyone have an example or mindset for us to get there?
Now: internet->firewall->apache
What we want: internet->firewall->haproxy(ssl offloading)->varnish->apache (haproxy and varnish running on the same machine)
apache-2.4 haproxy access-control-list blocking
We are busy with setting up HAProxy. Almost everything is working, except setting it up without multiple sites with different acl's.
What we want:
Using HAProxy with multiple sites, all on the same IP, all with the same backends but with different IP Blockings/Username-Password protection.
What we have working:
Get incoming traffic to backend (with an acl to use https instead of http).
The situation without haproxy/varnish:
Now, we are using apache to handle the acl (allow,deny ip's and use username-password protection).
We tried to capture this through X-Forwarded-For inside apache. However, the web servers themselves can no longer communicate with each other. We had to remove the allow role for the subnet (loadbalancer and webserver are in the same subnet). With this allow, apache don't look at the x-forward-header, and will allow all traffic. Without it, the webservers cannot communicate with each other.
Does anyone have an example or mindset for us to get there?
Now: internet->firewall->apache
What we want: internet->firewall->haproxy(ssl offloading)->varnish->apache (haproxy and varnish running on the same machine)
apache-2.4 haproxy access-control-list blocking
apache-2.4 haproxy access-control-list blocking
edited Jul 27 '16 at 7:52
zagrimsan
309313
309313
asked Jul 27 '16 at 7:30
G. KooistraG. Kooistra
13
13
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
There are a few ways to set this up. The most simple way would probably be with the use of some acls.
Eg.:
Defining the different websites
acl site1 hdr_end(host) site1.com
acl site2 hdr_end(host) site2.net
acl site3 hdr_end(host) site3.org
(I used hrd_end on the host header, so that any subdomain as well as without subdomain would match. You of course need to determine if this is also a desired condition in your case.)
Defining the allowed sources for the sites
acl allowed_site1 src 1.2.3.4/32 1.2.4.5/32
acl allowed_site2 src 2.3.4.5/32 3.4.5.0/24
acl allowed_site3 src 4.5.0.0/16
Denying all that does not match
http-request deny if site1 !allowed_site1
http-request deny if site2 !allowed_site2
http-request deny if site3 !allowed_site3
(Basically this reads as: deny the request if the request is for the specified site, but is not on the list of allowed IP addresses)
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f792173%2fhaproxy-multiple-sites-multiple-acls%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
There are a few ways to set this up. The most simple way would probably be with the use of some acls.
Eg.:
Defining the different websites
acl site1 hdr_end(host) site1.com
acl site2 hdr_end(host) site2.net
acl site3 hdr_end(host) site3.org
(I used hrd_end on the host header, so that any subdomain as well as without subdomain would match. You of course need to determine if this is also a desired condition in your case.)
Defining the allowed sources for the sites
acl allowed_site1 src 1.2.3.4/32 1.2.4.5/32
acl allowed_site2 src 2.3.4.5/32 3.4.5.0/24
acl allowed_site3 src 4.5.0.0/16
Denying all that does not match
http-request deny if site1 !allowed_site1
http-request deny if site2 !allowed_site2
http-request deny if site3 !allowed_site3
(Basically this reads as: deny the request if the request is for the specified site, but is not on the list of allowed IP addresses)
add a comment |
There are a few ways to set this up. The most simple way would probably be with the use of some acls.
Eg.:
Defining the different websites
acl site1 hdr_end(host) site1.com
acl site2 hdr_end(host) site2.net
acl site3 hdr_end(host) site3.org
(I used hrd_end on the host header, so that any subdomain as well as without subdomain would match. You of course need to determine if this is also a desired condition in your case.)
Defining the allowed sources for the sites
acl allowed_site1 src 1.2.3.4/32 1.2.4.5/32
acl allowed_site2 src 2.3.4.5/32 3.4.5.0/24
acl allowed_site3 src 4.5.0.0/16
Denying all that does not match
http-request deny if site1 !allowed_site1
http-request deny if site2 !allowed_site2
http-request deny if site3 !allowed_site3
(Basically this reads as: deny the request if the request is for the specified site, but is not on the list of allowed IP addresses)
add a comment |
There are a few ways to set this up. The most simple way would probably be with the use of some acls.
Eg.:
Defining the different websites
acl site1 hdr_end(host) site1.com
acl site2 hdr_end(host) site2.net
acl site3 hdr_end(host) site3.org
(I used hrd_end on the host header, so that any subdomain as well as without subdomain would match. You of course need to determine if this is also a desired condition in your case.)
Defining the allowed sources for the sites
acl allowed_site1 src 1.2.3.4/32 1.2.4.5/32
acl allowed_site2 src 2.3.4.5/32 3.4.5.0/24
acl allowed_site3 src 4.5.0.0/16
Denying all that does not match
http-request deny if site1 !allowed_site1
http-request deny if site2 !allowed_site2
http-request deny if site3 !allowed_site3
(Basically this reads as: deny the request if the request is for the specified site, but is not on the list of allowed IP addresses)
There are a few ways to set this up. The most simple way would probably be with the use of some acls.
Eg.:
Defining the different websites
acl site1 hdr_end(host) site1.com
acl site2 hdr_end(host) site2.net
acl site3 hdr_end(host) site3.org
(I used hrd_end on the host header, so that any subdomain as well as without subdomain would match. You of course need to determine if this is also a desired condition in your case.)
Defining the allowed sources for the sites
acl allowed_site1 src 1.2.3.4/32 1.2.4.5/32
acl allowed_site2 src 2.3.4.5/32 3.4.5.0/24
acl allowed_site3 src 4.5.0.0/16
Denying all that does not match
http-request deny if site1 !allowed_site1
http-request deny if site2 !allowed_site2
http-request deny if site3 !allowed_site3
(Basically this reads as: deny the request if the request is for the specified site, but is not on the list of allowed IP addresses)
answered Aug 4 '16 at 6:37
Mick SwitserMick Switser
30613
30613
add a comment |
add a comment |
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f792173%2fhaproxy-multiple-sites-multiple-acls%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown