Skip to content
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

Auto-accept dstnat mangled flows #28

Closed
wants to merge 2 commits into from
Closed

Conversation

brada4
Copy link

@brada4 brada4 commented Mar 28, 2024

Magically accept packets and subsequent DNAT flows akin other NAT translations. dstnat are mangled before filter hook and they reach filter/forward in state new, with distinct status dnat and otherwise would need secondary filter/forward accept rule to proceed anywhere.

Signed-off-by: Andris PE neandris@gmail.com

Magically accept packets and subsequent DNAT flows akin other NAT
translations. dstnat are mangled before filter hook and they reach
filter/forward in state new, with distinct status dnat and otherwise
would need secondary filter/forward/accept rule to proceed anywhere.

Signed-off-by: Andris PE <neandris@gmail.com>
@jow-
Copy link
Contributor

jow- commented Mar 28, 2024

This seems redundant to the already existing per-zone "Accept port forwards" and "Accept port redirection" rules, which are also only emitted if the related zones uses any DNAT rule.

@brada4
Copy link
Author

brada4 commented Mar 28, 2024

I was thinking vice versa, to terminate evaluation asap.

Treat DNAT altered flows as any other state flow from early on.

Signed-off-by: Andris PE <neandris@gmail.com>
@brada4
Copy link
Author

brada4 commented Mar 29, 2024

The main problem is anomalously slow ?ifname that on one side delays our packet on other consumes processing where others could run. Maybe a bettwer idea to wrap rule(s) in loop to check if any dnat rule is present then emit central rule?

@brada4
Copy link
Author

brada4 commented Mar 30, 2024

Principal problem is that nat-pmp UDP creates UDP DNAT rule but backs it with TCP ACCEPT and whatsapp glitches more than without any traversal. This is not a solution, but would playnly rule out that problem.

@brada4
Copy link
Author

brada4 commented May 9, 2024

I will re-work it to add early accept in presence of any dnat rule eliminating duplicates.

@brada4 brada4 closed this May 9, 2024
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.

None yet

2 participants