OPNsense Forum

English Forums => General Discussion => Topic started by: kiekar on December 28, 2025, 10:23:03 PM

Title: Caddy Reverse Proxy + Firewall Rules
Post by: kiekar on December 28, 2025, 10:23:03 PM
Hello,

I'm having issues trying to acces home assistant using caddy plugin.

I have a home assistant device on my IoT network 192.168.30.0/24

I created a rule on my LAN network 10.10.0.0/24 to access home assistant with
Protocol: IPv4 TCP
Source: LAN net
Destination: 192.168.30.87
Port: 8123
Which work fine however if try with ha.mydomain.com it fails with ERR_CONNECTION_TIMED_OUT.

I decide to create an Allow All Any rule for testing.
After deleting all history in the browser I was able to get access to home assistant with ha.mydomain.com
however when trying to lock down the rule by first changing the protocol from any to tcp, deleting the browser history
I was no longer able to access home assistant with browser ERROR_CONNECTION_REFUSED.

Below is the config for caddy.

Any idea why I'm having issues with the rules.

Any help would be much appreciated.

# caddy_user=root

# Global Options
{
log {
output net unixgram//var/run/caddy/log.sock {
}
format json {
time_format rfc3339
}
level DEBUG
}

servers {
protocols h1 h2
}

grace_period 10s
skip_install_trust
import /usr/local/etc/caddy/caddy.d/*.global
}

# Reverse Proxy Configuration


ha.mydomain.com {
tls /usr/local/etc/caddy/certificates/692f47de03cb7.pem /usr/local/etc/caddy/certificates/692f47de03cb7.key {
}

handle {
reverse_proxy 192.168.30.87:8123 {
}
}
}

import /usr/local/etc/caddy/caddy.d/*.conf