• PfSense ACME 0.1.23 Package Google Cloud DNS Question

    Moved
    17
    1 Votes
    17 Posts
    3k Views
    U

    @rbron01 I opened a PR with acme.sh which collected dust for 2 years… having grown tired of seeing it in my GitHub dashboard, I deleted my fork and closed the PR a few weeks ago. A bit silly, all it took was a button to get it merged.

    Here’s the PR: https://github.com/acmesh-official/acme.sh/pull/3532.

  • ACME - Google Domains Support

    Moved
    5
    1 Votes
    5 Posts
    2k Views
    H

    @wbrown766 - I saw your post and was having the same issue last night. I created a couple of PRs that hopefully head in the right direction for both Google ACME support and GoogleDomain support.

    https://github.com/pfsense/FreeBSD-ports/pull/1246 (tested as working) https://github.com/pfsense/FreeBSD-ports/pull/1247 (waiting on upstream)
  • ACME sftp webroot validation fails / path issue?

    16
    0 Votes
    16 Posts
    1k Views
    P

    @gertjan Thanks for the provider info, and also for all of your replies, which were extremely helpful to me! Kind regards.

  • Problem using webroot local folder - hash file not created

    6
    0 Votes
    6 Posts
    1k Views
    S

    FYI just today that script gave me hassles until it... just started to work.

    Same script by Jan Broer as always, same config as always.

    pfsense: 2.6.0-RELEASE (amd64) acme: 0.7.3 haproxy: 0.61_7 Frontend configuration: ACL configuration ACL Name: url_acme_http01 Expression: "Path starts with:" Value: /.well-known/acme-challenge/ Actions Action: http-request lua service Condition acl names: METH_GET url_acme_http01 lua-function: acme-http01

    Lua script in case I lose it again:

    -- ACME http-01 domain validation plugin for Haproxy 1.6+ -- copyright (C) 2015 Jan Broer -- -- usage: -- -- 1) copy acme-webroot.lua in your haproxy config dir -- -- 2) Invoke the plugin by adding in the 'global' section of haproxy.cfg: -- -- lua-load /etc/haproxy/acme-webroot.lua -- -- 3) insert these two lines in every http frontend that is -- serving domains for which you want to create certificates: -- -- acl url_acme_http01 path_beg /.well-known/acme-challenge/ -- http-request use-service lua.acme-http01 if METH_GET url_acme_http01 -- -- 4) reload haproxy -- -- 5) create a certificate: -- -- ./letsencrypt-auto certonly --text --webroot --webroot-path /var/tmp -d blah.example.com --renew-by-default --agree-tos --email my@email.com -- acme = {} acme.version = "0.1.1" -- -- Configuration -- -- When HAProxy is *not* configured with the 'chroot' option you must set an absolute path here and pass -- that as 'webroot-path' to the letsencrypt client acme.conf = { ["non_chroot_webroot"] = "" } -- -- Startup -- acme.startup = function() core.Info("[acme] http-01 plugin v" .. acme.version); end -- -- ACME http-01 validation endpoint -- acme.http01 = function(applet) local response = "" local reqPath = applet.path local src = applet.sf:src() local token = reqPath:match( ".+/(.*)$" ) if token then token = sanitizeToken(token) end if (token == nil or token == '') then response = "bad request\n" applet:set_status(400) core.Warning("[acme] malformed request (client-ip: " .. tostring(src) .. ")") else auth = getKeyAuth(token) if (auth:len() >= 1) then response = auth .. "\n" applet:set_status(200) core.Info("[acme] served http-01 token: " .. token .. " (client-ip: " .. tostring(src) .. ")") else response = "resource not found\n" applet:set_status(404) core.Warning("[acme] http-01 token not found: " .. token .. " (client-ip: " .. tostring(src) .. ")") end end applet:add_header("Server", "haproxy/acme-http01-authenticator") applet:add_header("Content-Length", string.len(response)) applet:add_header("Content-Type", "text/plain") applet:start_response() applet:send(response) end -- -- strip chars that are not in the URL-safe Base64 alphabet -- see https://github.com/letsencrypt/acme-spec/blob/master/draft-barnes-acme.md -- function sanitizeToken(token) _strip="[^%a%d%+%-%_=]" token = token:gsub(_strip,'') return token end -- -- get key auth from token file -- function getKeyAuth(token) local keyAuth = "" local path = acme.conf.non_chroot_webroot .. "/.well-known/acme-challenge/" .. token local f = io.open(path, "rb") if f ~= nil then keyAuth = f:read("*all") f:close() end return keyAuth end core.register_init(acme.startup) core.register_service("acme-http01", "http", acme.http01)
  • SEC_ERROR_EXPIRED_ISSUER_CERTIFICATE after successful cert renewal

    7
    0 Votes
    7 Posts
    801 Views
    GertjanG

    @svengalh said in SEC_ERROR_EXPIRED_ISSUER_CERTIFICATE after successful cert renewal:

    Changing to the recently renewed certificate

    You only set this ones, the day you start using the certificate :

    307b0fc6-f09c-46ee-b08d-ab03ec260831-image.png

    from then on, the acme pfsense package will renew this cert. There is nothing more to do.

    If you change the certificate's name/ID, then, yeah, you have to change to that new cert.
    But why would you you do that ?

  • Issue/Renew does not show "Reload success" screen in 23.01

    3
    0 Votes
    3 Posts
    602 Views
    chudakC

    @gertjan said in Issue/Renew does not show "Reload success" screen in 23.01:

    @chudak

    I've just hit "Renew", and saw the usual :

    Thx for the reply.
    It's good to know, must be my browser cache then.

  • Using the same certificate for GUI and Portal?

    2
    0 Votes
    2 Posts
    283 Views
    V

    @pierrelyon
    Yes, you can do that.
    It only need to be a server certificate for both operation purposes.

  • ACME Verify error: 404

    2
    0 Votes
    2 Posts
    959 Views
    GertjanG

    @decidable3195 said in ACME Verify error: 404:

    Please check log file for more details: /tmp/acme/Webserver/acme_issuecert.log

    The last line shows you where more info can be found :
    /tmp/acme/Webserver/acme_issuecert.log
    although, even if you don't spot the error, at least you will know now how deep the pool is ;)

    Important info is also :

    http://www.xxx.com/.well-known/acme-challenge/wCSyAsP9hDHGn7CPmLyEXZd7uuAUlnBgpBrcKZux39M: 404

    This means that if Letsencrypt, or me, or you, or who ever, visits this file :
    http://www.xxx.com/.well-known/acme-challenge/wCSyAsP9hDHGn7CPmLyEXZd7uuAUlnBgpBrcKZux39M
    you ( and I, and everybody, and also LE) should see the secret temporary 'key' (some random asci codes, you can see it in the acme log) that acme.sh put there.

    So, http://www.xxx.com/.well-known/acme-challenge/ must be publicly accessible.

    So, the question is : is the file there ?
    And if so, is the content ok ? Often, if the file was created, the content is also fine.

    You already run your own web server on a server, so you know where the web server root folder is.
    In that root folder, there must be a sub folder with the name ".well-known/" that contains a subsequent folder called "acme-challenge/".
    Is that so ?
    Now, create a file called 'hello' and put something in it like "hello again".

    Now : test, like me and LE : from the outside ( !! ), use your phone with the wifi de activated , and visit http://www.xxx.com/.well-known/acme-challenge/hello
    Does it show "hello again" ?
    It should.
    If you can't, LE can't do it neither => fail !
    Remember : LE told the acme.sh script the file name : in your case, it was "wCSyAsP9hDHGn7CPmLyEXZd7uuAUlnBgpBrcKZux39M" and it also gave a content like "hjgjhghjgqgqjhdqsgqsgd".
    That was the "Getting domain auth token for each domain" part.

    Then, all acme.sh has to do, using a helper DNS-script like 'webroot' is accessing your web root, create the sub folders and the file with the content.
    This must work.
    This is the :
    Getting webroot for domain='www.xxx.com'
    Getting webroot for domain='service.xxx.com'
    part.

    Btw : if all works well, and the LE check passes, the acme.sh helper script will also remove the wCSyAsP9hDHGn7CPmLyEXZd7uuAUlnBgpBrcKZux39M file.

    You use the standalone mode. That's a no-automation-mode.

    Read the manual : https://github.com/acmesh-official/acme.sh/wiki/How-to-issue-a-cert

    That's strange because you have (you should) access to your web server's root folder.
    There is the webrootftp helper mode. You have FTP access, right ?? (ok, 'FTP' was abandoned and shot in the forest last century, but you can still use it locally)

    Or far better, as you have a domain name (that you rent annually) : most (the ones that don't are all broke by now) registrars have an API access : use the API access credentials, pick the right helper access, and use one of the DNS helper modes

    General comments :
    Opening port 80 and or 443 (the webgui) on WAN ?
    Your pool is 1 mm deep, and you dive head first in it. We all know what will happen.

    You are using floating rules.
    Take this advise : don't do that. Live is already hard enough without that "floating" thing.

  • [Bug] handling DNS challenge alias mode with multiple domains

    5
    0 Votes
    5 Posts
    900 Views
    JeGrJ

    @jimp Would it be possible to just create another "method" in the UI that simply disables attaching any sort of additional --dns XY parameters, so only the first one (that has to be defined of course) is taken into account? That would already help so much with multi domain SAN / multi wildcard domains that are used in combination with HAproxy and other services!

    I just had to manually comb through various customer installations again today because of API/timeout problems caused by needless tries to authenticate additional SAN domains with their own tokens that wouldn't be needed (as all could be tested by using the same).

    Cheers

  • Help with SSL Certificates

    9
    0 Votes
    9 Posts
    2k Views
    johnpozJ

    @kenw if your goal is to prevent access to the gui - you would do that in a firewall rule, only allow the IP or vlan you want to be able to access the pfsense web gui.

    This is quite often locked down from the default antilock out rule on the lan, by create a management vlan.. And only this vlan has access to the gui via firewall rule. You only put machines on this management vlan that you want to be able to access pfsense web gui.

  • 0.7.3_1 nsupdate method : issue with the $NSUPDATE_KEY

    1
    1 Votes
    1 Posts
    206 Views
    No one has replied
  • Please explain ACME cert update method

    1
    0 Votes
    1 Posts
    200 Views
    No one has replied
  • cannot generate a certificate

    3
    0 Votes
    3 Posts
    610 Views
    N

    @johnpoz thank you for your quick reply, the issue was on myside, was using the wrong TOKEN code :)

  • ACME mutliple SAN with Standalone HTTP server

    1
    0 Votes
    1 Posts
    309 Views
    No one has replied
  • Trying to get a new certificate and I get a time out

    7
    0 Votes
    7 Posts
    723 Views
    S

    So I removed the AccountID, ZoneID and the Token from the Cloudflare panel under certificates. After that issuing new certificates started to work just as expected.

  • Add SSL DH Parameters

    5
    0 Votes
    5 Posts
    857 Views
    G

    @gertjan said in Add SSL DH Parameters:

    You can use this script to 'coook' something for yourself.

    There is a commented line that shows where I 'cat' the RSA4096 DH file to the cert.pem file.
    you can find the latest cert version in a known place.

    Btw : some more investigation will be needed, as : where does the HA proxy startup code gets the cert info from when preparing for a HA Proxy start ?

    In the past, the trick of modifying the main 'cert.pem' was used by many processes, but these days, as my apache2 example, it has become a separate setting in a config file.

    I hope "Domoticz" will also adopt that method.
    See the wiki page again : Domoticz has its own deploy script : you can also use that one as an example.

    Thanx for the example man, very interesting!
    Sadly my linux skills are like "trial and error" ;-)
    Especially (secured) SSL is quite difficult to understand

    Domoticz has a build-in HTTP (9090) and HTTPS (443) server and also the possibilty to pass the login inside the local network with an option in the settings: 192.168.1.*.
    This allows all computers inside the local network, starting with this ip address, to pass the login of domoticz.
    The problem with this login pass option is that also the outside world doesn't have to login because of the HTTP connection in the backend of HAproxy. Therfore I currently did not set this option to protect the webapplication.

    On the other hand the advantage of the current configuration allows me to turn off the HTTPS 443 ssl connection in the startup file of domoticz (I just figured out). This way I don't get certificate and https errors in domoticz anymore because everything is handled by the HAproxy server and ACME

    I have to think about it, thanx anyway for the info!

  • pfSense, Cloudflare and ACME - upstream time out error

    3
    1 Votes
    3 Posts
    689 Views
    S

    @gertjan It is more than a GUI error, when I check the certificate using the Certificate Manager, the one I am trying to get an vertificate for only has the private key. No Certificate data.

  • Error setting up ACME (0.7.3) and Cloudflare certificate

    Moved
    5
    0 Votes
    5 Posts
    586 Views
    S

    @johnpoz Ahhh ok! Perfect! Thank you!

  • Is there a DNS-NoIP option?

    2
    1 Votes
    2 Posts
    446 Views
    cwagzC

    @dutsnekcirf said in Is there a DNS-NoIP option?:

    My public DNS is provided by No-IP.org and I've managed to get a certificate created using the DNS-Manual method. My understanding is that this verification method does not allow for automatic certificate renewal. Is there one of the automated verification methods that I could use with no-ip.org? Thanks!

    I recently went through this same situation. I switched from Dyn-DNS to No-IP only to find out that No-IP does not expose API keys or anything to allow the acme package to perform the DNS changes necessary for automatic renewal.

    I ended up canceling no-ip and moving to cloudflare. Cloudflare is actually great once you get it setup and so far, free for what I am doing as well.

  • Solved: ACME RFC2136 with DNS alias mode not working

    2
    0 Votes
    2 Posts
    767 Views
    P

    Found the solution:

    there must be 2 CNAME records according to
    https://github.com/acmesh-official/acme.sh/issues/2789

    one for _acme-challenge.domain,tld to _acme-challenge.domain.tld
    and a second one for _acme-challenge.pfense.domain.tld to _acme-challenge.domain.tld.

Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.