2018-01-30 10:40:13 +00:00
|
|
|
|
=====================================
|
|
|
|
|
Initial Installation & Configuration
|
|
|
|
|
=====================================
|
|
|
|
|
|
|
|
|
|
.. Note::
|
|
|
|
|
Just looking on how to invoke the installer? When the live environment has been
|
|
|
|
|
started just login with user **installer** and password **opnsense**.
|
|
|
|
|
|
2023-03-04 09:35:06 +00:00
|
|
|
|
.. contents:: Index
|
|
|
|
|
|
2018-01-30 10:40:13 +00:00
|
|
|
|
------------
|
|
|
|
|
Architecture
|
|
|
|
|
------------
|
|
|
|
|
|
2021-01-28 15:22:56 +00:00
|
|
|
|
The **software setup** and installation of OPNsense® is available
|
2023-03-04 09:26:30 +00:00
|
|
|
|
for the `x86-64 <https://en.wikipedia.org/wiki/X86-64>`__ microprocessor
|
2021-01-28 15:22:56 +00:00
|
|
|
|
architecture only.
|
2018-01-30 10:40:13 +00:00
|
|
|
|
|
|
|
|
|
----------------
|
|
|
|
|
Embedded vs Full
|
|
|
|
|
----------------
|
|
|
|
|
|
2023-03-04 09:26:30 +00:00
|
|
|
|
OPNsense offers two Image types with all major releases: embedded and full images.
|
2023-03-04 09:35:06 +00:00
|
|
|
|
The Embedded Image is intended for environments where preinstalling
|
|
|
|
|
the storage media is required due to a lack of local resources on the firewall
|
|
|
|
|
like storage, and/or console access (VGA/Serial). The image is tailored to reduce
|
|
|
|
|
write cycles as well, but the image can be used anywhere. Another reason for the
|
|
|
|
|
Embedded Image is to eliminate the need for local console access for installing OPNsense.
|
|
|
|
|
Installation is managed by prewriting the image to a storage device, installing the
|
2023-03-04 09:26:30 +00:00
|
|
|
|
storage device, and booting the system.
|
|
|
|
|
|
2023-03-04 09:35:06 +00:00
|
|
|
|
Full Images provide installation tools like OPNsense Importer, Live Environment,
|
|
|
|
|
and Installer. Full Images are released to support different console/hardware installation
|
|
|
|
|
requirements.
|
2023-03-04 09:26:30 +00:00
|
|
|
|
|
|
|
|
|
Both image types can be installed and run from virtual disks (VM), `SD memory
|
2023-03-04 09:35:06 +00:00
|
|
|
|
cards <https://en.wikipedia.org/wiki/Secure_Digital>`__,
|
2023-03-04 09:26:30 +00:00
|
|
|
|
USB disks, `solid-state
|
|
|
|
|
disks (SSD) <https://en.wikipedia.org/wiki/Solid-state_drive>`__, or `hard disk drives
|
2018-01-30 10:40:13 +00:00
|
|
|
|
(HDD) <https://en.wikipedia.org/wiki/Hard_disk_drive>`__.
|
|
|
|
|
|
2023-03-04 09:26:30 +00:00
|
|
|
|
The main differences between embedded and full images are:
|
2018-01-30 10:40:13 +00:00
|
|
|
|
|
|
|
|
|
+-----------------------+-----------------------+
|
|
|
|
|
| Embedded | Full |
|
|
|
|
|
+=======================+=======================+
|
|
|
|
|
| Writes to RAM disk | Writes to local disk |
|
|
|
|
|
+-----------------------+-----------------------+
|
|
|
|
|
| No log data retention | Log data retention |
|
|
|
|
|
| after reboot | after reboot |
|
|
|
|
|
+-----------------------+-----------------------+
|
|
|
|
|
| Not intended for | Suitable for disk |
|
|
|
|
|
| local disk writes | writes. |
|
|
|
|
|
+-----------------------+-----------------------+
|
2021-01-28 15:22:56 +00:00
|
|
|
|
| Embedded only use, | Can enable RAM disk |
|
|
|
|
|
| SWAP file is optional | for embedded mode. |
|
2018-01-30 10:40:13 +00:00
|
|
|
|
+-----------------------+-----------------------+
|
|
|
|
|
|
|
|
|
|
|
2023-03-04 09:26:30 +00:00
|
|
|
|
Embedded image store logging and cache data in memory only, while full versions
|
2018-01-30 10:40:13 +00:00
|
|
|
|
will keep the data stored on the local drive. A full version can mimic the
|
|
|
|
|
behavior of an embedded version by enabling RAM disks, this is especially
|
|
|
|
|
useful for SD memory card installations.
|
|
|
|
|
|
|
|
|
|
.. Warning::
|
2023-03-04 09:35:06 +00:00
|
|
|
|
See the chapter :doc:`Hardware Sizing & Setup <hardware>` for further information
|
2023-03-04 09:26:30 +00:00
|
|
|
|
on hardware requirements prior to an install.
|
2019-01-20 10:05:01 +00:00
|
|
|
|
|
2023-03-13 19:51:26 +00:00
|
|
|
|
-------------------------------
|
2023-03-04 09:26:30 +00:00
|
|
|
|
Installation Images
|
2023-03-13 19:51:26 +00:00
|
|
|
|
-------------------------------
|
2019-01-20 10:15:04 +00:00
|
|
|
|
|
2023-03-04 09:26:30 +00:00
|
|
|
|
Depending on your hardware and use case, different installation options are available:
|
|
|
|
|
|
|
|
|
|
+--------+---------------------------------------------------+------------+
|
|
|
|
|
| Type | Description | Image Type |
|
|
|
|
|
+========+===================================================+============+
|
|
|
|
|
| dvd | ISO image boots into a live environment in | Full |
|
|
|
|
|
| | VGA-only mode with UEFI support | |
|
|
|
|
|
+--------+---------------------------------------------------+------------+
|
|
|
|
|
| vga | USB image boots into a live environment | Full |
|
|
|
|
|
| | in VGA-only mode with UEFI support | |
|
|
|
|
|
+--------+---------------------------------------------------+------------+
|
|
|
|
|
| serial | USB image boots into live environment running in | Full |
|
|
|
|
|
| | serial console (115200) mode only with | |
|
|
|
|
|
| | UEFI support | |
|
|
|
|
|
+--------+---------------------------------------------------+------------+
|
|
|
|
|
| nano | Image for preinstalling onto >=4 GB USB drives, | Embedded |
|
|
|
|
|
| | SD, or CF cards for use with embedded devices | |
|
|
|
|
|
| | running in serial console (115200) mode with | |
|
|
|
|
|
| | secondary VGA support (no kernel messages though) | |
|
|
|
|
|
+--------+---------------------------------------------------+------------+
|
2018-01-30 10:40:13 +00:00
|
|
|
|
|
2023-03-04 09:26:30 +00:00
|
|
|
|
.. Note::
|
2023-03-04 09:35:06 +00:00
|
|
|
|
All Full Image types can run both `OPNsense Importer <https://docs.opnsense.org/manual/install.html#opnsense-importer>`__
|
|
|
|
|
before booting into the Live environment and also run
|
|
|
|
|
`Installer <https://docs.opnsense.org/manual/install.html#install-to-target-system>`__ once booted into the Live environment.
|
2018-01-30 10:40:13 +00:00
|
|
|
|
|
2023-03-04 09:26:30 +00:00
|
|
|
|
.. Warning::
|
2023-03-04 09:35:06 +00:00
|
|
|
|
Flash memory cards will only tolerate a limited number of writes and re-writes. For
|
|
|
|
|
Nano image memory disks for **/var/log** and **/tmp** are applied by
|
2023-03-04 09:26:30 +00:00
|
|
|
|
default to prolong CF (flash) card lifetimes.
|
2023-03-04 09:35:06 +00:00
|
|
|
|
|
|
|
|
|
To enable non-embedded versions: Go to :menuselection:`System --> Settings --> Miscellaneous --> Disk / Memory Settings`,
|
2023-03-04 09:26:30 +00:00
|
|
|
|
change the setting, then reboot. Consider enabling an external syslog server as well.
|
2018-01-30 10:40:13 +00:00
|
|
|
|
|
|
|
|
|
------------------------------
|
2023-03-04 09:26:30 +00:00
|
|
|
|
Image Filename Composition
|
2018-01-30 10:40:13 +00:00
|
|
|
|
------------------------------
|
|
|
|
|
.. blockdiag::
|
|
|
|
|
|
|
|
|
|
diagram {
|
|
|
|
|
default_shape = roundedbox;
|
|
|
|
|
default_node_color = white;
|
|
|
|
|
default_linecolor = darkblue;
|
|
|
|
|
default_textcolor = black;
|
|
|
|
|
default_group_color = lightgray;
|
|
|
|
|
|
|
|
|
|
OS [label="OPNsense-##.#.##-OpenSSL-", width=200];
|
|
|
|
|
|
2021-01-28 15:22:56 +00:00
|
|
|
|
platform [label = "amd64-" ];
|
2018-01-30 10:40:13 +00:00
|
|
|
|
|
2018-06-13 11:39:47 +00:00
|
|
|
|
OS -> dvd-;
|
2018-01-30 10:40:13 +00:00
|
|
|
|
|
|
|
|
|
group {
|
|
|
|
|
orientation = portrait
|
|
|
|
|
label = "Type";
|
|
|
|
|
fontsize = 20;
|
|
|
|
|
|
2018-06-13 11:39:47 +00:00
|
|
|
|
dvd- -> nano- -> serial- -> vga-;
|
2018-01-30 10:40:13 +00:00
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
group {
|
|
|
|
|
orientation = portrait
|
|
|
|
|
label = "Architecture";
|
|
|
|
|
fontsize = 20;
|
|
|
|
|
|
2021-01-28 15:22:56 +00:00
|
|
|
|
platform;
|
2018-01-30 10:40:13 +00:00
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
group {
|
|
|
|
|
orientation = portrait
|
|
|
|
|
label = "Image Format";
|
|
|
|
|
fontsize = 20;
|
|
|
|
|
|
|
|
|
|
"iso.bz2" -> "img.bz2";
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2021-01-28 15:22:56 +00:00
|
|
|
|
dvd- -> platform -> "iso.bz2";
|
2018-01-30 10:40:13 +00:00
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.. Note::
|
2023-03-04 09:35:06 +00:00
|
|
|
|
**Please** be aware that the latest installation media does not always correspond
|
|
|
|
|
with the latest released version available. OPNsense installation images are provided
|
|
|
|
|
on a scheduled basis with major release versions in January and July. More information
|
|
|
|
|
on our release schedule is available from our package repository, see
|
|
|
|
|
`README <https://pkg.opnsense.org/releases/mirror/README>`__. We are encouraged to update
|
|
|
|
|
OPNsense after installation to be on the latest release available, see
|
|
|
|
|
`Update Page <https://docs.opnsense.org/manual/updates.html>`__.
|
2018-01-30 10:40:13 +00:00
|
|
|
|
|
|
|
|
|
|
2023-03-04 09:26:30 +00:00
|
|
|
|
-------------------------
|
|
|
|
|
Download and Verification
|
|
|
|
|
-------------------------
|
2022-08-04 19:37:16 +00:00
|
|
|
|
|
2023-03-04 09:26:30 +00:00
|
|
|
|
The OPNsense distribution can be `downloaded <https://opnsense.org/download>`__
|
|
|
|
|
from one of our `mirrors <https://opnsense.org/download>`__.
|
2023-03-04 09:08:59 +00:00
|
|
|
|
|
2023-03-04 09:26:30 +00:00
|
|
|
|
OpenSSL is used for image file verification. 4 files are needed for verification process:
|
2023-03-04 09:08:59 +00:00
|
|
|
|
|
2023-03-04 09:26:30 +00:00
|
|
|
|
* The SHA-256 checksum file (<filename>.sha256)
|
|
|
|
|
* The bzip compressed Image file (<filename>.<image>.bz2)
|
|
|
|
|
* The signature file (<filename>.<image>.bz2.sig)
|
|
|
|
|
* The openssl public key (<filename>.pub)
|
2023-03-04 09:08:59 +00:00
|
|
|
|
|
2023-03-04 09:26:30 +00:00
|
|
|
|
Use one of the OPNsense mirrors to download these files:
|
2022-08-04 19:37:16 +00:00
|
|
|
|
|
2023-03-04 09:26:30 +00:00
|
|
|
|
1. Go to the bottom of OPNSense `download <https://opnsense.org/download>`__ page.
|
|
|
|
|
2. Click one of the available mirrors closest to your location.
|
|
|
|
|
3. Download one of each file mentioned above for your Image type.
|
2022-08-04 19:37:16 +00:00
|
|
|
|
|
2023-03-04 09:35:06 +00:00
|
|
|
|
The OpenSSL public key (.pub) is required to verify against. Although the file is
|
|
|
|
|
available on the mirror's repository, you should not trust the copy there. Download
|
|
|
|
|
it, open it up, and verify the public key matches the one from other sources. If it
|
|
|
|
|
does not, the mirror may have been hacked, or you may be the victim of a man-in-the-middle
|
2023-03-04 09:26:30 +00:00
|
|
|
|
attack. Some other sources to get the public key from include:
|
2022-08-04 19:37:16 +00:00
|
|
|
|
|
2023-03-04 09:26:30 +00:00
|
|
|
|
* https://pkg.opnsense.org/releases/mirror/README
|
|
|
|
|
* https://forum.opnsense.org/index.php?board=11.0
|
|
|
|
|
* https://opnsense.org/blog/
|
|
|
|
|
* https://github.com/opnsense/changelog/tree/master/community
|
|
|
|
|
* https://pkg.opnsense.org (/<FreeBSD:<version>:<architecture>/<release version>/sets/changelog.txz)
|
2022-08-04 19:37:16 +00:00
|
|
|
|
|
2023-03-04 09:35:06 +00:00
|
|
|
|
.. Note::
|
|
|
|
|
Only major release announcements for images contain the public key, and update
|
|
|
|
|
release announcements will not. i.e. 22.1 will have a copy of the public key in the release
|
2023-03-04 09:26:30 +00:00
|
|
|
|
announcement, but 22.1.9 will not.
|
2022-08-04 19:37:16 +00:00
|
|
|
|
|
2023-03-04 09:35:06 +00:00
|
|
|
|
Once you download all the required files and verify that the public key matches
|
|
|
|
|
the public key found in one of the alternate sources listed above, you can be relatively
|
|
|
|
|
confident that the key has not been tampered with. To verify the downloaded image, run
|
2023-03-04 09:26:30 +00:00
|
|
|
|
the following commands (substituting the filenames in brackets for the files you downloaded):
|
|
|
|
|
|
2023-03-06 19:18:01 +00:00
|
|
|
|
::
|
|
|
|
|
|
|
|
|
|
openssl sha256 OPNsense-<filename>.bz2
|
2023-03-04 09:26:30 +00:00
|
|
|
|
|
2023-03-06 19:18:01 +00:00
|
|
|
|
Match the checksum command output with the checksum values in the file ``OPNsense-<version>-OpenSSL-checksums-amd64.sha256``.
|
|
|
|
|
If the checksums don't match, redownload your image file.
|
2023-03-04 09:26:30 +00:00
|
|
|
|
|
2023-03-06 19:18:01 +00:00
|
|
|
|
If checksums match continue with the verification commands.
|
2023-03-04 09:26:30 +00:00
|
|
|
|
|
2023-03-06 19:18:01 +00:00
|
|
|
|
::
|
|
|
|
|
|
|
|
|
|
openssl base64 -d -in OPNsense-<filename>.sig -out /tmp/image.sig
|
|
|
|
|
openssl dgst -sha256 -verify OPNsense-<filename>.pub -signature /tmp/image.sig OPNsense-<filename>.bz2
|
2023-03-04 09:26:30 +00:00
|
|
|
|
|
|
|
|
|
|
2023-03-04 09:35:06 +00:00
|
|
|
|
If the output of the second command is “**Verified OK**”, your image file was verified
|
|
|
|
|
successfully, and its safe to install from it. Any other outputs, and you may need
|
2023-03-04 09:26:30 +00:00
|
|
|
|
to check your commands for errors, or the image file may have been compromised.
|
2022-08-04 19:37:16 +00:00
|
|
|
|
|
|
|
|
|
|
2018-01-30 10:40:13 +00:00
|
|
|
|
-------------------
|
2023-03-04 09:26:30 +00:00
|
|
|
|
Installation Media
|
2018-01-30 10:40:13 +00:00
|
|
|
|
-------------------
|
|
|
|
|
|
2023-03-04 09:35:06 +00:00
|
|
|
|
Now that you have downloaded and verified the installation image from above. You must unpack the
|
2023-03-06 19:18:01 +00:00
|
|
|
|
image file before you can write the image to disk.
|
|
|
|
|
For Unix-like OSes use the following command:
|
|
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
|
|
bzip2 -d OPNsense-<filename>.bz2
|
|
|
|
|
|
|
|
|
|
For Windows use an application like `7zip <https://www.7-zip.org/download.html>`_. The ``.bz2`` will
|
2023-03-04 09:26:30 +00:00
|
|
|
|
be removed from the end of the filename after command/applcation completes.
|
2018-01-30 10:40:13 +00:00
|
|
|
|
|
2023-03-04 09:35:06 +00:00
|
|
|
|
After unpacking the image you can create the installation media. The easiest method to install
|
2023-03-06 19:18:01 +00:00
|
|
|
|
OPNsense is to use the USB "`vga <https://docs.opnsense.org/manual/install.html#installation-media>`_"
|
2023-03-04 09:35:06 +00:00
|
|
|
|
Image. If your target platform has a serial console interface choose the
|
|
|
|
|
“`serial <https://docs.opnsense.org/manual/install.html#installation-media>`_” image. If you
|
2023-03-04 09:26:30 +00:00
|
|
|
|
need to know more about using the serial console interface, consult the :doc:`serial access how-to<how-tos/serial_access>`.
|
2018-01-30 10:40:13 +00:00
|
|
|
|
|
2023-03-04 09:35:06 +00:00
|
|
|
|
Write the image to a USB flash drive (>=1 GB) or hard disk, using either dd for Unix-like
|
|
|
|
|
OSes and for Windows use physdiskwrite, `Etcher <https://www.balena.io/etcher#download-etcher>`_,
|
2023-03-04 09:26:30 +00:00
|
|
|
|
or `Rufus <https://rufus.ie/>`_.
|
2018-01-30 10:40:13 +00:00
|
|
|
|
|
|
|
|
|
|
2022-01-25 15:27:28 +00:00
|
|
|
|
**FreeBSD**
|
2018-01-30 10:40:13 +00:00
|
|
|
|
::
|
|
|
|
|
|
2023-03-04 09:26:30 +00:00
|
|
|
|
dd if=OPNsense-##.#.##-[Type]-[Architecture].img of=/dev/daX bs=16k
|
2018-01-30 10:40:13 +00:00
|
|
|
|
|
|
|
|
|
Where X = the device number of your USB flash drive (check ``dmesg``)
|
|
|
|
|
|
|
|
|
|
**OpenBSD**
|
|
|
|
|
::
|
|
|
|
|
|
|
|
|
|
dd if=OPNsense-##.#.##-[Type]-[Architecture].img of=/dev/rsd6c bs=16k
|
|
|
|
|
|
|
|
|
|
The device must be the ENTIRE device (in Windows/DOS language: the 'C'
|
|
|
|
|
partition), and a raw I/O device (the 'r' in front of the device "sd6"),
|
|
|
|
|
not a block mode device.
|
|
|
|
|
|
2023-03-04 09:26:30 +00:00
|
|
|
|
**Linux**
|
|
|
|
|
::
|
|
|
|
|
|
|
|
|
|
sudo dd if=OPNsense-##.#.##-[Type]-[Architecture].img of=/dev/sdX bs=16k
|
|
|
|
|
|
|
|
|
|
where X = the IDE device name of your USB flash drive (check with hdparm -i /dev/sdX)
|
|
|
|
|
(ignore the warning about trailing garbage - it's because of the digital signature)
|
2018-01-30 10:40:13 +00:00
|
|
|
|
|
2023-03-04 09:26:30 +00:00
|
|
|
|
**macOS**
|
2018-01-30 10:40:13 +00:00
|
|
|
|
::
|
|
|
|
|
|
2023-03-04 09:26:30 +00:00
|
|
|
|
sudo dd if=OPNsense-##.#.##-[Type]-[Architecture].img of=/dev/rdiskX bs=64k
|
2018-01-30 10:40:13 +00:00
|
|
|
|
|
|
|
|
|
where r = raw device, and where X = the disk device number of your CF
|
|
|
|
|
card (check Disk Utility) (ignore the warning about trailing garbage -
|
|
|
|
|
it's because of the digital signature)
|
|
|
|
|
|
|
|
|
|
**Windows**
|
|
|
|
|
::
|
|
|
|
|
|
2023-03-04 09:26:30 +00:00
|
|
|
|
physdiskwrite -u OPNsense-##.#.##-[Type]-[Architecture].img
|
2018-01-30 10:40:13 +00:00
|
|
|
|
|
|
|
|
|
(use v0.3 or later!)
|
|
|
|
|
|
2023-03-04 09:26:30 +00:00
|
|
|
|
-------------------------
|
|
|
|
|
System Boot Preparation
|
|
|
|
|
-------------------------
|
|
|
|
|
|
|
|
|
|
After preparing the installation media, we need to make sure we can access the console
|
2023-03-04 09:35:06 +00:00
|
|
|
|
(either via keyboard and [virtual]monitor or :doc:`serial connectivity<how-tos/serial_access>`). Next we need to know
|
|
|
|
|
how to access the boot menu or the system bios (UEFI) to boot from the installation media. Most times will be a function
|
|
|
|
|
(F#), Del, or ESC key that needs to pressed immediately after powering on (or rebooting) the system. Usually within the
|
2023-03-04 09:26:30 +00:00
|
|
|
|
first 2 to 3 seconds from powering up.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. Tip::
|
|
|
|
|
|
|
|
|
|
OPNsense devices from the `OPNsense shop <https://shop.opnsense.com/>`__ use :code:`<ESC>` to enter the bios and boot selection
|
|
|
|
|
options.
|
|
|
|
|
|
|
|
|
|
.. Note::
|
|
|
|
|
|
|
|
|
|
Serial connectivity settings for DECXXXX devices can be found :doc:`here </hardware/serial_connectivity>`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-------------------------
|
|
|
|
|
Installation Instructions
|
|
|
|
|
-------------------------
|
|
|
|
|
|
|
|
|
|
|
2018-01-30 10:40:13 +00:00
|
|
|
|
.. rubric:: Install Instructions
|
|
|
|
|
:name: install-to-system
|
|
|
|
|
|
2023-03-04 09:35:06 +00:00
|
|
|
|
OPNsense installation boot process allows us to run several optional configuration steps. The
|
|
|
|
|
boot process was designed to always boot into the live environment, allowing us to access the
|
2023-03-04 09:26:30 +00:00
|
|
|
|
GUI or even SSH directly. If a timeout was missed, restart the boot procedure.
|
2018-01-30 10:40:13 +00:00
|
|
|
|
|
|
|
|
|
OPNsense Importer
|
|
|
|
|
-----------------
|
2023-03-04 09:35:06 +00:00
|
|
|
|
All Full Images have the OPNsense Importer feature that offers flexibility in
|
|
|
|
|
recovering failed firewalls, testing new releases without overwriting the current
|
|
|
|
|
installation by running the new version in memory with the existing configuration
|
|
|
|
|
or migrating configurations to new hardware installations. Using Importer is slightly
|
|
|
|
|
different between previous installs with existing configurations on disk vs new
|
2023-03-04 09:26:30 +00:00
|
|
|
|
installations/migrations.
|
|
|
|
|
|
|
|
|
|
For systems that have OPNsense installed, and the configuration intact. Here is the process:
|
|
|
|
|
|
|
|
|
|
#. Boot the system with installation media
|
2023-03-04 09:35:06 +00:00
|
|
|
|
#. Press any key when you see **“Press any key to start the configuration importer”**.
|
2023-03-04 09:26:30 +00:00
|
|
|
|
|
2023-03-06 19:18:01 +00:00
|
|
|
|
#. If you see OPNsense logo you have past the Importer and will need to reboot.
|
2023-03-04 09:35:06 +00:00
|
|
|
|
|
2023-03-04 09:26:30 +00:00
|
|
|
|
#. Type the device name of the existing drive that contains the configuration and press enter.
|
2023-03-06 19:18:01 +00:00
|
|
|
|
#. If Importer is successful, the boot process will continue into the Live environment using the stored configuration on disk.
|
|
|
|
|
#. If Importer was unsuccessful, we will returned to the device selection prompt. Confirm the
|
|
|
|
|
device name is correct and try again. Otherwise, there maybe possible disk corruption and
|
|
|
|
|
restoring from backup.
|
2018-01-30 10:40:13 +00:00
|
|
|
|
|
2023-03-04 09:35:06 +00:00
|
|
|
|
At this point the system will boot up with a fully functional firewall in Live enironment using existing configuration
|
2023-03-04 09:26:30 +00:00
|
|
|
|
but will not overwrite the previous installation. Use this feature for safely previewing or testing upgrades.
|
2018-01-30 10:40:13 +00:00
|
|
|
|
|
2023-03-04 09:26:30 +00:00
|
|
|
|
For New installations/migrations follow this process:
|
|
|
|
|
|
|
|
|
|
#. We must have a 2nd USB drive formatted with FAT or FAT32 File system.
|
|
|
|
|
|
2023-03-06 19:18:01 +00:00
|
|
|
|
#. Preferable non-bootable USB drive.
|
2023-03-04 09:35:06 +00:00
|
|
|
|
|
2023-03-04 09:26:30 +00:00
|
|
|
|
#. Create a **conf** directory on the root of the USB drive
|
2023-03-06 19:18:01 +00:00
|
|
|
|
#. Place an *unencrypted* <downloaded backup>.xml into /conf and rename the file to **config.xml** (:code:`/conf/config.xml`)
|
2023-03-04 09:35:06 +00:00
|
|
|
|
#. Put both the Installation media and the 2nd USB drive into the system and power up / reboot.
|
2023-03-04 09:26:30 +00:00
|
|
|
|
#. Boot the system from the OPNsense Installation media via Boot Menu or BIOS (UEFI).
|
|
|
|
|
#. Press aany key when you see: **“Press any key to start the configuration importer”**
|
2023-03-06 19:18:01 +00:00
|
|
|
|
#. Type the device name of the 2nd USB Drive, e.g. `da0` or `nvd0` , and press Enter.
|
2023-03-04 09:26:30 +00:00
|
|
|
|
|
2023-03-06 19:18:01 +00:00
|
|
|
|
#. If Importer is successful, the boot process will continue into the Live environment using
|
|
|
|
|
the configuration stored on the USB drive.
|
|
|
|
|
#. If unsuccessful, importer will error and return us to the device selection prompt. Suggest
|
|
|
|
|
repeating steps 1-3 again.
|
2023-03-04 09:26:30 +00:00
|
|
|
|
|
|
|
|
|
Live Environment
|
2018-01-30 10:40:13 +00:00
|
|
|
|
----------------
|
2023-03-04 09:26:30 +00:00
|
|
|
|
..
|
|
|
|
|
Should we state the ability to manually identify network adapters before entering the live environment?
|
2018-06-14 09:48:04 +00:00
|
|
|
|
|
2023-03-04 09:26:30 +00:00
|
|
|
|
.. image:: ./images/opnsense_liveenv.png
|
2018-06-14 09:48:04 +00:00
|
|
|
|
|
2023-03-04 09:35:06 +00:00
|
|
|
|
After booting with an OPNsense Full Image (DVD, VGA, Serial), the firewall will
|
|
|
|
|
be in the Live environment with and without the use of OPNsense Importer. We
|
2023-03-04 09:26:30 +00:00
|
|
|
|
can interact with the Live environment via Local Console, GUI (HTTPS), or SSH.
|
2018-06-13 11:39:47 +00:00
|
|
|
|
|
2023-03-06 19:18:01 +00:00
|
|
|
|
By default, we can log into the shell using the user :code:`root` with the password
|
|
|
|
|
:code:`opnsense` to operate the live environment via the local console.
|
2018-06-13 11:39:47 +00:00
|
|
|
|
|
2023-03-06 19:18:01 +00:00
|
|
|
|
The GUI is accessible at `https://192.168.1.1/ <https://192.168.1.1/>`__ using Username:
|
|
|
|
|
:code:`root` Password: :code:`opnsense` by default (unless a previous configuration was imported).
|
2023-03-04 09:26:30 +00:00
|
|
|
|
|
2023-03-06 19:18:01 +00:00
|
|
|
|
Using SSH we can access the firewall at IP **192.168.1.1** . Both the **root** and **installer**
|
|
|
|
|
users are available with the password specified above.
|
2023-03-04 09:26:30 +00:00
|
|
|
|
|
|
|
|
|
.. Note::
|
2023-03-04 09:35:06 +00:00
|
|
|
|
That the installation media is read-only, which means your current live configuration will
|
2023-03-04 09:26:30 +00:00
|
|
|
|
be lost after reboot.
|
2018-01-30 10:40:13 +00:00
|
|
|
|
|
2023-03-13 19:51:26 +00:00
|
|
|
|
Continue to `OPNsense Installer`_ to install OPNsense to the local storage device.
|
2018-01-30 10:40:13 +00:00
|
|
|
|
|
2023-03-04 09:26:30 +00:00
|
|
|
|
OPNsense Installer
|
|
|
|
|
---------------------
|
2018-01-30 10:40:13 +00:00
|
|
|
|
.. Note::
|
|
|
|
|
To invoke the installer login with user **installer** and password
|
|
|
|
|
**opnsense**
|
|
|
|
|
|
2023-03-04 09:35:06 +00:00
|
|
|
|
After successfully booting up with the OPNsense Full Image (DVD, VGA, Serial),
|
|
|
|
|
the firewall will be at the Live Environment's login: prompt. To start the
|
|
|
|
|
installation process, login with the user ``installer`` and password ``opnsense``.
|
|
|
|
|
If Importer was used to import an existing configuration, the installer and root
|
|
|
|
|
user password would be the root password from the imported configuration.
|
2023-03-04 09:26:30 +00:00
|
|
|
|
|
2023-03-04 09:35:06 +00:00
|
|
|
|
If the installer user does not work, log in as user root and select: ``8) Shell``
|
|
|
|
|
from the menu and type ``opnsense-installer``. The ``opnsense-importer`` can also
|
2023-03-04 09:26:30 +00:00
|
|
|
|
be run this way should you require to rerun the import.
|
|
|
|
|
|
|
|
|
|
The installer can always be run to clone an existing system, even for Nano
|
|
|
|
|
images. This can be useful for creating live backups for later recovery.
|
|
|
|
|
|
2018-01-30 10:40:13 +00:00
|
|
|
|
.. Tip::
|
2023-03-04 09:26:30 +00:00
|
|
|
|
The installer can also be started from an inside host using ssh. Default ip
|
|
|
|
|
address is ``192.168.1.1``
|
|
|
|
|
|
|
|
|
|
The installation process involves the following steps:
|
|
|
|
|
|
|
|
|
|
#. Keymap selection - The default configuration should be fine for most Occasions.
|
2023-03-04 09:35:06 +00:00
|
|
|
|
#. Install (UFS|ZFS) - Choose UFS or ZFS filesystem. ZFS is in most cases the best option
|
2023-03-04 09:26:30 +00:00
|
|
|
|
as it is the most reliable option, but it does require enough capacity (a couple of gigabytes at least).
|
2023-03-04 09:35:06 +00:00
|
|
|
|
#. Partitioning (ZFS) - Choose a device type. The default option (stripe) is usually acceptable
|
2023-03-04 09:26:30 +00:00
|
|
|
|
when using a single disk.
|
|
|
|
|
#. Disk Selection (ZFS) - Select the Storage device e.g. ``da0`` or ``nvd0``
|
2023-03-04 09:35:06 +00:00
|
|
|
|
#. Last Chance! - Select Yes to continue with partitioning and to format the disk. However, doing
|
2023-03-04 09:26:30 +00:00
|
|
|
|
so will **destroy** the contents of the disk.
|
2023-03-04 09:35:06 +00:00
|
|
|
|
#. Continue with recommended swap (UFS) - Yes is usually fine here unless the install target
|
2023-03-04 09:26:30 +00:00
|
|
|
|
is very small (< 16GB)
|
|
|
|
|
#. Select Root Password - Change and confirm the new root password
|
2023-03-04 09:35:06 +00:00
|
|
|
|
#. Select Complete Install - Exits the installer and reboots the machine. The system is now installed
|
2023-03-04 09:26:30 +00:00
|
|
|
|
and ready for initial configuration.
|
2023-03-06 19:18:01 +00:00
|
|
|
|
|
2018-01-30 10:40:13 +00:00
|
|
|
|
|
|
|
|
|
.. Warning::
|
|
|
|
|
You will lose all files on the installation disk. If another disk is to be
|
|
|
|
|
used then choose a Custom installation instead of the Quick/Easy Install.
|
|
|
|
|
|
2023-03-04 09:26:30 +00:00
|
|
|
|
Nano Image
|
|
|
|
|
----------
|
|
|
|
|
|
|
|
|
|
To use the nano image follow this process:
|
|
|
|
|
|
2023-03-13 19:51:26 +00:00
|
|
|
|
#. Create the system disk with using the nano image. See `Installation Media`_
|
2023-03-04 09:26:30 +00:00
|
|
|
|
how to write the nano image to disk.
|
|
|
|
|
#. Install the system disk drive into the system.
|
|
|
|
|
#. Configure the system (BIOS) to boot from this disk.
|
|
|
|
|
#. After the system boots, the firewall is ready to be configured.
|
|
|
|
|
|
2023-03-06 19:18:01 +00:00
|
|
|
|
Using the nano image for embedded systems, your firewall is already up and running. The configuration
|
2023-03-04 09:35:06 +00:00
|
|
|
|
settings to enable Memory Disks (RAM disks) that minimize write cycles to relevant partitions by
|
2023-03-04 09:26:30 +00:00
|
|
|
|
mounting these partitions in system memory and reporting features are disabled by default.
|
|
|
|
|
|
2018-01-30 10:40:13 +00:00
|
|
|
|
---------------------
|
2023-03-04 09:26:30 +00:00
|
|
|
|
Initial Configuration
|
2018-01-30 10:40:13 +00:00
|
|
|
|
---------------------
|
|
|
|
|
After installation the system will prompt you for the interface
|
|
|
|
|
assignment, if you ignore this then default settings are applied.
|
|
|
|
|
Installation ends with the login prompt.
|
|
|
|
|
|
|
|
|
|
By default you have to log in to enter the console.
|
|
|
|
|
|
|
|
|
|
**Welcome message**
|
|
|
|
|
::
|
|
|
|
|
|
|
|
|
|
* * * Welcome to OPNsense [OPNsense 15.7.25 (amd64/OpenSSL) on OPNsense * * *
|
|
|
|
|
|
2018-02-04 12:11:03 +00:00
|
|
|
|
WAN (em1) -> v4/DHCP4: 192.168.2.100/24
|
2018-01-30 10:40:13 +00:00
|
|
|
|
LAN (em0) -> v4: 192.168.1.1/24
|
|
|
|
|
|
|
|
|
|
FreeBSD/10.1 (OPNsense.localdomain) (ttyv0)
|
|
|
|
|
|
|
|
|
|
login:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. TIP::
|
|
|
|
|
|
|
|
|
|
A user can login to the console menu with his
|
|
|
|
|
credentials. The default credentials after a fresh install are username "root"
|
|
|
|
|
and password "opnsense".
|
|
|
|
|
|
|
|
|
|
VLANs and assigning interfaces
|
|
|
|
|
If choose to do manual interface assignment or when no config file can be
|
|
|
|
|
found then you are asked to assign Interfaces and VLANs. VLANs are optional.
|
2018-11-08 19:59:18 +00:00
|
|
|
|
If you do not need VLANs then choose **no**. You can always configure
|
|
|
|
|
VLANs at a later time.
|
2018-01-30 10:40:13 +00:00
|
|
|
|
|
|
|
|
|
LAN, WAN and optional interfaces
|
|
|
|
|
The first interface is the LAN interface. Type the appropriate
|
|
|
|
|
interface name, for example "em0". The second interface is the WAN
|
|
|
|
|
interface. Type the appropriate interface name, eg. "em1" . Possible
|
|
|
|
|
additional interfaces can be assigned as OPT interfaces. If you
|
|
|
|
|
assigned all your interfaces you can press [ENTER] and confirm the
|
|
|
|
|
settings. OPNsense will configure your system and present the login
|
|
|
|
|
prompt when finished.
|
|
|
|
|
|
|
|
|
|
Minimum installation actions
|
|
|
|
|
In case of a minimum install setup (i.e. on CF cards), OPNsense can
|
2021-03-18 07:23:56 +00:00
|
|
|
|
be run with all standard features, except for the ones that require
|
2018-01-30 10:40:13 +00:00
|
|
|
|
disk writes, e.g. a caching proxy like Squid. Do not create a swap
|
2019-03-08 08:31:58 +00:00
|
|
|
|
slice, but a RAM Disk instead. In the GUI enable :menuselection:`System --> Settings --> Miscellaneous --> RAM Disk Settings`
|
2018-01-30 10:40:13 +00:00
|
|
|
|
and set the size to 100-128 MB or more, depending on your available RAM.
|
|
|
|
|
Afterwards reboot.
|
|
|
|
|
|
|
|
|
|
**Enable RAM disk manually**
|
|
|
|
|
|
|
|
|
|
.. image:: ./images/Screenshot_Use_RAMdisks.png
|
2018-07-31 14:51:11 +00:00
|
|
|
|
:width: 100%
|
2018-01-30 10:40:13 +00:00
|
|
|
|
|
|
|
|
|
Then via console, check your /etc/fstab and make sure your primary
|
|
|
|
|
partition has **rw,noatime** instead of just **rw**.
|
|
|
|
|
|
|
|
|
|
.. rubric:: Console
|
|
|
|
|
:name: console
|
|
|
|
|
|
|
|
|
|
The console menu shows 13 options.
|
|
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
|
|
0) Logout 7) Ping host
|
|
|
|
|
1) Assign interfaces 8) Shell
|
|
|
|
|
2) Set interface(s) IP address 9) pfTop
|
|
|
|
|
3) Reset the root password 10) Filter logs
|
|
|
|
|
4) Reset to factory defaults 11) Restart web interface
|
|
|
|
|
5) Reboot system 12) Upgrade from console
|
|
|
|
|
6) Halt system 13) Restore a configuration
|
|
|
|
|
|
|
|
|
|
Table: *The console menu*
|
|
|
|
|
|
|
|
|
|
.. rubric:: opnsense-update
|
|
|
|
|
:name: opnsense-update
|
|
|
|
|
|
|
|
|
|
OPNsense features a command line
|
|
|
|
|
interface (CLI) tool "opnsense-update". Via menu option **8) Shell**, the user can
|
|
|
|
|
get to the shell and use opnsense-update.
|
|
|
|
|
|
2019-02-21 14:35:54 +00:00
|
|
|
|
For help, type *man opnsense-update* and press [Enter].
|
2018-01-30 10:40:13 +00:00
|
|
|
|
|
|
|
|
|
.. rubric:: Upgrade from console
|
|
|
|
|
:name: upgrade-from-console
|
|
|
|
|
|
|
|
|
|
The other method to upgrade the system is via console option **12) Upgrade from console**
|
|
|
|
|
|
|
|
|
|
.. rubric:: GUI
|
|
|
|
|
:name: gui
|
|
|
|
|
|
2019-03-06 17:27:21 +00:00
|
|
|
|
An update can be done through the GUI via :menuselection:`System --> Firmware --> Updates`.
|
2018-01-30 10:40:13 +00:00
|
|
|
|
|
|
|
|
|
.. image:: ./images/firmware-update.png
|
2018-07-31 14:51:11 +00:00
|
|
|
|
:width: 100%
|