OPNsense Forum

English Forums => General Discussion => Topic started by: aida on March 27, 2023, 05:56:04 PM

Title: ACME client not recieving certificates due to firewall?
Post by: aida on March 27, 2023, 05:56:04 PM
For my homelab I've set up a custom ACME CA using this guide Build a Tiny Certificate Authority For Your Homelab (https://smallstep.com/blog/build-a-tiny-ca-with-raspberry-pi-yubikey/). I was able to verify the configuration worked with Traefik (https://smallstep.com/docs/tutorials/acme-protocol-acme-clients#traefik) on my server.

I started by adding an ACME account:

I tried making some rules but it didn't seem to help anything.

What is interesting is curl does appear to work, so it's only the response to requesting a certificate.
Title: Re: ACME client not recieving certificates due to firewall?
Post by: aida on March 28, 2023, 07:13:01 AM
So I have thought about this again, maybe it does make more sense to use the DNS-01 challenge type. The goal is not to add too many moving parts to this so I wanted to keep the authoritative part on the opnsense device.

It seems it is possible to use BIND and Unbound together without conflict as this post on reddit (https://old.reddit.com/r/OPNsenseFirewall/comments/s8om2r/how_to_unbound_bind/htmot4u/) points out. Unfortunately no documentation was provided. Currently I am using unbound, and I have a few overrides there set up. I like unbound because it lets me set an outgoing interface, which is currently set to my preferred WAN link.

Currently some things about my network:
These are currently configured on Unbound's with "override" option.

Title: Re: ACME client not recieving certificates due to firewall?
Post by: aida on March 28, 2023, 09:06:12 AM
OPNSense BIND Plugin

(https://i.imgur.com/GOL1x10.png)

There seems to be no way to set the user apikey/token in the BIND plugin (https://docs.opnsense.org/manual/how-tos/bind.html).

I noticed some other options:

ACME DNS:

(https://i.imgur.com/xXXYW7b.png)

Not sure about this one. Perhaps something I could set up on my server in a container or something.


nsupdate:

(https://i.imgur.com/B0g8uoc.png)

Perhaps this is an option.

The main goal i am trying to achieve is to get signed certificates from my step-ca server without having to depend on services on the internet (ie using WAN).
Title: Re: ACME client not recieving certificates due to firewall?
Post by: Mr_Flibble on May 17, 2023, 07:59:30 PM
I am using step-ca as well for all my home configs, and it is working... partially... with OPNSense.

In fact, trying to troubleshoot I stumbled across your post. My issue is different, I can get step-ca to work with HTTP validation, but I cannot get it to renew quickly as OPNSense seems to think that a renewal is not required.

My issue/thread is here:

https://forum.opnsense.org/index.php?topic=34054.0

Did you get yours working? If not, I can share my configs that got me to start the renewal - I am just trying to figure out how to get it to actually renew when the cron job tells it to do so.