Initial Installation & Configuration — OPNsense documentation (2024)

Note

Just looking on how to invoke the installer? When the live environment has beenstarted just login with user installer and password opnsense.

Index

    • Architecture

    • Embedded vs Full

    • Installation Images

    • Image Filename Composition

    • Download and Verification

    • Installation Media

    • System Boot Preparation

    • Installation Instructions

      • OPNsense Importer

      • Live Environment

      • OPNsense Installer

      • Nano Image

    • Initial Configuration

Architecture

The software setup and installation of OPNsense® is availablefor the x86-64 microprocessorarchitecture only.

Embedded vs Full

OPNsense offers two Image types with all major releases: embedded and full images.The Embedded Image is intended for environments where preinstallingthe storage media is required due to a lack of local resources on the firewalllike storage, and/or console access (VGA/Serial). The image is tailored to reducewrite cycles as well, but the image can be used anywhere. Another reason for theEmbedded 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 thestorage device, and booting the system.

Full Images provide installation tools like OPNsense Importer, Live Environment,and Installer. Full Images are released to support different console/hardware installationrequirements.

Both image types can be installed and run from virtual disks (VM), SD memorycards,USB disks, solid-statedisks (SSD), or hard disk drives(HDD).

The main differences between embedded and full images are:

Embedded

Full

Writes to RAM disk

Writes to local disk

No log data retentionafter reboot

Log data retentionafter reboot

Not intended forlocal disk writes

Suitable for diskwrites.

Embedded only use,SWAP file is optional

Can enable RAM diskfor embedded mode.

Embedded image store logging and cache data in memory only, while full versionswill keep the data stored on the local drive. A full version can mimic thebehavior of an embedded version by enabling RAM disks, this is especiallyuseful for SD memory card installations.

Warning

See the chapter for further informationon hardware requirements prior to an install.

Installation Images

Depending on your hardware and use case, different installation options are available:

Type

Description

Image Type

dvd

ISO image boots into a live environment inVGA-only mode with UEFI support

Full

vga

USB image boots into a live environmentin VGA-only mode with UEFI support

Full

serial

USB image boots into live environment running inserial console (115200) mode only withUEFI support

Full

nano

Image for preinstalling onto >=4 GB USB drives,SD, or CF cards for use with embedded devicesrunning in serial console (115200) mode withsecondary VGA support (no kernel messages though)

Embedded

Note

All Full Image types can run both OPNsense Importerbefore booting into the Live environment and also runInstaller once booted into the Live environment.

Warning

Flash memory cards will only tolerate a limited number of writes and re-writes. ForNano image memory disks for /var/log and /tmp are applied bydefault to prolong CF (flash) card lifetimes.

To enable non-embedded versions: Go to System ‣ Settings ‣ Miscellaneous ‣ Disk / Memory Settings,change the setting, then reboot. Consider enabling an external syslog server as well.

Image Filename Composition

Initial Installation & Configuration — OPNsense documentation (1)

Note

Please be aware that the latest installation media does not always correspondwith the latest released version available. OPNsense installation images are providedon a scheduled basis with major release versions in January and July. More informationon our release schedule is available from our package repository, seeREADME. We are encouraged to updateOPNsense after installation to be on the latest release available, seeUpdate Page.

Download and Verification

The OPNsense distribution can be downloadedfrom one of our mirrors.

OpenSSL is used for image file verification. 4 files are needed for verification process:

Use one of the OPNsense mirrors to download these files:

  1. Go to the bottom of OPNSense 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.

The OpenSSL public key (.pub) is required to verify against. Although the file isavailable on the mirror’s repository, you should not trust the copy there. Downloadit, open it up, and verify the public key matches the one from other sources. If itdoes not, the mirror may have been hacked, or you may be the victim of a man-in-the-middleattack. Some other sources to get the public key from include:

Note

Only major release announcements for images contain the public key, and updaterelease announcements will not. i.e. 22.1 will have a copy of the public key in the releaseannouncement, but 22.1.9 will not.

Once you download all the required files and verify that the public key matchesthe public key found in one of the alternate sources listed above, you can be relativelyconfident that the key has not been tampered with. To verify the downloaded image, runthe following commands (substituting the filenames in brackets for the files you downloaded):

openssl sha256 OPNsense-<filename>.bz2

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.

If checksums match continue with the verification commands.

openssl base64 -d -in OPNsense-<filename>.<image>.sig -out /tmp/image.sigopenssl dgst -sha256 -verify OPNsense-<filename>.pub -signature /tmp/image.sig OPNsense-<filename>.<image>

Warning

Make sure to unpack the image using bunzip2 before verifying. Our signatures are generated before compressing them(as of OPNsense version 24.1)

If the output of the second command is “Verified OK”, your image file was verifiedsuccessfully, and its safe to install from it. Any other outputs, and you may needto check your commands for errors, or the image file may have been compromised.

Installation Media

Now that you have downloaded and verified the installation image from above. You must unpack theimage 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. The .bz2 willbe removed from the end of the filename after command/application completes.

After unpacking the image you can create the installation media. The easiest method to installOPNsense is to use the USB “vga”Image. If your target platform has a serial console interface choose the“serial” image. If youneed to know more about using the serial console interface, consult the serial access how-to.

Write the image to a USB flash drive (>=1 GB) or hard disk, using either dd for Unix-likeOSes and for Windows use physdiskwrite, Etcher,or Rufus.

FreeBSD

dd if=OPNsense-##.#.##-[Type]-[Architecture].img of=/dev/daX bs=16k

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.

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)

macOS

sudo dd if=OPNsense-##.#.##-[Type]-[Architecture].img of=/dev/rdiskX bs=64k

where r = raw device, and where X = the disk device number of your CFcard (check Disk Utility) (ignore the warning about trailing garbage -it’s because of the digital signature)

Windows

physdiskwrite -u OPNsense-##.#.##-[Type]-[Architecture].img

(use v0.3 or later!)

System Boot Preparation

After preparing the installation media, we need to make sure we can access the console(either via keyboard and [virtual]monitor or serial connectivity). Next we need to knowhow 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 thefirst 2 to 3 seconds from powering up.

Tip

OPNsense devices from the OPNsense shop use <ESC> to enter the bios and boot selectionoptions.

Note

Serial connectivity settings for DECXXXX devices can be found here

Installation Instructions

Install Instructions

OPNsense installation boot process allows us to run several optional configuration steps. Theboot process was designed to always boot into the live environment, allowing us to access theGUI or even SSH directly. If a timeout was missed, restart the boot procedure.

OPNsense Importer

All Full Images have the OPNsense Importer feature that offers flexibility inrecovering failed firewalls, testing new releases without overwriting the currentinstallation by running the new version in memory with the existing configurationor migrating configurations to new hardware installations. Using Importer is slightlydifferent between previous installs with existing configurations on disk vs newinstallations/migrations.

For systems that have OPNsense installed, and the configuration intact. Here is the process:

  1. Boot the system with installation media

  2. Press any key when you see “Press any key to start the configuration importer”.

    1. If you see OPNsense logo you have past the Importer and will need to reboot.

  3. Type the device name of the existing drive that contains the configuration and press enter.

  4. If Importer is successful, the boot process will continue into the Live environment using the stored configuration on disk.

  5. If Importer was unsuccessful, we will returned to the device selection prompt. Confirm thedevice name is correct and try again. Otherwise, there maybe possible disk corruption andrestoring from backup.

At this point the system will boot up with a fully functional firewall in Live enironment using existing configurationbut will not overwrite the previous installation. Use this feature for safely previewing or testing upgrades.

For New installations/migrations follow this process:

  1. We must have a 2nd USB drive formatted with FAT or FAT32 File system.

    1. Preferable non-bootable USB drive.

  2. Create a conf directory on the root of the USB drive

  3. Place an unencrypted <downloaded backup>.xml into /conf and rename the file to config.xml (/conf/config.xml)

  4. Put both the Installation media and the 2nd USB drive into the system and power up / reboot.

  5. Boot the system from the OPNsense Installation media via Boot Menu or BIOS (UEFI).

  6. Press aany key when you see: “Press any key to start the configuration importer”

  7. Type the device name of the 2nd USB Drive, e.g. da0 or nvd0 , and press Enter.

    1. If Importer is successful, the boot process will continue into the Live environment usingthe configuration stored on the USB drive.

    2. If unsuccessful, importer will error and return us to the device selection prompt. Suggestrepeating steps 1-3 again.

Live Environment

Initial Installation & Configuration — OPNsense documentation (2)

After booting with an OPNsense Full Image (DVD, VGA, Serial), the firewall willbe in the Live environment with and without the use of OPNsense Importer. Wecan interact with the Live environment via Local Console, GUI (HTTPS), or SSH.

By default, we can log into the shell using the user root with the passwordopnsense to operate the live environment via the local console.

The GUI is accessible at https://192.168.1.1/ using Username:root Password: opnsense by default (unless a previous configuration was imported).

Using SSH we can access the firewall at IP 192.168.1.1 . Both the root and installerusers are available with the password specified above.

Note

That the installation media is read-only, which means your current live configuration willbe lost after reboot.

Continue to OPNsense Installer to install OPNsense to the local storage device.

OPNsense Installer

Note

To invoke the installer login with user installer and passwordopnsense

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 theinstallation process, login with the user installer and password opnsense.If Importer was used to import an existing configuration, the installer and rootuser password would be the root password from the imported configuration.

If the installer user does not work, log in as user root and select: 8) Shellfrom the menu and type opnsense-installer. The opnsense-importer can alsobe run this way should you require to rerun the import.

The installer can always be run to clone an existing system, even for Nanoimages. This can be useful for creating live backups for later recovery.

Tip

The installer can also be started from an inside host using ssh. Default ipaddress is 192.168.1.1

The installation process involves the following steps:

  1. Keymap selection - The default configuration should be fine for most Occasions.

  2. Install (UFS|ZFS) - Choose UFS or ZFS filesystem. ZFS is in most cases the best optionas it is the most reliable option, but it does require enough capacity (a couple of gigabytes at least).

  3. Partitioning (ZFS) - Choose a device type. The default option (stripe) is usually acceptablewhen using a single disk.

  4. Disk Selection (ZFS) - Select the Storage device e.g. da0 or nvd0

  5. Last Chance! - Select Yes to continue with partitioning and to format the disk. However, doingso will destroy the contents of the disk.

  6. Continue with recommended swap (UFS) - Yes is usually fine here unless the install targetis very small (< 16GB)

  7. Select Root Password - Change and confirm the new root password

  8. Select Complete Install - Exits the installer and reboots the machine. The system is now installedand ready for initial configuration.

Warning

You will lose all files on the installation disk. If another disk is to beused then choose a Custom installation instead of the Quick/Easy Install.

Nano Image

To use the nano image follow this process:

  1. Create the system disk with using the nano image. See Installation Mediahow to write the nano image to disk.

  2. Install the system disk drive into the system.

  3. Configure the system (BIOS) to boot from this disk.

  4. After the system boots, the firewall is ready to be configured.

Using the nano image for embedded systems, your firewall is already up and running. The configurationsettings to enable Memory Disks (RAM disks) that minimize write cycles to relevant partitions bymounting these partitions in system memory and reporting features are disabled by default.

Initial Configuration

After installation the system will prompt you for the interfaceassignment, 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 * * *WAN(em1) ->v4/DHCP4: 192.168.2.100/24LAN(em0) -> v4: 192.168.1.1/24FreeBSD/10.1 (OPNsense.localdomain) (ttyv0)login:

Tip

A user can login to the console menu with hiscredentials. 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 befound then you are asked to assign Interfaces and VLANs. VLANs are optional.If you do not need VLANs then choose no. You can always configureVLANs at a later time.

LAN, WAN and optional interfaces

The first interface is the LAN interface. Type the appropriateinterface name, for example “em0”. The second interface is the WANinterface. Type the appropriate interface name, eg. “em1” . Possibleadditional interfaces can be assigned as OPT interfaces. If youassigned all your interfaces you can press [ENTER] and confirm thesettings. OPNsense will configure your system and present the loginprompt when finished.

Minimum installation actions

In case of a minimum install setup (i.e. on CF cards), OPNsense canbe run with all standard features, except for the ones that requiredisk writes, e.g. a caching proxy like Squid. Do not create a swapslice, but a RAM Disk instead. In the GUI enable System ‣ Settings ‣ Miscellaneous ‣ RAM Disk Settingsand set the size to 100-128 MB or more, depending on your available RAM.Afterwards reboot.

Enable RAM disk manually

Then via console, check your /etc/fstab and make sure your primarypartition has rw,noatime instead of just rw.

Console

The console menu shows 13 options.

0) Logout 7) Ping host1) Assign interfaces 8) Shell2) Set interface(s) IP address 9) pfTop3) Reset the root password 10) Filter logs4) Reset to factory defaults 11) Restart web interface5) Reboot system 12) Upgrade from console6) Halt system 13) Restore a configuration

Table: The console menu

opnsense-update

OPNsense features a command lineinterface (CLI) tool “opnsense-update”. Via menu option 8)Shell, the user canget to the shell and use opnsense-update.

For help, type man opnsense-update and press [Enter].

Upgrade from console

The other method to upgrade the system is via console option 12) Upgrade from console

GUI

An update can be done through the GUI via System ‣ Firmware ‣ Updates.

Initial Installation & Configuration — OPNsense  documentation (2024)

FAQs

What is the default setup for OPNsense? ›

By default the system will be configured with 2 interfaces LAN & WAN. The first network port found will be configured as LAN and the second will be WAN. The WAN port will have a dhcp client and expects to be assigned an IP adress. The LAN port will have a dhcp server, a static ip of 192.168.

What is the initial login for OPNsense? ›

User Login

The default user is root and the password is opnsense.

What is the default root password for OPNsense? ›

The default credentials after a fresh install are username “root” and password “opnsense”. 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.

What do I install OPNsense on? ›

OPNsense® is available for x86-64 (amd64) bit microprocessor architectures. Full installs on SD memory cards, solid-state disks (SSD) or hard disk drives (HDD) are intended for OPNsense.

What is default configuration settings? ›

Default configurations are sample configurations that are available in the application. Users can use the default configurations as they are or can create a copy and modify them according to their business needs.

Which is easier, OPNsense or pfSense? ›

If you're new to networking or basic firewall management, OPNsense's focus on a modern, user-friendly web user interface might make it easier to start. On the other hand, pfSense's extensive documentation and community support can help overcome its steeper learning curve.

What is the root user of OPNsense? ›

The username is "root" by default, and the password is the one you selected during the installation procedure or the default password "OPNsense" on the OPNsense firewall.

Can I SSH into OPNsense? ›

User accounts can be used for logging in to the web frontend, as well as for logging in to the console (via VGA, serial or SSH). The latter will only work if the user shell is not set to /sbin/nologin .

What is the default port of OPNsense? ›

By default, LAN is assigned to port 0 and WAN is assigned to port 1. Assignments can be changed by going to Interfaces ‣ Assignments. This lists existing interfaces, with the interface name on the left and the physical port selected in the dropdown.

How to reset opnsense password? ›

You can also use the installer to reset the password, use the Password Reset - Recover Installation option in the installer after the keymap selection.
  1. Step 1 : power. ...
  2. Step 2 : console. ...
  3. Step 3 : boot single. ...
  4. Step 4: password reset.

How do I know if my root password is locked? ›

To check if the root account is locked, complete the following while in single user mode. Note: Running the passwd command from the steps above will unlock the root account, so this step not required if passwd has already been run. Type passwd -S root to determine if the root account is locked.

What is the default root user ID? ›

The root account is the special user in the /etc/passwd file with the user ID (UID) of 0 and is commonly given the user name, root. It is not the user name that makes the root account so special, but the UID value of 0 . This means that any user that has a UID of 0 also has the same privileges as the root user.

Does OPNsense act as a router? ›

So in other words, OPNsense acts as a router via the public 1.2. 3.2/29 address and as a firewall for the /28 public addresses.

How many cores can OPNsense use? ›

We recommend at least dual core (preferable 4 core if you also host database on the firewall) cpu system.

Is OPNsense secure by default? ›

While OPNsense is secure by default, you can further enhance its security. In this article, we outline the importance of firewall security hardening and how you can increase the security of your firewall by applying the best practices for the OPNsense platform.

What is the default WAN interface in OPNsense? ›

By default, LAN is assigned to port 0 and WAN is assigned to port 1. Assignments can be changed by going to Interfaces ‣ Assignments. This lists existing interfaces, with the interface name on the left and the physical port selected in the dropdown.

What is the default GUI port of OPNsense? ›

Re: Access to Opnsense GUI without specifying the port

Whenever you omit the port number, your browser will use the default - 443.

What is MikroTik default configuration? ›

The default IP address 192.168. 88.1/24 is set on the bridge interface. There are two possible options - CPE and AP. For CPE wireless interface is set in "station-bridge" mode, and for AP "bridge" mode is used. W60G Bridge - This configuration type is applied to routers that have a 60 GHz point-to-point link.

What is the default config reg for cisco? ›

The factory-default setup for the configuration register is 0x2102. This indicates that the router must attempt to load a Cisco IOS® software image from Flash memory, and load the startup configuration. Note: The command config-register cannot change the console baud rate.

Top Articles
Factors Affecting Speed (GCSE Physics) - Study Mind
Lowball: Meaning, Example, and Consequences
English Bulldog Puppies For Sale Under 1000 In Florida
Katie Pavlich Bikini Photos
Gamevault Agent
Pieology Nutrition Calculator Mobile
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Compare the Samsung Galaxy S24 - 256GB - Cobalt Violet vs Apple iPhone 16 Pro - 128GB - Desert Titanium | AT&T
Vardis Olive Garden (Georgioupolis, Kreta) ✈️ inkl. Flug buchen
Craigslist Dog Kennels For Sale
Things To Do In Atlanta Tomorrow Night
Non Sequitur
Crossword Nexus Solver
How To Cut Eelgrass Grounded
Pac Man Deviantart
Alexander Funeral Home Gallatin Obituaries
Energy Healing Conference Utah
Geometry Review Quiz 5 Answer Key
Hobby Stores Near Me Now
Icivics The Electoral Process Answer Key
Allybearloves
Bible Gateway passage: Revelation 3 - New Living Translation
Yisd Home Access Center
Pearson Correlation Coefficient
Home
Shadbase Get Out Of Jail
Gina Wilson Angle Addition Postulate
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Walmart Pharmacy Near Me Open
Marquette Gas Prices
A Christmas Horse - Alison Senxation
Ou Football Brainiacs
Access a Shared Resource | Computing for Arts + Sciences
Vera Bradley Factory Outlet Sunbury Products
Pixel Combat Unblocked
Movies - EPIC Theatres
Cvs Sport Physicals
Mercedes W204 Belt Diagram
Mia Malkova Bio, Net Worth, Age & More - Magzica
'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
Teenbeautyfitness
Where Can I Cash A Huntington National Bank Check
Topos De Bolos Engraçados
Sand Castle Parents Guide
Gregory (Five Nights at Freddy's)
Grand Valley State University Library Hours
Hello – Cornerstone Chapel
Stoughton Commuter Rail Schedule
Nfsd Web Portal
Selly Medaline
Latest Posts
Article information

Author: Laurine Ryan

Last Updated:

Views: 6447

Rating: 4.7 / 5 (57 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Laurine Ryan

Birthday: 1994-12-23

Address: Suite 751 871 Lissette Throughway, West Kittie, NH 41603

Phone: +2366831109631

Job: Sales Producer

Hobby: Creative writing, Motor sports, Do it yourself, Skateboarding, Coffee roasting, Calligraphy, Stand-up comedy

Introduction: My name is Laurine Ryan, I am a adorable, fair, graceful, spotless, gorgeous, homely, cooperative person who loves writing and wants to share my knowledge and understanding with you.