Skip to main content
Version: 2.0

Firewall

Firewall is a licensed task that allows for configuration of firewall rules on selected devices. The current set of devices support by this task is WeOS 4 and WeOS 5 devices.

Interface Components

Depicted above you can observe how the interface might appears for a selection of two WeOS 5 devices and one WeOS 4 device. Where the configuration options for each device is divided into several tabs with the following contents:

What features are available depends on the WeOS version, and whether or not the device is an Extended device.

TabDescriptionWeOS 4/5 StandardWeOS 4 ExtendedWeOS 5 Extended
GeneralEnable / Disable firewall, and default policyYesYesYes
LoggingEnable / Disable logging, and configure rate limit on logsYesYesYes
Input RulesRules for incoming packets directed to the deviceYesYesYes
Forward RulesRules for incoming packets not directed to the deviceNoYesYes
DPI Filter RulesRules for incoming packets with a larger scopeNoYesNo
Port Forwarding RulesExpose internal devices via specific portsNoYesYes
NAT RulesRules for Network Address TranslationNoYesYes
Modifier RulesRules for modifying the IP header in routed trafficNoYesNo
ALG HelpersShorthand Rules for specific protocolsNoYesYes

General

The general tab allows for enabling or disabling the firewall on the device, and setting the default policy for the firewall. The default policy can be set to either ACCEPT or DROP. The default policy is the action that the firewall will take if no rules are matched.

For WeOS 5 devices, the firewall can be disabled and rules can still be set, but they will not be enforced until the firewall is enabled.

info

Default Forward Policy is only available on Extended devices.

WeOS 4

For WeOS 4 devices, the firewall must be enabled to be able to set any rules.

WeOS 4 devices also have the option to set Stateful Inspection, which is an ability to drop packets of invalid state.

Logging

The logging tab allows for enabling or disabling logging of packets that are matched by the firewall rules. The rate limit for logging can also be set, which is the maximum number of logs that can be generated per given time unit.

WeOS 5 devices defaults to unlimited logging, while WeOS 4 devices defaults to 5 logs per second.

info

The limit should be in the range 1-10000, and the time unit can be set to either second, minute, hour, day, or unlimited.

warning

Configuring logging with no rate limit may lower the security posture of the device by opening up for denial-of-service attacks.

Input Rules

The input rules tab allows for setting rules for incoming packets directed to the device. The rules can be set to either ACCEPT or DROP packets that match the rule.

WeOS 5 defaults with no Input Rules, while WeOS 4 defaults with rules that allow ICMP access to the device.

info

The input rules are checked after the routing decision and applies to packets that are directed to the local device and processes running on the device itself.

tip

Drag the rows to reorder the rules.

Add Inupt Rule - WeOS 5

To add a rule to a WeOS 5 device, click the Add button. This will open a modal where the following fields can be set:

FieldDescriptionRequiredNotes
ActionAccept or drop traffic matching the specified ruleYes-
ProtocolThe protocol type of the IP payload. Typically TCP or UDP but the filtering can also be made to match other protocols such as ICMP and ESP.YesWill affect what fields are available
Incoming InterfaceThe interface where the packet comes inYes*See info section below
Source AddressThe source IP address of the packetYes*See info section below
Source Port(s)The source port(s) of the packetYes*Only available if Protocol is TCP or UDP. See info section below
Destination AddressThe destination IP address of the packetYes*See info section below
Destination Port(s)The destination port(s) of the packetYes*Only available if Protocol is TCP or UDP. See info section below
CommentA comment of the ruleNo-
Inline CounterThe rule uses a counter that only shows in the raw output. This counter is reset any time the firewall configuration is changed.No-
Bind CounterThe Counter the rule is assigned toNoCan only be set if Inline Counter is not checked. If the Counter does not exist, one will be created.
LoggingLog traffic matching this ruleNoLogging must be enabled in the Logging tab
info

Yes* =

If Protocol is TCP or UDP:

  • At least one of Incoming Interface, Source Address, Destination Address, Source Port(s), or Destination Port(s) must be set.

If Protocol is not TCP or UDP:

  • At least one of Incoming Interface, Source Address, or Destination Address must be set.

Add Inupt Rule - WeOS 4

To add a rule to a WeOS 4 device, click the Add button. This will open a modal where the following fields can be set:

FieldDescriptionRequiredNotes
ActiveIs this rule active?Yes-
ActionAccept or drop traffic matching the specified ruleYes-
ProtocolThe protocol type of the IP payload. Typically TCP or UDP but the filtering can also be made to match other protocols such as ICMP and ESP.YesWill affect what fields are available
Incoming InterfaceThe interface where the packet comes inNo-
Source AddressThe source IP address of the packetNo-
Source Port(s)The source port(s) of the packetNoOnly available if Protocol is TCP or UDP
Destination Port(s)The destination port(s) of the packetNoOnly available if Protocol is TCP or UDP
LoggingLog traffic matching this ruleNoLogging must be enabled in the Logging tab

Forward Rules

The forward rules tab allows for setting rules for incoming packets not directed to the device. The rules can be set to either ACCEPT or DROP packets that match the rule.

The default is no Forward Rules.

info

Only available on Extended devices.

info

The forward rules are checked after the routing decision and applies to packets that are not directed to the local device.

tip

Drag the rows to reorder the rules.

Add Forward Rule - WeOS 5

To add a rule to a WeOS 5 device, click the Add button. This will open a modal where the following fields can be set:

FieldDescriptionRequiredNotes
ActionAccept or drop traffic matching the specified ruleYes-
ProtocolThe protocol type of the IP payload. Typically TCP or UDP but the filtering can also be made to match other protocols such as ICMP and ESP.YesWill affect what fields are available
Incoming InterfaceThe interface where the packet comes inYes*See info section below
Outgoing InterfaceThe interface where the packet is sent outYes*See info section below
Source AddressThe source IP address of the packetYes*See info section below
Source Port(s)The source port(s) of the packetYes*Only available if Protocol is TCP or UDP. See info section below
Destination AddressThe destination IP address of the packetYes*See info section below
Destination Port(s)The destination port(s) of the packetYes*Only available if Protocol is TCP or UDP. See info section below
CommentA comment of the ruleNo-
Inline CounterThe rule uses a counter that only shows in the raw output. This counter is reset any time the firewall configuration is changed.No-
Bind CounterThe Counter the rule is assigned toNoCan only be set if Inline Counter is not checked. If the Counter does not exist, one will be created.
LoggingLog traffic matching this ruleNoLogging must be enabled in the Logging tab
info

Yes* =

If Protocol is TCP or UDP:

  • At least one of Incoming Interface, Outgoing Interface, Source Address, Destination Address, Source Port(s), or Destination Port(s) must be set.

If Protocol is not TCP or UDP:

  • At least one of Incoming Interface, Outgoing Interface, Source Address, or Destination Address must be set.

Add Forward Rule - WeOS 4

To add a rule to a WeOS 4 device, click the Add button. This will open a modal where the following fields can be set:

FieldDescriptionRequiredNotes
ActiveIs this rule active?Yes-
ActionAccept or drop traffic matching the specified ruleYes-
ProtocolThe protocol type of the IP payload. Typically TCP or UDP but the filtering can also be made to match other protocols such as ICMP and ESP.YesWill affect what fields are available
Incoming InterfaceThe interface where the packet comes inNo-
Source AddressThe source IP address of the packetNo-
Source Port(s)The source port(s) of the packetNoOnly available if Protocol is TCP or UDP
Outgoing InterfaceThe interface where the packet is sent outYes*See info section below
Destination AddressThe destination IP address of the packetYes*See info section below
Destination Port(s)The destination port(s) of the packetNoOnly available if Protocol is TCP or UDP
LoggingLog traffic matching this ruleNoLogging must be enabled in the Logging tab
info

Yes* = At least one of Outgoing Interface or Destination Address must be set.

DPI Filter Rules

Deep Packet Inspection (DPI) rules work similar to regular Packet Filter (Input/Forward) rules, but look further into the payload when deciding what packets to allow or drop.

The default is no DPI Filter Rules.

info

Only avaible for Extended WeOS 4 devices.

tip

Drag the rows to reorder the rules.

Add DPI Filter Rule

To add a rule to a WeOS 4 device, click the Add button. This will open a modal where the following fields can be set:

FieldDescriptionRequiredNotes
ActiveIs this rule active?Yes-
ActionAccept or drop traffic matching the specified ruleYesOnly Accept is allowed
ProtocolThe protocol type of the IP payloadYesOnly TCP is allowed
Incoming InterfaceThe interface where the packet comes inNo-
Source AddressThe source IP address of the packetNo-
Source Port(s)The source port(s) of the packetNo-
Destination Port(s)The destination port(s) of the packetNoDefault is 502
LoggingLog traffic matching this ruleNoLogging must be enabled in the Logging tab
Outgoing InterfaceThe interface where the packet is sent outYes*See info section below
Destination AddressThe destination IP address of the packetYes*See info section below
Modbus FunctionDPI can filter on Modbus function codes. A range of codes can be specified.No-
Modbus UnitDPI can filter on Modbus unit ID. More than one Modbus device may sit behind the same IP address, use this parameter to specify a single device.No-
Modbus RegisterDPI can filter on Modbus register addresses. Note that the meaning of this filter varies depending on the function code.No-
info

Yes* = At least one of Outgoing Interface or Destination Address must be set.

Port Forwarding Rules

The port forwarding rules tab allows for exposing internal devices via specific ports. The rules can be set to either ACCEPT or DROP packets that match the rule.

The default is no Port Forwarding Rules.

info

Only available on Extended devices.

tip

Drag the rows to reorder the rules.

Add Port Forwarding Rule - WeOS 5

To add a rule to a WeOS 5 device, click the Add button. This will open a modal where the following fields can be set:

FieldDescriptionRequiredNotes
Incoming InterfaceThe interface where the packet comes inNo-
Destination AddressThe destination IP address of the packetNo-
Destination Port(s)The destination port(s) of the packetYes-
To AddressThe destination address where the packets are to be forwardedYes-
To PortThe destination port where the packets are to be forwardedYes-
ProtocolThe protocol type of the IP payloadYesTCP or UDP
CommentA comment of the ruleNo-
LoggingLog traffic matching this ruleNoLogging must be enabled in the Logging tab

Add Port Forwarding Rule - WeOS 4

To add a rule to a WeOS 4 device, click the Add button. This will open a modal where the following fields can be set:

FieldDescriptionRequiredNotes
Incoming InterfaceThe interface where the packet comes inYes-
Destination AddressThe destination IP address of the packetNo-
Destination Port(s)The destination port(s) of the packetYes-
To AddressThe destination address where the packets are to be forwardedYes-
To PortThe destination port where the packets are to be forwardedYes-
ProtocolThe protocol type of the IP payloadYesTCP, UDP, or Any
LoggingLog traffic matching this ruleNoLogging must be enabled in the Logging tab

NAT Rules

Network Address Translation (NAT) can be used to hide private subnets behind a single public IP address.

The default is no NAT Rules.

info

Only available on Extended devices.

tip

Drag the rows to reorder the rules.

Add NAT Rule - WeOS 5

To add a rule to a WeOS 5 device, click the Add button. This will open a modal where the following fields can be set:

FieldDescriptionRequiredNotes
TypeThe type of NAT ruleYesOnly NAPT is supported on WeOS 5
Outgoing InterfaceThe interface where the packet is sent outYes-
Source AddressThe source IP address of the packetNo-
CommentA comment of the ruleNo-
LoggingLog traffic matching this ruleNoLogging must be enabled in the Logging tab

Add NAT Rule - WeOS 4

To add a rule to a WeOS 4 device, click the Add button. This will open a modal where the following fields can be set:

NAPT:

FieldDescriptionRequiredNotes
ActiveIs this rule active?Yes-
TypeThe type of NAT ruleYesNAPT or 1:1, will change what fields are available.
Incoming InterfaceThe interface where the packet comes inNo-
Source AddressThe source IP address of the packetNo-
Outgoing InterfaceThe interface where the packet is sent outYes-
Automatic Filter RuleIf set, an automatic (invisible) packet filter rule will be created in the forward filtering chain allowing packets matching this NAT rule. Do not set this option if you want to manage forwarding rules yourself.No-
LoggingLog traffic matching this ruleNoLogging must be enabled in the Logging tab

1-to-1:

FieldDescriptionRequiredNotes
ActiveIs this rule active?Yes-
TypeThe type of NAT ruleYesNAPT or 1:1, will change what fields are available.
Incoming InterfaceThe interface where the packet comes inYes-
VRIDVirtual Router IDNoMake sure the VRID exists in the device, or it will not 'stick' when applying the NAT Rule
Destination AddressPackets arriving on the inbound interface and has the IP destination within this subnet will be NATedYes-
New AddressThe new destination IP network for the NATYesThe subnet size of Destination Address and New Address must be the same
Automatic Filter RuleIf set, an automatic (invisible) packet filter rule will be created in the forward filtering chain allowing packets matching this NAT rule. Do not set this option if you want to manage forwarding rules yourself.No-
Pryxy ARPWeOS 1-to-1 NAT includes a proxy ARP mechanism, which makes the WeOS unit answer on ARP requests for the external network (Destination Address). The router will only answer on ARP requests originating from the network connected to the Incoming Interface. This makes it possible to use 1-to-1 NAT to pick up traffic to a specific subnet from within a larger network without the need of explicit routing settings.No-
LoggingLog traffic matching this ruleNoLogging must be enabled in the Logging tab

Modifier Rules

Changes the DSCP bits in the IP header for routed traffic.

The default is no Modifier Rules.

info

Only avaible for Extended WeOS 4 devices.

tip

Drag the rows to reorder the rules.

Add Modifier Rule

To add a rule to a WeOS 4 device, click the Add button. This will open a modal where the following fields can be set:

FieldDescriptionRequiredNotes
ActiveIs this rule active?Yes-
Incoming InterfaceThe interface where the packet comes inNo-
Outgoing InterfaceThe interface where the packet is sent outNo-
ProtocolThe protocol type of the IP payload. Typically TCP or UDP but the filtering can also be made to match other protocols such as ICMP and ESP.Yes-
Source AddressThe source IP address of the packetNo-
Source Port(s)The source port(s) of the packetNo-
Destination AddressThe destination IP address of the packetNo-
Destination Port(s)The destination port(s) of the packetNo-
DSCP Set ValueThe DSCP value to be set for packets matching this ruleYesValid values 0-63
DSCP Adjust PriorityIndicates if the modified DSCP value should be used for switch internal prioritising and applied to VLAN-priority on tagged packetsNo-

ALG Helpers

Application Layer Gateway (ALG) helpers are shorthand rules for specific protocols.

The default is no ALG Helpers.

info

Only available on Extended devices.

FTP and TFTP are the only ALG Helpers available for WeOS 5 devices.

WeOS 4

The following ALG Helpers are available for WeOS 4 devices:

  • FTP
  • H.323
  • IRC
  • PPTP
  • SIP
  • TFTP