Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - gfontaniere

#1
Je te remets pas tout mais ce qui m'a servi pour me dépatouiller...



















#2
Désolé mais non. Je ne vois pas pourquoi ça ne marcherait pas. Pour info, en interne je redirige tout en http simple vers des ports différents sur le Syno comme indiqué sur le schéma.
#3
Effectivement, ca parait plus simple.
Au final  j'ai 4 certificats lets encrypt, 4 backends, 1 service public, 1 condition (qui précise le domaine.fr concerné) et 1 règle qui fait appel au fichier de mapping. Mais ça marche comme ça. Je ne touche plus à rien.
Merci pour la réponse.
#5
Thank U. It works !

I use a map file to redirect requests to the right internal servers.

I follow these websites to aim my goal :
https://ops.tips/gists/replacing-haproxy-acls-by-haproxy-maps/
https://www.haproxy.com/fr/blog/introduction-to-haproxy-maps/



Services: HAProxy: Settings --> Map Files



#6
My version of Opnsense : OPNsense 20.1.6-i386

Hi,

I have a problem with HAProxy. I'd like to do this :



My configuration works only with 1 redirection to 1 website. When i activate 3 redirections it only redirects to the 1 same website. The 2 others are ignored.

Here is my configuration of HAProxy :

Real Servers :
-------------
server1.example.com --> 192.168.1.1:5000
server2.example.com --> 192.168.1.1:801
server3.example.com --> 192.168.1.7:80

Backends Pool :
--------------
server1-backend --> HTTP (Layer7) --> Source IP Hash --> server1.example.com
server2-backend --> HTTP (Layer7) --> Source IP Hash --> server2.example.com
server3-backend --> HTTP (Layer7) --> Source IP Hash --> server3.example.com

Public Services :
----------------
server1-public --> Listen Addresses : 0.0.0.0:443 --> Default Backend Pool : server1-backend
                       --> SSL Offloadind ON --> Certificates : server1.example.com
                       --> Rules --> Select Rules : server1-rule

server2-public --> Listen Addresses : 0.0.0.0:443 --> Default Backend Pool : server2-backend
                       --> SSL Offloadind ON --> Certificates : server2.example.com
                       --> Rules --> Select Rules : server2-rule

server3-public --> Listen Addresses : 0.0.0.0:443 --> Default Backend Pool : server3-backend
                       --> SSL Offloadind ON --> Certificates : server3.example.com
                       --> Rules --> Select Rules : server3-rule

Conditions :
-----------
server1-condition --> Condition : Host matches
                            --> Parameters : server1.example.com

server2-condition --> Condition : Host matches
                            --> Parameters : server2.example.com

server3-condition --> Condition : Host matches
                            --> Parameters : server3.example.com

Rules :
------
server1-rule --> Optionnal condition
                    --> Test type : IF --> Select condition : server1-condition --> Logical operator : AND
                    --> HAProxy function --> Execute function : Use specified Backend Pool
                    --> Parameters --> Use backend pool : server1-backend


server2-rule --> Optionnal condition
                    --> Test type : IF --> Select condition : server2-condition --> Logical operator : AND
                    --> HAProxy function --> Execute function : Use specified Backend Pool
                    --> Parameters --> Use backend pool : server2-backend

server3-rule --> Optionnal condition
                    --> Test type : IF --> Select condition : server3-condition --> Logical operator : AND
                    --> HAProxy function --> Execute function : Use specified Backend Pool
                    --> Parameters --> Use backend pool : server3-backend

Could you help me ?

Thanks a lot.


#7
Ma version : OPNsense 20.1.6-i386

Bonsoir,

J'ai un problème avec HAProxy. Voici ce que je veux faire :



J'arrive à rediriger un site en https vers un site interne, mais jamais plus d'un à la fois. J'ai testé chacun de mes renvois un à un et ils fonctionnent. Je pense avoir un souci avec les règles conditionnelles mais je ne vois pas d'où ça vient.

Voici ma configuration HAProxy :

Real Servers :
-------------
server1.example.com --> 192.168.1.1:5000
server2.example.com --> 192.168.1.1:801
server3.example.com --> 192.168.1.7:80

Backends Pool :
--------------
server1-backend --> HTTP (Layer7) --> Source IP Hash --> server1.example.com
server2-backend --> HTTP (Layer7) --> Source IP Hash --> server2.example.com
server3-backend --> HTTP (Layer7) --> Source IP Hash --> server3.example.com

Public Services :
----------------
server1-public --> Listen Addresses : 0.0.0.0:443 --> Default Backend Pool : server1-backend
                       --> SSL Offloadind ON --> Certificates : server1.example.com
                       --> Rules --> Select Rules : server1-rule

server2-public --> Listen Addresses : 0.0.0.0:443 --> Default Backend Pool : server2-backend
                       --> SSL Offloadind ON --> Certificates : server2.example.com
                       --> Rules --> Select Rules : server2-rule

server3-public --> Listen Addresses : 0.0.0.0:443 --> Default Backend Pool : server3-backend
                       --> SSL Offloadind ON --> Certificates : server3.example.com
                       --> Rules --> Select Rules : server3-rule

Conditions :
-----------
server1-condition --> Condition : Host matches
                            --> Parameters : server1.example.com

server2-condition --> Condition : Host matches
                            --> Parameters : server2.example.com

server3-condition --> Condition : Host matches
                            --> Parameters : server3.example.com

Rules :
------
server1-rule --> Optionnal condition
                    --> Test type : IF --> Select condition : server1-condition --> Logical operator : AND
                    --> HAProxy function --> Execute function : Use specified Backend Pool
                    --> Parameters --> Use backend pool : server1-backend


server2-rule --> Optionnal condition
                    --> Test type : IF --> Select condition : server2-condition --> Logical operator : AND
                    --> HAProxy function --> Execute function : Use specified Backend Pool
                    --> Parameters --> Use backend pool : server2-backend

server3-rule --> Optionnal condition
                    --> Test type : IF --> Select condition : server3-condition --> Logical operator : AND
                    --> HAProxy function --> Execute function : Use specified Backend Pool
                    --> Parameters --> Use backend pool : server3-backend

Toute aide serait la bienvenue.

Merci beaucoup.