1
24.1 Legacy Series / Re: How to change hostname using CLI
« on: March 20, 2024, 06:56:47 pm »there is a config.xml file where you can changeCode: [Select]<hostname>OPNsense</hostname
but did you keep a backup xml?? you could modify the backup and load it back in.
I found the config.xml file in the /config folder.
I changed the host name so it starts with an "alpha" character and now the system boots.
Maybe this calls for a little Input Validation to ensure that you cannot change the hostname of OPNsense from the webgui.
Similar issues may arrise if you attempt to create a static DHCP/Firewall Rule etc if you start a hostname with a number. Depending on what Hostname RFC the systems in question are using. It might be safer to ensure that the original RFC that stated hostnames had to start with an Alpha character {a-z}. While I thought this might be related to the DHCP server (Arris DSL Modem) even with the Network Cable to OPNsense disconnected it would not boot when the hostname started with a number. OPNsense is virtualized in Proxmox 8 latest version and connected via a Linux Virtual Bridge to the physical adapter. It could be Proxmox or OPNsense that is using an outdated RFC in regards the structure of the Hostname.