Allow use of `option src '!wan'`
Nobody has claimed this yet.
- Dominant language
- ucode
- Stars
- 27
- Forks
- 37
- PR merge metrics
- No merged PRs in 30d
Description
Being able to create a rule with option src '!wan' (for example -- the zone could be anything, or even a comma separated list of zones, or maybe a proper uci list list) is powerful and sorely missing.
The lack of it ends up causing the situation where the user has to create (and maintain!) potentially many (many even!) duplicate rules for each zone on the router, and has to continue to replicate those rules as new zones are added.
Even if this is limitation due to nft not allowing negative zone rules, the heavy lifting of creating a(n nft) rule for every zone not in the exclude list should be done by firewall4. This is the sort of thing that computers are really (really!) good at and that humans really suck balls at.
FWIW, and as an aside, this is just one of a number of cases I have found where lists are not allowed but they should be (again, even if it means that firewall4 creates the necessary nft rules) in order to make the /etc/config/firewall rule specification concise and not unnecessarily repetitive. Being able to keep a configuration concise and DRY is most important for security specifications such as firewall rules.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing how firewall4 parses option src in /etc/config/firewall and how it generates nft rules for zones. Define the supported exclusion and list syntax, then verify that rules cover every zone not excluded without requiring duplicated configuration.
Written by the indexing model from the issue text.
Assessment
- Domain
- networking, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100