Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    HAPROXY + ACME не работает правило haproxy

    Scheduled Pinned Locked Moved Russian
    7 Posts 2 Posters 902 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      atel
      last edited by

      Добрый день. Пытаюсь сделать генерацию сертификатов на pfsense. Сейчас настроен webroot ftp, работает, но не удобно... Решил переделать схему на standalone. Создал в haproxy frontend: Path starts with /.well-known/acme-challenge/ backend: 127.0.0.1:8888, а acme настроил standalone на 8888. И в итоге при обращении на site.com/.well-known/acme-challenge/ попадаю не на ответ от haproxy, а от сайт с 404 ошибкой. Решил попробовать на чистом haproxy и acme, там все работает. Подскажите где может быть ошибка или как вставить custom acl?

      Конфиг чистого haproxy+acme:

      acl                     acl2    path_beg /.well-known/acme-challenge/
      use_backend     ACME if acl2
      
      
      backend ACME
              mode http
              server                  certbot 127.0.0.1:8888
      

      конфиг с pfsense:

      frontend HTTP-merged
      	bind			ip:80 name ip:80   
      	mode			http
      	log			global
      	option			http-keep-alive
      	option			forwardfor
      	acl https ssl_fc
      	http-request set-header		X-Forwarded-Proto http if !https
      	http-request set-header		X-Forwarded-Proto https if https
      	timeout client		30000
      	
      	acl			acl-acme	var(txn.txnpath) -m beg -i /.well-known/acme-challenge/
      	
      	http-request set-var(txn.txnhost) hdr(host)
      	http-request set-var(txn.txnpath) path
      	use_backend ACME_backend_ipvANY  if  acl-acme 
      	
      	backend ACME_backend_ipvANY
      	mode			http
      	id			117
      	log			global
      	timeout connect		30000
      	timeout server		30000
      	retries			3
      	server			acme 127.0.0.1:8888 id 126
      
      werterW 1 Reply Last reply Reply Quote 0
      • werterW
        werter @atel
        last edited by

        Добрый
        @atel

        Версии пф и пакетов САМЫЕ свежие?

        A 1 Reply Last reply Reply Quote 0
        • A
          atel @werter
          last edited by

          @werter Да, все обновлено до последних версий. Вообще кто-то смог реализовать такой механизм? Находил темы, где люди переводили весь трафик в https, а этот запрос направляли на локальный backend. Но мне немного не подходит.

          werterW 1 Reply Last reply Reply Quote 0
          • werterW
            werter @atel
            last edited by

            @atel

            Где-то в сети попадался вариант с генерацией сертификатов на пф и автозаливкой на сервисы ЗА пф. Если это то, что надо Вам, конечно.

            A 1 Reply Last reply Reply Quote 0
            • A
              atel @werter
              last edited by

              @werter Да примерно так и надо. Не помните где видели?

              werterW 2 Replies Last reply Reply Quote 0
              • werterW
                werter @atel
                last edited by werter

                Добрый
                @atel

                Ссылку не дам (не помню), но точно есть в этом архиве Нет там именно по Вашему вопросу, но вдруг что-то пригодится https://cloud.mail.ru/public/wUdg/zUsdjQFNG

                Зы. acme-dns - a simplified DNS server with a RESTful HTTP API to provide a simple way to automate ACME DNS challenges https://github.com/joohoi/acme-dns

                step-ca - run your own private CA certificate authority & ACME server https://smallstep.com/blog/private-acme-server

                haproxy-wi - web interface gui for managing Haproxy, Nginx and Keepalived servers
                https://github.com/Aidaho12/haproxy-wi
                https://forum.level1techs.com/t/haproxy-wi-run-lots-of-public-services-on-your-home-server/159335
                https://www.youtube.com/watch?v=Kh21q7LY-F8

                1 Reply Last reply Reply Quote 0
                • werterW
                  werter @atel
                  last edited by werter

                  @atel

                  Нашел )

                  https://medium.com/@victorlclopes/copy-pfsense-acme-certificate-to-another-server-e42c611c47ec

                  И тут какой-то фикс (?) со слов 'Fixing my Certificate setup'
                  https://blog.barclayhowe.com/switching-my-unifi-controller-to-ubuntu-and-hdmi-problems/

                  Зы. Сохранил и залил в облако https://cloud.mail.ru/public/W3R4/fC8hQQLSX

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.