Importing DHCP config before interface Enabled?
-
I was attempting to restore an instance from an December backup and then restore just the DHCP config from a March backup (because restoring the entire March backup kills the box).
The DHCP config from March has reservations defined on OPT2, but the full backup from December doesn't have OPT2 enabled.
I did a fresh install, restored December, assigned OPT2, but forgot to Enable it, and then restored the DHCP config from March. The Restore didn't report any errors, but I didn't see OPT2 in Services: DHCP Server, so I went back to check the OPT2 Interface.
I hadn't Enabled it, so tried to check the Enabled box, but I received the error "DHCP Server is Enabled on this Interface. Disable the DHCP Server and then re-enable this interface."
Catch-22, because OPT2 doesn't even show up in Service: DHCP Server, so there's no way to disable it.
I ended up restoring December again, then properly assigning, configuring, and Enabling OPT2 before importing the March DHCP, so I'm back up and running again, but is there a way to recover from this other than rolling back to a previous backup?
-
Ah, yes that can be tricky. I would edit the config to enable the OPT2 interface to get past that.
-
Ah, I didn't realize that it was possible to edit the config.xml from within pfsense. I see that option, now.
Good to know for the future, although I'll be careful!
-
Yes, you can certainly break things that way.
But enabling an interface is a fairly small change and you can copy/paste the line from another interface so the risk is low.