Bookmark

Cloudflare DDNS, Let's Encrypt SSL, and Reverse Proxy on OPNsense

Outdated

See the OPNsense configuration series .

This is an advanced guide. It uses Cloudflare DDNS for a domain whose nameservers already point to Cloudflare. Other providers have similar settings, but their fields and policies may differ.

OPNsense includes DDNS support for many providers, including Cloudflare, DuckDNS, DynDNS, DigitalOcean, DuckDNS, GoDaddy, Google Domains, HE.net, Linode, Namecheap, NoIP, OVH, and others.

Configure Dynamic DNS

This example uses firewall.example.com.

  • Open Services > Dynamic DNS and click Add.
FieldSelectionNotes
EnableChecked
Service TypeCloudflareIPv6 providers are marked with a v6 variant.
Interface monitorWAN
Hostnamefirewall.example.comThe hostname to update.
Username[email protected]Cloudflare login email.
PasswordGlobal API KeySee Cloudflare API documentation .
DescriptionAny note

Click Save.

Cloudflare DDNS

If the service does not update, click the play icon to disable it, then click it again to enable it. Check the email and API key if the problem continues.

Issue a Let's Encrypt certificate

Cloudflare can add SSL for a domain, but using a certificate directly on OPNsense gives more control and avoids depending on the Cloudflare proxy for every use case.

  • Install the os-acme-client plugin under System > Firmware > Plugins.
  • Open Services > Let's Encrypt > Account and click +.
FieldValue
EnableChecked
NameWebGUI SSL
DescriptionAny note
E-Mail AddressYour email address

Click Save.

  • Open Validation Methods and click +.
FieldValue
EnabledChecked
NameWebGUI SSL
Challenge TypeHTTP-01
HTTP ServiceOPNsense Webservice (Automatic port forward)
IP Auto-DiscoveryChecked
InterfaceWAN
IP AddressLeave empty

Click Save.

  • Open Certificates and click +.
FieldValue
EnabledChecked
Common Namefirewall.example.com
LE AccountWEBGUI SSL
Validation MethodsWEBGUI SSL
Auto RenewerChecked
Other fieldsLeave defaults

Click Save, then Issue/Renew Certificate Now.

SSL certificate issued

Use the certificate for the OPNsense GUI

Open System > Settings > Administration and set SSL Certificate to firewall.example.com (Let's Encrypt). Click Save.

You should now be able to access OPNsense at https://firewall.example.com from the LAN.

  • Without a firewall rule allowing external access, the hostname is reachable only from the internal network. Do not expose ports 80 and 443 directly to the Internet without a clear security plan.
  • If AdGuard Home is installed using the OPNsense AdGuard Home guide , it can also be accessed through the domain.

0 Bình luận

Góp Ý / Bình Luận / Đánh giá