Restore 1.2.3 Config to 2.1 fails "The Configuration Could Not Be Restored"
-
How do I get the XML file into the PFSense box? the only thing I see is "edit file" which lets me look at files that are already on the box.
-
OK I figured that out. The output came back as:
bool(true)
nullEDIT: Nevermind. Working on it…
-
In "Save / Load from path" put the filename - e.g. /tmp/config123.xml
Paste the file text into the big box
Press Save.But you worked that out already.
Earlier in config_validate is:
if (!($fp = fopen($conffile, "r"))) { $xmlerr = gettext("XML error: unable to open file"); return false; }
But that should also tell you in $xmlerr that it cannot open the file.
Then the while loop:
while ($data = fread($fp, 4096)) {...
I am not sure about the magic significance of reading up to 4096 bytes at a time - maybe this code fails if there is a line of text in the config that is longer than 4096 bytes? Not sure about how all that works feeding pieces to xml_parse.
-
SWEET! Thanks for the help!
I think it is working. The errors in the config were "invalid character" which turned out to be spaces after a "name" descriptor. So I had apparently written a rule say "NAT Email " with the space on the end and that was bad.
Not sure if 2.x already does it but might want to strip leading and ending spaces.
-
The only problem I'm having now is that after the config load I cannot access the webadmin. I can ping it, everything seems to be working, but 404.
-
From the console, try:
11) Restart webConfiguratorA 404 is a real response from the HTTP server, so I guess that indicates that the firewall rules have not locked you out completely :)
-
Tried that. I might be wrong about it being a real 404. It I'm out of office now. Any steps to unlock it if it is the firewall?
-
These are the standard ways to get back in: https://doc.pfsense.org/index.php/I_locked_myself_out_of_the_WebGUI,_help!
-
These are the standard ways to get back in: https://doc.pfsense.org/index.php/I_locked_myself_out_of_the_WebGUI,_help!
Thanks for the help so far. None of those suggestions worked, so on a whim I used option 2 on the PFsense box directly to change the IP address of the LAN adapter, I think I read somewhere this resets the web settings. I changed it to a different IP than was previously on the box and I was able to get in. But if I change the LAN IP to what was originally on the box, I am locked out again.
Somewhere there's something preventing web access when it is running on that original IP address.
-
Maybe there is another device on the LAN that is also using that original LAN IP? Try accessing the original LAN IP when pfSense is not using it, and maybe you will still get a response?
Or did you use the bottom address in the LAN subnet? (like 192.168.1.0/24) I have done that to myself in the past while quickly going through the initial wizard and not thinking. (Note: In 2.1.1 the validation has been enhanced to catch that sort of thing)
Otherwise, I am struggling to think what would be special about a particular LAN IP, unless you have a particular rule that blocks it. -
No, this is a standalone box with nothing by my laptop connected.
So here's what I did that managed to get it working. I changed the address from .1.1 to .44.1, this allowed me into the webconfigurator on port 80. I then created a security certificate and changed the webconfigurator over to https and port 443. I then changed the address back to the original .1.1 and was able to get in using the original address.
Not sure why but the box just will not accept a port 80 connection if it's IP is the .1.1 443 connection is fine.
I ran a port scanner and the port is open. Anyway, 443 should be what is used anyway, so I think all is fine now.
-
Hi everyone,
i guess i'm on the right section of the forum as me too cannot use my xml file from 1.2.x to 2.1 and i get "The Configuration Could Not Be Restored", not really familiar with xml so i just put it as an attachment if someone has the time to look at it.
Thanks for the help,
S. -
I'm not sure if it is the cause, but I noticed at the bottom of your XML there is a bunch of package information. I believe the Wiki states to export the 1.2.3 configuration without package data. Package data cannot be imported.
-
thanks,
i have 2 backups 1 with package and 1 without, none are working; here is the one without (i think) -
The steps outlined by Phil earlier in the post worked out beautifully to find the error. It's really simple, just copy, paste (change the file name), run.
-
i'm sure it does but i don't understand it :-(
-
The file even fails basic XML validation. What options are you using when you export it?
-
diagnostics - backup
-
You might want to start a new thread. Did you maybe open the file in another program before trying the import? They should have come out with .xml extensions not the .txt files you have posted. The export is a mess there's back slashes after every line and incorrect data in the header.
-
Thank you,
i will do that! (i have the .xml but just posted .txt).
S.