-
Notifications
You must be signed in to change notification settings - Fork 881
Firewall: NAT: Port Forward - refactor to MVC #9473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
AdSchellevis
wants to merge
19
commits into
master
Choose a base branch
from
FR8401_DNAT
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…8401 Add a model wrapper around nat/rule and align filter code to generate the same output when using the model. To test this part, make a copy of /tmp/rules.debug, run migrations (/usr/local/opnsense/mvc/script/run_migrations.php) and execute rule generation via /usr/local/etc/rc.filter_configure A diff between the newly generated rules.debug and the backup created earlier should show no differences. The following notes apply: o ipprotocol and protocol have no defaults set as old frontend code didn't enforce this, we should likely set defaults (inet, any) knowing this will show a small diff in the output o registerForwardRule() replaces the array_merge with an !empty() compare per field as our defaults are empty instead of missing o legacyMoveAddressFields() in Rule.php assumes any when network and address are not set, which should comply with frontend logic as "any" is set in these cases anyway o source/destinations are converted inline, using a volatile field to trigger the initial load (as only one is used, we prefer network)
…8401 Add some missing pieces in the controller layer, use shared getCategoryColors() and getNetworks() to render gui information in the same way as the filter page does. Use a volatile field categories to keep track of uuid's so we can reuse these easily for matching in our selectors and data.
…8401 update menu and acl.
…8401 final bits and pieces: o updated / created metadata o add pass flag superseding associated-rule-id o remove legacy files
Monviech
reviewed
Nov 30, 2025
src/opnsense/mvc/app/controllers/OPNsense/Firewall/forms/dialogDNatRule.xml
Outdated
Show resolved
Hide resolved
…gDNatRule.xml Co-authored-by: Monviech <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
closes #8401
Some points up for debate:
o menu naming (portforward / dnat)
o deprecation of associated rule magic, only leaving a pass flag in place