OPNsense router firewall with Atom 2 core C2358 with 4 GigaBit ports
OPNsense® includes most of the features available in expensive commercial firewalls, and more in many cases. Below is a list of features of the current OPNsense release. All of these things are possible in the modern graphical user interface, without touching anything at the command line. The gui is created using the great Bootstrap framework. For screenshots, check here.
Stateful inspection firewall *
A stateful firewall is a firewall that keeps track of the state of network connections (such as TCP streams, UDP communication) traveling across it. The firewall is programmed to distinguish legitimate packets for different types of connections. Only packets matching a known active connection will be allowed by the firewall; others will be rejected. More information can be found in this wiki.
- Filtering by source and destination IP, IP protocol, source and destination port for TCP and UDP traffic
- Able to limit simultaneous connections on a per-rule basis
- OPNsense utilizes p0f, an advanced passive OS/network fingerprinting utility to allow you to filter by the Operating System initiating the connection.Want to allow FreeBSD and Linux machines to the Internet, but block Windows machines? OPNsense can do so (amongst many other possibilities) by passively detecting the Operating System in use.
- Option to log or not log traffic matching each rule.
- Highly flexible policy routing possible by selecting gateway on a per-rule basis (for load balancing, failover, multiple WAN)
- Aliases allow grouping and naming of IPs, networks and ports. This helps keep your firewall ruleset clean and easy to understand, in environments with multiple public IPs and numerous servers.
- Transparent layer 2 firewalling capable – can bridge interfaces and filter traffic between them, even allowing for an IP-less firewall (though you probably want an IP for management purposes).
- Layer7 protocol filtering
- Packet normalization, so there are no ambiguities in interpretation by the ultimate destination of the packet. The scrub directive also reassembles fragmented packets, protecting some operating systems from some forms of attack, and drops TCP packets that have invalid flag combinations.
- Enabled in OPNsense by default.
- Can disable if necessary. This option causes problems for some NFS implementations, but is safe and should be left enabled on most installations
- Disable filter – you can turn off the firewall filter entirely if you wish to turn OPNsense into a pure router.
Granular control over state table *
The firewall’s state table maintains information on your open network connections. OPNsense is a stateful firewall, by default all rules are stateful. Most firewalls lack the ability to finely control your state table. OPNsense has numerous features allowing granular control of your state table, thanks to the abilities of OpenBSD’s pf.
- Adjustable state table size – there are multiple production OPNsense installations using several hundred thousand states. The default state table size is 10,000, but it can be increased on the fly to your desired size. Each state takes approximately 1 KB of RAM, so keep in mind memory usage when sizing your state table.
- On a per-rule basis:
- Limit simultaneous client connections
- Limit states per host
- Limit new connections per second
- Define state timeout
- Define state type
- State types – OPNsense offers multiple options for state handling.
- Keep state – Works with all protocols. Default for all rules.
- Sloppy state – Works with all protocols. Less strict state tracking, useful in cases of asymmetric routing.
- Modulate state – Works only with TCP. OPNsense will generate strong Initial Sequence Numbers (ISNs) on behalf of the host.
- Synproxy state – Proxies incoming TCP connections to help protect servers from spoofed TCP SYN floods. This option includes the functionality of keep state and modulate state combined.
- None – Do not keep any state entries for this traffic. This is very rarely desirable, but is available because it can be useful under some limited circumstances.
- State table optimization options – pf offers four options for state table optimization.
- Normal – the default algorithm o High latency – Useful for high latency links, such as satellite connections. Expires idle connections later than normal.
- High latency – Useful for high latency links, such as satellite connections. Expires idle connections later than normal.
- Aggressive – Expires idle connections more quickly. More efficient use of hardware resources, but can drop legitimate connections.
- Conservative – Tries to avoid dropping legitimate connections at the expense of increased memory usage and CPU utilization.
Network Address Translation (NAT) *
Network address translation (NAT) is a methodology of modifying network address information in Internet Protocol (IP) datagram packet headers while they are in transit across a traffic routing device for the purpose of remapping one IP address space into another. More information can be found in this wiki.
- Port forwards including ranges and the use of multiple public IPs
- 1:1 NAT for individual IPs or entire subnets.
- Outbound NAT
- Default settings NAT all outbound traffic to the WAN IP. In multiple WAN scenarios, the default settings NAT outbound traffic to the IP of the WAN interface being used.
- Advanced Outbound NAT allows this default behavior to be disabled, and enables the creation of very flexible NAT (or no NAT) rules.
- NAT Reflection – NAT reflection is possible so services can be accessed by public IP from internal networks.
PPTP / GRE Limitation – The state tracking code in pf for the GRE protocol can only track a single session per public IP per external server. This means if you use PPTP VPN connections, only one internal machine can connect simultaneously to a PPTP server on the Internet. A thousand machines can connect simultaneously to a thousand different PPTP servers, but only one simultaneously to a single server. The only available work around is to use multiple public IPs on your firewall, one per client, or to use multiple public IPs on the external PPTP server. This is not a problem with other types of VPN connections. PPTP is insecure and should no longer be used.
Traffic Shaper *
Traffic shaping (also known as “packet shaping”) is the control of computer network traffic in order to optimize or guarantee performance, lower latency, and/or increase usable bandwidth by delaying packets that meet certain criteria. More specifically, traffic shaping is any action on a set of packets (often called a stream or a flow), which imposes additional delay on those packets such that they conform to some predetermined constraint (a contract or traffic profile).
Captive portal *
Captive Portal allows you to force authentication, or redirection to a click through page for network access. This is commonly used on hot spot networks, but is also widely used in corporate networks for an additional layer of security on wireless or Internet access. For more information on captive portal technology in general, see the Wikipedia article on the topic. The following is a list of features in the OPNsense Captive Portal.
- Maximum concurrent connections – Limit the number of connections to the portal itself per client IP. This feature prevents a denial of service from client PCs sending network traffic repeatedly without authenticating or clicking through the splash page.
- Idle timeout – Disconnect clients who are idle for more than the defined number of minutes.
- Hard timeout – Force a disconnect of all clients after the defined number of minutes.
- Logon pop up window – Option to pop up a window with a log off button.
- URL Redirection after authenticating or clicking through the captive portal, users can be forcefully redirected to the defined URL.
- MAC filtering – by default, OPNsense filters using MAC addresses. If you have a subnet behind a router on a captive portal enabled interface, every machine behind the router will be authorized after one user is authorized. MAC filtering can be disabled for these scenarios.
- Authentication options – There are three authentication options available.
- No authentication – This means the user just clicks through your portal page without entering credentials.
- Local user manager – A local user database can be configured and used for authentication.
- RADIUS authentication – This is the preferred authentication method for corporate environments and ISPs. It can be used to authenticate from Microsoft Active Directory and numerous other RADIUS servers.
- RADIUS capabilities o Forced re-authentication
- Able to send Accounting updates.
- RADIUS MAC authentication allows captive portal to authenticate to a RADIUS server using the client’s MAC address as the user name and password.
- Allows configuration of redundant RADIUS servers.
- HTTP or HTTPS – The portal page can be configured to use either HTTP or HTTPS.
- Pass-through MAC and IP addresses – MAC and IP addresses can be white listed to bypass the portal. Any machines with NAT port forwards will need to be bypassed so the reply traffic does not hit the portal. You may wish to exclude some machines for other reasons.
- File Manager – This allows you to upload images for use in your portal pages.
- Voucher support
- Multi-interface capable
- Multiple Captive Portal RADIUS authentication sources (e.g. one for users, one for cards)
“Reverse” portal, i.e. capturing traffic originating from the Internet and entering your network, is not possible.
Only entire IP and MAC addresses can be excluded from the portal, not individual protocols and ports.
802.1Q VLAN support *
VLANs are virtual LAN segments of a managed switch, and when OPNsense is plugged into a trunk port it can utilize VLANs to have multiple virtual interfaces, one for each available VLAN. In this manner, you can have OPNsense talk to a large number of networks without the need for more physical interfaces.
More information about VLAN’s in this wiki.
Virtual Private Network *
A virtual private network (VPN) extends a private network across a public network, such as the Internet. It enables a computer to send and receive data across shared or public networks as if it is directly connected to the private network, while benefiting from the functionality, security and management policies of the private network.
More information can be found in this wiki.
OPNsense offers three options for VPN connectivity, IPsec, OpenVPN, and PPTP:
IPsec allows connectivity with any device supporting standard IPsec. This is most commonly used for site to site connectivity to other OPNsense installations, other open source firewalls (m0n0wall, etc.), and most all commercial firewall solutions (Cisco, Juniper, etc.). It can also be used for mobile client connectivity.
OpenVPN is a flexible, powerful SSL VPN solution supporting a wide range of client operating systems. See the OpenVPN website for details on its abilities.
PPTP is a popular VPN option because nearly every OS has a built in PPTP client, including every Windows release since Windows 95 OSR2. See this Wikipedia article for more information on the PPTP protocol. The OPNsense PPTP Server can use a local user database, or a RADIUS server for authentication. RADIUS accounting is also supported. Firewall rules on the PPTP interface control traffic initiated by PPTP clients. PPTP is not considered secure anymore and it is advised to migrate to other types of VPN connections.
Because of limitations in pf NAT, when the PPTP Server is enabled, PPTP clients cannot use the same public IP for outbound PPTP connections. This means if you have only one public IP, and use the PPTP Server, PPTP clients inside your network will not work. The workaround is to use a second public IP with Advanced Outbound NAT for your internal clients. See also the PPTP limitation under NAT on this page.
Dynamic Domain Name System *
Dynamic DNS (DDNS) is a method of automatically updating a name server in the Domain Name System (DNS), often in real time, with the active DNS configuration of its configured hostnames, addresses or other information. For more information see this wiki.
A Dynamic DNS client is included to allow you to register your public IP with a number of dynamic DNS service providers.
- Custom – allowing defining update method for providers not specifically listed here.
- Route 53
- A client is also available for RFC 2136 dynamic DNS updates, for use with DNS servers like BIND which support this means of updating.
High Availability *
The Common Address Redundancy Protocol or CARP is a protocol which allows multiple hosts on the same local network to share a set of IP addresses. Its primary purpose is to provide failover redundancy, especially when used with firewalls and routers. In some configurations CARP can also provide load balancing functionality. For more information see this wiki.
Hardware failover *
CARP from OpenBSD allows for hardware failover. Two or more firewalls can be configured as a failover group. If one interface fails on the primary or the primary goes offline entirely, the secondary becomes active.
Configuration synchronization *
OPNsense includes configuration synchronization capabilities, so you make your configuration changes on the primary and they automatically synchronize to the secondary firewall.
Synchronized State Table *
pfsync ensures the firewall’s state table is replicated to all failover configured firewalls. This means your existing connections will be maintained in the case of failure, which is important to prevent network disruptions.
Only works with static public IPs, does not work with stateful failover using DHCP, PPPoE, or PPTP type WANs.
DHCP Server and Relay *
The Dynamic Host Configuration Protocol is used by computers for requesting Internet Protocol parameters, such as an IP address from a network server.
The protocol operates based on the client-server model. For more information take a look at this wiki.
OPNsense includes both DHCP Server and Relay functionality.
Reporting & Monitoring
The RRD graphs in OPNsense maintain historical information on the following:
- CPU utilization
- Total throughput
- Firewall states
- Individual throughput for all interfaces
- Packets per second rates for all interfaces
- WAN interface gateway(s) ping response times
- Traffic shaper queues on systems with traffic shaping enabled
Real Time Information *
Historical information is important, but sometimes it’s more important to see real time information.
SVG graphs are available that show real time throughput for each interface.
For traffic shaper users, the Status -> Queues screen provides a real time display of queue usage using AJAX updated gauges.
The front page includes AJAX gauges for display of real time CPU, memory, swap and disk usage, and state table size.
|CPU||2 core Intel® Atom™ processor C2000 series (Codenamed "Rangeley")|
|BIOS||AMI BIOS 16 Mb|
|Memory Technology||Dual-channel DDR3 1333/1600 MHz (ECC)|
|Memory Capacity||8 or 16 GB|
|Memory Socket||1 or 2 x 204-pin SODIMM|
|IDE storage||1 x CF card Type II|
|SATA storage||1 x 2.5” HDD/SSD kit (Optional)|
|Ethernet controller||2 x Intel i210AT, 1 x Marvell 88E1543|
|Default LAN||4 or 6 x GbE RJ-45|
|Bypass||2 pairs of Gen 2 LAN bypass|
|Console||1 x RJ45|
|USB 2.0||2 x Type A|
|Power and Mechanical|
|Processor cooling||CPU heatsink with fan duct|
|System cooling||1 smart fan|
|Certifications||CE Emission, FCC Class A, RoHS|
|Physical and Environmental|
|Storage temperature||-20°C to 70°C|
|Operating temperature||0°C to 40°C|
|Operating humidity||5% to 90% (non-condensing)|
|Storage humidity||5% to 95% (non-condensing)|
|Dimensions (W x H x D)||240 mm x 44 mm x 166 mm (9.45" x 1.73" x 6.54")|
|Weight||1.2 kg (2.64 lbs)|
Power supply 12V or 18V
Warranty 1 year (material, return in our workshop)