PFsense – Collection of things good to remember…

/etc/rc.conf_mount_rw to make filesystem temporarily writeable
/etc/rc.conf_mount_ro to set filesystem back to read-only

Restore backup and check filesystem of Pfsense Firewall

Select to boot into “single user” mode.
When you get a prompt, remount the filesystem into read/write mode using “mount -u /cf”
Check the filesystem for errors and repair them with “fsck -yf /“. or just fsck

Locate and copy the restore file from the “/cf/conf/backup/” directory.
Copy it with ”cp /cf/conf/backup/config-12121221.xml /cf/config/config.xml”
Remove the file “/tmp/config.cache” using “rm /tmp/config.cache“.

Run the command “/etc/rc.reload_all start“.

Reboot using “reboot“.

Powershell commands

kolla vad man har för version av powershell installerat…
if ($PSVersionTable.PSVersion.Major -ne 3) {Write-Host ”Version 3 NOT found!”;exit}

Download link Powershell 3.0 (2013) https://www.microsoft.com/en-us/download/details.aspx?id=34595

# Delete alla *.BAk files in all sub folders….
Get-ChildItem . -recurse | where {$_.Extension -match ”BAK”} | Remove-Item -recurse