WireGuard
Modern, high-performance VPN protocol with state-of-the-art cryptography and minimal configuration overhead. Recommended for most VPN use cases.
Network rules are the central control mechanism for all traffic flowing through a VergeOS network. They replace the functionality traditionally provided by separate firewalls, routers, and switches — all managed from a single rule list on each network.
Every external, internal, and VPN network in VergeOS has its own rule set. Rules define what traffic is allowed, blocked, translated, or routed. Because internal networks are default-secure (no traffic flows until rules permit it), understanding rules is essential for building functional, secure network topologies.
Rules are accessed from any network’s dashboard by clicking Rules in the left menu.
VergeOS supports three rule actions, each serving a distinct purpose:
Firewall rules control which packets are allowed to pass through the network:
| Action | Behavior |
|---|---|
| Accept | Allow packets matching the defined criteria to pass through |
| Drop | Silently discard matching packets — the sender receives no response |
| Reject | Discard matching packets and send an ICMP “destination unreachable” back to the source (when possible) |
Use Accept rules to explicitly permit traffic that should be allowed. Use Drop for most blocking scenarios (silent discard prevents reconnaissance). Use Reject when you want the sender to immediately know the connection was refused.
Translate rules provide Network Address Translation (NAT) and Port Address Translation (PAT). Common uses include:
NAT rules use the Translate action with Incoming direction for DNAT and Outgoing direction for SNAT.
Route rules define how traffic exits a network. The most common use is the default gateway rule that sends all outbound traffic through the DMZ to an external network. Route rules can also define specific paths for inter-network communication.
Rules are processed top-to-bottom. The first matching rule wins — once a packet matches a rule, no further rules are evaluated for that packet.
Order matters. Consider this example:
10.100.0.50:443If these rules are reversed (drop first, then NAT), the traffic will be dropped before the NAT rule ever sees it. Always place NAT/Translate rules above related firewall rules when they need to process traffic first.
To change rule order, select a rule from the rule list and use the Move option to reposition it.
Every rule is configured with a consistent set of parameters:
| Parameter | Description |
|---|---|
| Name | Descriptive label for administration (e.g., Allow HTTPS, SNAT to WAN) |
| Action | Accept, Drop, Reject, Route, or Translate |
| Protocol | TCP, UDP, ICMP, or ANY |
| Direction | Incoming or Outgoing |
| Interface | Specific interface or Any |
| Source | Where traffic originates — see Address Selectors below |
| Destination | Where traffic is addressed to go |
| Target | Where to actually direct traffic (used with Route and Translate actions) |
| Pin | Optionally pin the rule to the Top or Bottom of the rule list |
For TCP and UDP protocols, you can specify:
443)8000-8999)Advanced rules can filter on connection state (New, Established, Related, Invalid) for stateful packet inspection.
The Source, Destination, and Target fields use address selectors — a powerful set of options for specifying where traffic comes from or goes to:
| Selector | Description |
|---|---|
| Alias | Select a named alias (a group of IPs/CIDRs) defined on this network |
| Any/None | Match any address — no filter applied |
| Custom | Enter a specific IP, CIDR, or IP range (e.g., 192.168.1.50-192.168.1.100) |
| Default | Helper for route rules — defines the default route (0.0.0.0/0) |
| My IP Addresses | Select an IP defined on this network (virtual IPs, static IPs, aliases) |
| My Network Address | This network’s entire subnet |
| My Router IP | This network’s router IP (single address) |
| Other IP Address | Select a specific IP from a different network |
| Other Network Address | Select another network’s entire subnet |
| Other Router IP | Select another network’s router IP |
| Other Network DMZ IP | Select the DMZ-side IP of another network (used for inter-network routing) |
Aliases let you group multiple IP addresses or CIDR ranges into a named set, then reference that set in rules. This simplifies management when the same group of addresses appears in multiple rules.
To create an alias:
Web-Servers, Trusted-Admins)10.10.10.10|10.200.10.0/24) or add entries individuallyWhen creating rules, set the Source or Destination Type to Alias and select the desired alias from the dropdown.
Individual rules can have throttling enabled to limit traffic rate. When creating or editing a rule, check Enable Throttle and configure:
Rate limiting can also be applied at the network level (on the network’s router) to throttle all traffic flowing through the network, not just specific rules.
VergeOS provides three levels of rule-level diagnostics:
Enable the Track Rule Statistics checkbox on any rule to count packets and bytes processed by that rule. Statistics are viewable from the rule list, enabling you to see which rules are actively handling traffic and how much.
For network-wide tracking, enable Track Statistics For All Rules in the network settings to automatically track every rule.
Enable Trace/Debug Rule on a specific rule to trace all packets that match it. This is invaluable for troubleshooting — you can see exactly which packets are hitting a rule and whether they are being accepted, dropped, or translated.
For advanced diagnostics, connect to the network’s console and run:
nft list rulesetThis displays the full nftables ruleset as configured by VergeOS, showing the actual kernel-level rules in effect. This is useful for support engineers diagnosing complex rule interaction issues.
This example creates a common rule set for an internal network that needs Internet access and an inbound web server:
Step 1: Default Route (outbound Internet access)
Default Gateway, Action: Route, Direction: OutgoingStep 2: SNAT (hide internal IPs behind external IP)
SNAT Outbound, Action: Translate, Direction: OutgoingStep 3: DNAT (publish web server)
DNAT HTTPS, Action: Translate, Protocol: TCP, Direction: Incoming10.100.0.50 (internal web server), Port: 443Step 4: Accept inbound HTTPS
Allow HTTPS, Action: Accept, Protocol: TCP, Direction: IncomingVLANs in VergeOS are configured at the external network level using 802.1Q tagging. Each external network can be mapped to a specific VLAN ID on a physical network, enabling traffic segmentation without additional physical cabling.
vLAN100)Multiple external networks can use different VLAN IDs on the same physical network, providing logical separation for management, production, DMZ, and tenant traffic.
For service provider environments that require double VLAN tagging, select an external network (not a physical network) as the Interface Network. This stacks a second VLAN tag on top of the existing one.
VergeOS includes built-in VPN connectivity using two protocols:
WireGuard
Modern, high-performance VPN protocol with state-of-the-art cryptography and minimal configuration overhead. Recommended for most VPN use cases.
IPsec
Industry-standard VPN protocol provided for environments that must interface with third-party IPsec devices (Cisco, pfSense, etc.).
WireGuard is attached to a VergeOS network (typically an internal network that has access to all resources the VPN should reach). After creating the interface and peer definitions, click Apply Rules to activate the auto-generated firewall and routing rules.
IPsec configuration involves creating a VPN Network, configuring Phase 1 (IKE negotiation) and Phase 2 (encryption/tunnel parameters), then applying the auto-generated firewall rules.
Micro-segmentation is a security strategy that divides the network into isolated segments, each with its own security controls. VergeOS is purpose-built for this approach:
Internal networks as segments — Each internal network is an isolated security boundary by default. Create separate networks for web, app, database, management, and development tiers.
Granular firewall rules — Define per-rule traffic policies specifying protocol, port, source, destination, and direction. Only permit the exact traffic each tier needs.
Network aliases for policy groups — Group related IPs into aliases (e.g., Web-Servers, DB-Clients) and reference them in rules for consistent policy enforcement.
Tenant isolation — Each tenant (VDC) operates with its own DMZ and internal networks, providing full network encapsulation between tenants.
Port mirroring for visibility — Monitor traffic on any network segment for security analysis without disrupting production.
VPN for encrypted paths — Use WireGuard or IPsec between sensitive network segments for defense-in-depth.
Each tier is a separate internal network with explicit rules. The web tier accepts only HTTPS from the Internet. The app tier accepts only port 8080 from the web tier. The database tier accepts only port 3306 from the app tier. No other traffic is permitted — all paths are explicitly defined.
| Concept | Summary |
|---|---|
| Rule types | Accept/Drop/Reject (firewall), Translate (NAT/PAT), Route (static routes) |
| Processing order | Top-to-bottom — first match wins; order NAT before related firewall rules |
| Address selectors | Use helpers (My IP, Other Network DMZ IP) instead of hardcoded IPs for portability |
| Aliases | Named groups of IPs/CIDRs for consistent policy management across multiple rules |
| Rate limiting | Per-rule throttle or network-wide rate limiting on the router |
| Diagnostics | Track Statistics per rule, Trace/Debug for packet-level inspection, nft list ruleset for low-level view |
| VLANs | 802.1Q tagging set per external network; Q-in-Q via external-as-interface |
| VPN | WireGuard (recommended) for site-to-site and remote access; IPsec for third-party compatibility |
| Micro-segmentation | Separate internal networks per tier + least-privilege rules = zero-trust architecture |
With firewall rules, NAT, VLANs, and VPN configured, explore the hands-on lab to put these concepts into practice: Lab: Network Configuration →