Recent posts

#1
Tutorials and FAQs / Setup guide for os-sftp-backup...
Last post by arrowd - Today at 01:26:48 AM
Setup Guide for Automatic Backups of
OPNsense configuration to a TrueNAS server

There are different ways of setting up the process, some possibly more efficient than this, but these settings worked for me after a lot of false starts and web searching. I've generated this to both help future me and possibly help other non-experts interested in doing automatic backups. Improvements welcome.

1.   Enable SSH in OPNsense. At the web page go to System – Settings – Administration. In Secure Shell enable Secure Shell; Permit root user login; Permit password login; Port 22; Listen on your LAN (and perhaps VPN) interfaces.

2.   Use PuTTY or some other terminal program to connect by 'ssh root@<opnsense_IP> using the root password. Later on you can setup login by using SSH key pairs.

3.   Make a key pair to authenticate the SSH backup session. At the shell prompt enter
'ssh-keygen -t ed25519 -C "your_email@example.com" -f id_ed25519'. This will result in 'id_ed25519' and 'id_ed25519.pub' files in your /root directory. The email address after the -C is just a comment to label the keys and is not used for actual emails.

4.   If there is no .ssh directory in /root, 'mkdir .ssh' to add it. Set directory permissions to 'chmod 700. Move the two key files into /root/.ssh, and set their permissions with 'chmod 600'.

5.   Enable SSH on your TrueNAS server. At the web page go to System – Services – SSH; enable it to start automatically; no further editing is required.

6.   Use PuTTY or some other terminal program to connect by 'ssh root@<truenas_IP> using the root password.

7.   Create a home directory for the new user on your TrueNAS unit. Enter 'mkdir /mnt/<your pool name>/opnsense'.

8.   Enter 'cd /mnt/<your pool name>/opnsense'. If there is no .ssh directory there, 'mkdir .ssh' to add it. Set directory permissions with 'chmod 700. If not present, create an '.authorized_keys' file, and set the permissions with 'chmod 600'. Edit the file and append the contents of id_ed25519 to it.

9.   Enter 'mkdir Backups', and set permissions with 'chmod 600'.

10.   Configure a user on TrueNAS. Go to Credentials – Users. Click Add. For Username, enter opnsense; Allow Access for SMB and SSH. In 'Public SSH Key' field, paste in the contents of the id_ed25519.pub file. In Home Directory under Additional Details, set it to '/mnt/<your pool name>/opnsense'.

11.   Install the os-sftp-backup plugin on OPNsense at System – Firmware – Plugins.

12.   Configure the plugin at System – Configuration – Backups. Under sftp, Enable it; set the URL to 'sftp://opnsense@<your_truenas_IP>/Backups'. (Yes, there is a double slash.) For SSH private key, 'Click to edit' and paste in the contents of id_ed25519. Set the Backup Count to how many you want to keep. If you want to encrypt your backups, enter a password and confirm it. Click 'Setup/Test sftp'.

13.   If everything worked, you should see a message at the top of the screen that says 'Backup successful, current file list:' followed by a list of XML file names with the Unix times they were made as part of the names.

14.   If you get an error message instead, try this: get to a shell prompt on OPNsense and enter 'sftp opnsense@<your_truenas_IP>'. If successful, this started sftp in interactive mode – see the FreeBSD man page on sftp to see allowed commands. If instead, you get an error message from this sftp command, you can see expanded errors to diagnose the problem by entering 'sftp -v opnsense@<your_truenas_IP>'.

15.   Each time you manually run the Setup/Test, you will get another backup. When enabled, the process will run as a cron job at a random time between 1 and 2 AM every night. You can verify this by entering 'crontab -l' at a shell prompt, and finding the line that includes 'remote backups'. If your configuration hasn't changed, a new backup won't be transferred to TrueNAS.

16.   Backup events are recorded in System - Log Files – General.

17.   If you need to restore a previous configuration, copy the saved file to your workstation. In OPNsense go to System – Configuration – Backups. In the Restore section, Choose the file you just downloaded, and click 'Restore configuration'. If you encrypted the backup, click 'Configuration is encrypted' and enter the password in the field provided.

#2
26.7, 26.10 Series / Re: No DNS query entries showi...
Last post by Maurice - November 29, 2026, 11:34:15 PM
Might be too obvious, but Reporting: Unbound DNS: Settings: Enabled is checked?

Cheers
Maurice
#3
Virtual private networks / Re: New OpenVPN Setup Issues
Last post by Kitdrewne - November 29, 2026, 11:24:53 PM
Thanks so much for the reply! I believe that helped with the issue, those errors are no longer appearing in the log. I'm now getting this when I try to connect:
Code (openvpn.log) Select
2026-11-24T10:47:25-07:00 Error openvpn_server1 udp6:IPADDRESSHERE:35364 TLS Error: TLS handshake failed
2026-11-24T10:47:25-07:00 Error openvpn_server1 udp6:IPADDRESSHERE:35364 TLS Error: TLS object -> incoming plaintext read error
2026-11-24T10:47:25-07:00 Error openvpn_server1 udp6:IPADDRESSHERE:35364 TLS_ERROR: BIO read tls_read_plaintext error
2026-11-24T10:47:25-07:00 Error openvpn_server1 udp6:IPADDRESSHERE:35364 OpenSSL: error:0A000413:SSL routines::ssl/tls alert unsupported certificate:SSL alert number 43
2026-11-24T10:08:19-07:00 Error openvpn_server1 TLS Error: cannot locate HMAC in incoming packet from [AF_INET6]::ffff:IPADDRESSHERE:33366 (via ::ffff:WANADDRESSHERE%[undef])
2026-11-24T09:32:39-07:00 Error openvpn_server1 TLS Error: cannot locate HMAC in incoming packet from [AF_INET6]::ffff:IPADDRESSHERE:60602 (via ::ffff:WANADDRESSHERE%[undef])
2026-11-24T09:30:28-07:00 Error openvpn_server1 TLS Error: cannot locate HMAC in incoming packet from [AF_INET6]::ffff:IPADDRESSHERE:61036 (via ::ffff:WANADDRESSHERE%[undef])
2026-11-24T05:20:31-07:00 Error openvpn_server1 TLS Error: cannot locate HMAC in incoming packet from [AF_INET6]::ffff:IPADDRESSHERE:34240 (via ::ffff:WANADDRESSHERE%[undef])
2026-11-24T05:05:21-07:00 Error openvpn_server1 TLS Error: cannot locate HMAC in incoming packet from [AF_INET6]::ffff:IPADDRESSHERE:57321 (via ::ffff:WANADDRESSHERE%[undef])
2026-11-24T02:14:28-07:00 Error openvpn_server1 TLS Error: cannot locate HMAC in incoming packet from [AF_INET6]::ffff:IPADDRESSHERE:59618 (via ::ffff:WANADDRESSHERE%[undef])
(The first four lines repeat indefinitely as long as my VPN client tries connecting.)

I only had a few minutes at the site this device is at, so I'll have to look into it further while I'm there next week. I probably just misconfigured something with a cert when I was trying to find the original problem.
#4
26.7, 26.10 Series / Re: Pure non-filering bridge
Last post by Maurice - November 29, 2026, 11:21:30 PM
@Cenkron As you said, a bridge is a layer 2 device. From a layer 2 perspective, a gateway is just a host like any other one.

The discussion does not make it clear what frames are lost where. As Patrick said: Packet capture. Look at what's actually going on on the wire. Work your way up: When attempting to ping the gateway from the OPNsense bridge device itself, does it send corresponding ARP requests? Do these arrive at the gateway? Does the gateway send ARP responses? Do these reach the igc interface on the bridge device? And then the bridge0 interface? If that's all a yes, then check the same for ICMP. If not, at what point does it fail?

Cheers
Maurice
#5
General Discussion / Re: Would anyone mind verifyin...
Last post by pfry - November 29, 2026, 11:13:09 PM
Quote from: nero355 on November 29, 2026, 10:01:49 PMWe got SSH for that ?!

Heh. Configuration CLI. Setting up rules and such (e.g.) is kind of a pain from console/shell.

I used to configure my Fortigates entirely through CLI. (Just an analogous example. I don't recall if ScreenOS even has a configuration CLI - ouch.)
#6
General Discussion / Re: Discussion: Sanity checkin...
Last post by yourfriendarmando - November 29, 2026, 10:51:39 PM
I check them on a at least a quarterly basis. Bookmark the websites of each one and see the last update of the list. Some lists can be large too, you don't want them soaking up all the assigned memory to just one list.

I used to have several groups of URL aliases, but if they're in one single list, there is an opportunity for the parser to merge duplicate entries.

I do feed them into an alias group. In this group, is another list that has a ! before each entry.I found this out the hard way when a list from Firehol had non routable address blocks. An external list does have the potential to ruin your internal network. A sanitize list should have items like !127.0.0.0/8,!192.168.0.0/16 etc, all the CIDR address blocks that have no business in external lists. Having these will exclude against entries, like allow entries for DNS block lists
#7
26.7, 26.10 Series / Re: OPNsense 26.10.7 - Suricat...
Last post by nero355 - November 29, 2026, 10:17:43 PM
Quote from: Monviech (Cedrik) on November 29, 2026, 05:47:30 PMhttps://github.com/opnsense/ports/issues/323
Holy crap... Intel E6600... Socket 775... That's seriously old...

IIRC even a much newer but now also very old low end model like the G1820/G1900 or so is/was a lot faster than the fastest Quad Core model that use to be available for Socket 775 in the past !!

Why do people keep using these ?!

These days a lot of software wants AVX/AVX2 instructions more and more frequently so you really need to keep that in mind when using really old hardware like that :)
#8
High availability / Re: HA (CARP/pfSync) with Sing...
Last post by nero355 - November 29, 2026, 10:06:50 PM
Quote from: shaam on November 29, 2026, 09:26:09 PMI added a Negear router between the modem and the firewalls.
I assigned 172.16.1.2 to FW1, 172.16.1.3 to FW2, and 172.16.1.4 to CARP, and it worked.

Now I am going to buy a modem/router combo so I won't need two separate devices (modem and router)
NOFI but that's just weird...

Also I hope it's not a Netgear R7000 that you are using which is one of the worst products they have ever made firmware support wise :(
#9
General Discussion / Re: Would anyone mind verifyin...
Last post by nero355 - November 29, 2026, 10:01:49 PM
Quote from: pfry on November 29, 2026, 05:28:21 PMOPNsense doesn't offer a CLI
We got SSH for that ?!
#10
Intrusion Detection and Prevention / Re: abuse.ch rulesets not down...
Last post by 1ef2m - November 29, 2026, 09:39:24 PM
For others running into this:

1. What OPNsense calls "abuse_ch.token", abuse.ch calls "auth key".
2. You can register here to get a token/auth key: https://auth.abuse.ch/
3. In OPNsense, enter the token/auth key and then click "Save" before clicking "Download & Update Rules". Pasting and downloading without saving won't work.