Disable reply-to does not work on auto-added VPN rules
Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
- [x] I have read the contributing guide lines at https://github.com/opnsense/core/blob/master/CONTRIBUTING.md
- [x] I have searched the existing issues and I am convinced that mine is new.
Describe the bug Auto-added VPN firewall rules do not take the global firewall setting "Disable reply-to on WAN rules" into account.
To Reproduce Steps to reproduce the behavior:
- Setup an IPsec VPN tunnel.
- Make sure that auto-added VPN firewall rules are active (uncheck Disable Auto-added VPN rules under VPN -> IPsec -> Advanced Settings).
- Output firewall rules on console with command pfctl -sr.
- Now globally disable reply-to on WAN rules (Firewall -> Settings -> Advanced).
- Output firewall rules on console with command pfctl -sr.
Expected behavior Auto-added VPN firewall rules should not being generated with a reply-to expression when reply-to is globally disabled.
Relevant log files
pass out log on pppoe0 route-to ( pppoe0 fe80::xxxx:xxxx:xxxx:xxxx ) proto udp from {any} to {any} port {500} keep state label "37[...]c7" # IPsec: Mobile Devices
pass in log on pppoe0 reply-to ( pppoe0 fe80::xxxx:xxxx:xxxx:xxxx ) proto udp from {any} to {any} port {500} keep state label "27[...]81" # IPsec: Mobile Devices
Environment OPNsense 21.1.5-amd64
You should be able to find the responsible toggle using the magnifying glass at the end of the automatically generated rules, I expect your looking for " Disable all auto-added VPN rules." in the advanced IPsec settings.
I want to use auto-added VPN rules.
The problem is that OPNsense does not honor the global setting "Disable reply-to on WAN rules" when creating auto-added VPN rules.
Auto-added VPN rules should be written without reply-to expression when reply-to on WAN rules is globally disabled under Firewall -> Settings -> Advanced.


Currently it's probably best to disable the auto generated vpn rules, although it's debatable if it should add route-to in this case, it might have side affects for others (these rules are mainly an inheritance from the past).
For a major update it's no problem to change this, a minor I'm not sure yet.