Skip to content

ruleset: add prerouting chain includes - #76

Open
brada4 wants to merge 1 commit into
openwrt:masterfrom
brada4:preprerouting
Open

ruleset: add prerouting chain includes#76
brada4 wants to merge 1 commit into
openwrt:masterfrom
brada4:preprerouting

Conversation

@brada4

@brada4 brada4 commented Oct 13, 2025

Copy link
Copy Markdown

Add missing includes around prerouting chain
Used by eg transparent proxies.
Spotted by @reinerotto
Add another missing in raw_prerouting

Add missing includes around prerouting chains
Used by eg transparent proxies.

Signed-off-by: Andris PE <neandris@gmail.com>
@em-may

em-may commented Aug 2, 2026

Copy link
Copy Markdown

I could really use this for increasing the TTL of SSDP packets. Currently I'm using ruleset-post, but that's not ideal. If this could get merged in and updated in the repo that'd be great.

@brada4

brada4 commented Aug 2, 2026

Copy link
Copy Markdown
Author

You can add includes in /etc/nftables.d/ with +/-1 priority, that is saved over sysupgrade. There is even example in that directory

@em-may

em-may commented Aug 2, 2026

Copy link
Copy Markdown

I already have some in /usr/share/nftables.d/{ruleset-pre,table-pre,chain-pre/forward,ruleset-post}/, but as far as I can tell I can't add anything in /usr/share/nftables.d/chain-post/prerouting since there are no includes for that chain, thus this PR, right? So for the prerouting rules I need, I end up putting them in /usr/share/nftables.d/ruleset-post like

add rule inet fw4 prerouting <rule>

If I'm missing something, please lmk, thanks!

@brada4

brada4 commented Aug 2, 2026

Copy link
Copy Markdown
Author

Too abstract to say yes or no.

@brada4

brada4 commented Aug 3, 2026

Copy link
Copy Markdown
Author

something like

chain abcd {
 type filter ; hook prerouting priority raw + 1;
 //ttl hl set
}

those includes are inside table inet fw4{}, ie dont need table definition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants