Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - mcdeltat

#1
I was working on adding new Linux devices to my existing OpenVPN instance and no matter what I do, I get this error (note, PII swapped with <Value> brackets, but they are correct values). It seems that opnSense is generating incorrect ovpn files that miss the CN portion of the Subject.

2026-09-06T03:42:25.164197-07:00 user-precision nm-openvpn[14463]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
2026-09-06T03:42:25.164761-07:00 user-precision nm-openvpn[14463]: TCP/UDP: Preserving recently used remote address: [AF_INET]<public_ipv4>:1194
2026-09-06T03:42:25.164985-07:00 user-precision nm-openvpn[14463]: UDPv4 link local: (not bound)
2026-09-06T03:42:25.165140-07:00 user-precision nm-openvpn[14463]: UDPv4 link remote: [AF_INET]<public_ipv4>:1194
2026-09-06T03:42:25.180286-07:00 user-precision nm-openvpn[14463]: VERIFY ERROR: could not extract CN from X509 subject string ('C=<Country>, ST=<State>, L=<City>, O=Personal, emailAddress=<email@email.com>') -- note that the field length is limited to 64 characters
2026-09-06T03:42:25.180367-07:00 user-precision nm-openvpn[14463]: OpenSSL: error:0A000086:SSL routines::certificate verify failed:
2026-09-06T03:42:25.180394-07:00 user-precision nm-openvpn[14463]: TLS_ERROR: BIO read tls_read_plaintext error
2026-09-06T03:42:25.180424-07:00 user-precision nm-openvpn[14463]: TLS Error: TLS object -> incoming plaintext read error
2026-09-06T03:42:25.180450-07:00 user-precision nm-openvpn[14463]: TLS Error: TLS handshake failed
2026-09-06T03:42:25.180476-07:00 user-precision nm-openvpn[14463]: SIGUSR1[soft,tls-error] received, process restarting

Strangely enough, when using the official OpenVPN App on an iOS device everything works as expected. I export the client certificate, I open the ovpn file, I change no values, I connect. This bug seems specific to my Linux devices.

Current Server Stats:
OPNsense 26.7.3_11-amd64
FreeBSD 15.1-RELEASE-p3
OpenSSL 3.5.8

Current Client Stats:
Linux Mint 22.3
openssl/noble-updates,noble-security,now 3.0.13-0ubuntu3.15 amd64

Notably, the file that comes from opnSense Client Export has this at the top, missing the CN.
verify-x509-name "C=<Country>, ST=<State>, L=<City>, O=Personal, emailAddress=<email@email.com>" subject

I tried manually modifying the file prior to import to include the CN, which did not work. I also tried disabling TLS Validation:
verify-x509-name "C=<Country>, ST=<State>, L=<City>, O=Personal, emailAddress=<email@email.com>, CN=<username>"

Looking at the contents of the <cert> section of the ovpn file, we get this from "openssl x509 -in ~/Downloads/user-laptop-x509.txt -noout -text":
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number: 11 (0xb)
        Signature Algorithm: sha256WithRSAEncryption
        Issuer: C = <Country>, ST = <State>, L = <City>, O = Personal, emailAddress = <email@email.com>, CN = intermediate-ca
        Validity
            Not Before: Mar  2 08:24:50 2026 GMT
            Not After : Apr  3 08:24:50 2027 GMT
        Subject: C = <Country>, ST = <State>, L = <City>, O = Personal, emailAddress = <email@email.com>, CN = <username>
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
                Public-Key: (2048 bit)
                Modulus:
                    <MODULUS>
                Exponent: 65537 (0x10001)
        X509v3 extensions:
            X509v3 Basic Constraints:
                CA:FALSE
            X509v3 Key Usage:
                Digital Signature, Non Repudiation, Key Encipherment
            Netscape Comment:
                OPNsense Generated Client Certificate
            X509v3 Subject Key Identifier:
                <X509v3 Subject Key Identifier>
            X509v3 Authority Key Identifier:
                keyid:<X509v3 Authority Key Identifier>
                DirName:/C=<Country>/ST=<State>/L=<City>/O=Personal/emailAddress=<email@email.com>/CN=intermediate-ca
                serial:00
            X509v3 Extended Key Usage:
                TLS Web Client Authentication
    Signature Algorithm: sha256WithRSAEncryption
    Signature Value:

Anyone got any idea what's going on here?
#2
General Discussion / PXE Boot Raspberry Pi
April 25, 2022, 06:42:09 AM
I've been working through PXE booting a Raspberry Pi 4 on my network for quite a few hours now and not sure what I'm missing. Hoping to make a video tutorial at the end of all this to avoid the forums getting hit with this constantly.

Boring Details:
OPNsense 22.1.6-amd64
FreeBSD 13.0-STABLE
OpenSSL 1.1.1n 15 Mar 2022
Intel® Core™ i5-7200U CPU @ 2.50GHz (2 cores, 4 threads) (Qotom Box)

I'm mostly following this official guide from Ubuntu https://ubuntu.com/server/docs/install/netboot-arm64

I've installed the os-tftpd package on opnSense. I downloaded the latest live server image (Jammy 22.04) from here: https://cdimage.ubuntu.com/releases/22.04/release/ubuntu-22.04-live-server-arm64.iso

From there I copied over the following files to my tftp server in /usr/local/tftp:
1. casper/initrd
2. casper/vmlinuz
3. grub/grub.cfg
4. grubnetaa64.efi.signed

The contents of my grub/grub.cfg file are:
set timeout=30

loadfont unicode

set menu_color_normal=white/black
set menu_color_highlight=black/light-gray

menuentry "Install Ubuntu Server (Jammy 22.04) (Pull ISO from Web)" {
        set gfxpayload=keep
        linux /casper/vmlinuz url=https://cdimage.ubuntu.com/releases/22.04/release/ubuntu-22.04-live-server-arm64.iso only-ubiquity ip=dhcp ---
        initrd  /casper/initrd
}

menuentry "Try or Install Ubuntu Server" {
        set gfxpayload=keep
        linux   /casper/vmlinuz quiet ---
        initrd  /casper/initrd
}
menuentry 'Boot from next volume' {
        exit 1
}
menuentry 'UEFI Firmware Settings' {
        fwsetup
}


To test things out, I went to another machine that is on the same LAN as the target machine. I ran 'tftp 192.168.x.x' and then 'get grub/grub.cfg' to which I get 'Received 608 bytes in 0.0 seconds'. Trying the same get command on a file that doesn't exist yields "Error code 1: File not found". Perfect.

So then I jumped into the GUI and made what I expect to be the final changes, but then nothing happens. Under Services -> DHCPv4 -> LAN I have the following settings:
1. TFTP server -> Set TFTP hostname: 192.168.x.x (same as the one tested above)
2. TFTP Server -> Set Bootfile: /usr/local/tftp/grub/grub.cfg
3. Network Booting -> Enable Network Booting: Checked
4. Network Booting -> Set ARM UEFI (64-bit) filename: grub/grub.cfg
5. Network Booting -> Set root-path string: /usr/local/tftp/grub/grub.cfg


The RPi then proceeds to just cycle through the boot process. Tries the SD card, gets an IP from DHCP, gets the correct TFTP Server IP, but then states "TFTP 1: File not found."

So what am I missing? Is it because the RPi can't boot UEFI? Unsure of where to go from here since my machine on the LAN finds it just fine.