Quote from: Monviech (Cedrik) on August 20, 2026, 07:37:52 AMIt means that for IPFW dummynet shaping it needs an additional tunable.
Overview:
Guide to build a Transparent Traffic Shaper using OPNsense.
The configuration steps described here is based upon @MK4L's description of their environment.
Some points for the keen observer;
- The bridge interface has not been assigned in Interfaces -> Assignments and is not required.
- This configuration can work without any PF rules applied to the WAN & LAN interfaces by adjusting one setting.
These instructions were performed on bare-metal hardware which included the following NIC's and their assignments:
- em0 -> [OPT1]
- igb0 -> [LAN]
- igb1 -> [WAN]
The version of OPNsense used when creating this configuration: OPNsense 26.7.2_2 (amd64)
With exception to the interface names, follow the steps verbatim and in order as listed.
Requirements:
- Computer meets OPNsense system requirements
- Computer has a minumum of 3 x NIC's
Assumptions:
- The reader is familiar with configuring OPNsense
- The computer being used for this installation is a test machine
Disclaimer:
There may be errors or omissions in the steps below.
Priot to perfoming the following instructions, prepare your system using one of these two options.
1) Perform a fresh installation and at the end shut down and power off the computer.
2) Reset OPNsense settings to factory defaults.
First time start-up and initial configuration using LAN interface:
- Remove all network cables from the computer
- Power on computer
- Wait for the computer to display the login prompt on the console.
- Plug a network cable into the LAN port
- Login on the console as root
- Select option 2 - Set interface IP address
- Enter 1 - LAN listed under 'Available interfaces'
- Enter 'y' to assign an IPv4 address using DHCP
- Enter 'n' to disable IPv6 WAN tracking
- Enter 'N' to not use DHCP6
- Press Enter to skip entering an IPv6 address
- Press Enter to skip GUI protocol
- Press Enter to skip GUI certificate
- Press Enter to skip GUI access defaults
- Log on to the WebGUI
- Interfaces -> Neighbors -> Automatic Discovery
- Enabled: untick
- Click 'Apply'
- Interfaces -> Assignments
- Add
- Select device from drop-down list: em0
- Click 'Save'
- Click 'Apply'
- Refresh browser page (F5)
- Interfaces -> [OPT1]
- Enable: tick to enable the interface
- IPv4 Configuration Type: DHCP
- IPV6 Configuration Type: <optional>
- Click 'Save'
- Click 'Apply changes'
- Firewall -> Rules
- Edit Interface rule Default allow LAN to any rule
- Enable 'adavanced mode'
- Description: <optional>
- Interface: Include 'OPT1'
- Source: Include 'OPT1 network'
- Disable reply-to: tick
- Click 'Save'
- Edit Interface rule Default allow LAN IPv6 to any rule
- Enable 'adavanced mode'
- Description: <optional>
- Interface: Include 'OPT1'
- Source: Include 'OPT1 network'
- Disable reply-to: tick
- Click 'Save'
- Click 'Apply'
- Lobby -> Logout
- Close the browser
- Unplug the network cable from the LAN port
- Plug the network cable in to the OPT1 port
- On the console select 0 to logout
- Log back in on the console as root
- Open a new browser to the address listed on the console for OPT1
- Log on to the WebGUI
Complete System Configuration Wizard
- Welcome tab
- Click 'Next'
- General Information tab
- Hostname: TTS-IPFW
- Timezone: <optional>
- DNS servers: Enter address of internal DNS server
- Click 'Next'
- Network [WAN] tab
- Disable LAN: tick
- Block RFC1918 Private Networks: untick
- Block bogon networks: untick
- Click 'Next'
- Network [LAN] tab
- Disable LAN: tick
- Configure IP address: clear text in field 'dhcp/'
- Configure DHCP server: untick
- Click 'Next'
- Deployment type tab
- Optimize for Multiwan: untick
- Automatic DHCP/DNS registration: untick
- Click 'Next'
- Set initial password tab
If not already changed from its default, change the Root Password.
- Click 'Next'
- Finish tab
- Click 'Apply'
Configure LAN & WAN interfaces
- Interfaces -> LAN
- Enable: tick
- IPv4 Configuration Type: None
- IPV6 Configuration Type: None
- Click 'Save'
- Click 'Apply changes'
- Interfaces -> WAN
- Enable: tick
- Block private networks: untick
- Block bogon networks: untick
- IPv4 Configuration Type: None
- IPV6 Configuration Type: None
- Click 'Save'
- Click 'Apply changes'
Update firewall settings
- Firewall -> NAT -> Source NAT
- Mode: Disable Source NAT rule generation
- Click 'Apply'
- Firewall -> Rules
- Edit Interface rule Default allow LAN to any rule
- Description: <optional>
- Interface: Deselect 'LAN'
- Source: Deselect 'LAN network'
- Click 'Save'
- Edit Interface rule Default allow LAN IPv6 to any rule
- Description: <optional>
- Interface: Deselect 'LAN'
- Source: Deselect 'LAN network'
- Click 'Save'
- Click 'Apply'
Enable sysctl options required for this configuration.
- System -> Settings -> Tunables
- Add
- Tuneable: net.link.bridge.ipfw
- Value: 1
- Description: Layer2 filter with IPFW
- Click 'Save'
- System -> Settings -> Tunables
- Add
- Tuneable: net.link.ether.ipfw
- Value: 1
- Description: Pass ether pkts through firewall
- Click 'Save'
- Services -> Unbound -> Query Forwarding
- Use System Nameservers: tick
- Click 'Apply'
Add a Bridge device with description 'Traffic Shaper' and include the EGRESS and INGRESS interfaces as members and click on Save
- Interfaces -> Devices -> Bridge
- Add
- Member interfaces: WAN, LAN
- Description: Traffic Shaper
- Click 'Save'
- Click 'Apply'
Create firewall rule for the bridge.
- Firewall -> Rules
- Add
- Enable 'advanced mode'
- Description: Traffic Shaper
- Interface: LAN, WAN
- Direction: Both
- State type: no state
- Click Save
- Click Apply
Create shaping pipes
- Firewall -> Shaper -> Pipes
- Create Download pipe
- Add
- Bandwidth: 4
- Bandwidth Metric: Mbit/s
- Description: Pipe_4Mbps
- Click 'Save'
- Create Upload pipe
- Add
- Bandwidth: 2
- Bandwidth Metric: Mbit/s
- Description: Pipe_2MBps
- Click 'Save'
- Click 'Apply'
Create shaping rules
- Firewall -> Shaper -> Rules
- Create Download rule for subnet 10.200.128.0/24
- Add
- Enable 'advanced mode'
- Enabled: ticked
- Interface: WAN
- Interface 2: LAN
- Source: any
- Destination: 10.200.128.0/24
- Direction: In
- Target: Pipe_4MBps
- Description: Shape traffic for subnet 10.200.128.0/24
- Click 'Save'
- Create Upload rule for subnet 10.200.128.0/24
- Add
- Enable 'advanced mode'
- Enabled: ticked
- Interface: WAN
- Interface 2: LAN
- Source: 10.200.128.0/24
- Destination: any
- Direction: Out
- Target: Pipe_4MBps
- Description: Shape traffic from subnet 10.200.128.0/24
- Click 'Save'
- Click 'Apply'
Check for updates
- Check for OPNSense updates and install if available
Final reboot
- Power -> Reboot
- Click 'Yes'
Plug appropriate network cables in to the LAN & WAN ports and commence testing. Enjoy!Quote from: franco on Today at 03:03:18 PMWow, nice find! Took the liberty to fold this into the ports tree for tomorrow's 26.7.3:
https://github.com/opnsense/ports/commit/2616876aaa
Cheers,
Franco
Quote from: AlexanderB on August 11, 2026, 05:56:13 PM1. Also ist das normal, dass man nur eine Subdomain anlegt?Machen kannst beides, wie die lustig bist.
Z.B.:
IP - Hostname -> FQDN
192.168.10.68 -> pihole -> pihole.alexanderb.de
Es macht also keinen Sinn intern und extern zu trennen, indem ich für intern sowas mache:
IP - Hostname -> FQDN
192.168.10.68 -> pihole -> pihole.home.alexanderb.de