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

speedway: nochainedterms option rendering false jumps #357

Open
ProtonBruno opened this issue Nov 1, 2023 · 1 comment
Open

speedway: nochainedterms option rendering false jumps #357

ProtonBruno opened this issue Nov 1, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@ProtonBruno
Copy link
Contributor

ProtonBruno commented Nov 1, 2023

I started testing nochainedterms option for Speedway target and something looks weird to me: after each term we still render a jump statement to the same chain...
Here is the output for a simple 7 terms policy:

:INPUT DROP [0:0]
-A INPUT -p all -m state --state NEW,ESTABLISHED,RELATED -o lo -j ACCEPT
-A INPUT -j INPUT
-A INPUT -p all -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -j INPUT
-A INPUT -p tcp -m multiport --dports 22,5666,9094,9100 -s 192.168.0.0/23 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p tcp -m multiport --dports 22,5666,9094,9100 -s 192.168.128.0/23 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p tcp -m multiport --dports 22,5666,9094,9100 -s 192.168.136.0/23 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p tcp -m multiport --dports 22,5666,9094,9100 -s 192.168.192.0/23 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
-A INPUT -j INPUT
-A INPUT -p udp --dport 9094 -s 192.168.0.0/23 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p udp --dport 9094 -s 192.168.128.0/23 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p udp --dport 9094 -s 192.168.136.0/23 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p udp --dport 9094 -s 192.168.192.0/23 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
-A INPUT -j INPUT
-A INPUT -p tcp --dport 8080 -s 192.168.8.18/32 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p tcp --dport 8080 -s 192.168.72.24/32 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
-A INPUT -j INPUT
-A INPUT -p tcp --dport 5045 -s 192.168.17.11/32 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p tcp --dport 5045 -s 192.168.81.59/32 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p tcp --dport 5045 -s 192.168.145.59/32 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p tcp --dport 5045 -s 192.168.160.31/32 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
-A INPUT -j INPUT
-A INPUT -p all -j LOG --log-prefix INPUT
-A INPUT -p all -j DROP
-A INPUT -j INPUT

iptables target doesn't have the same issue.
Thx for checking.

@ProtonBruno
Copy link
Contributor Author

must be related to this POSTJUMP_FORMAT : which is not handled in iptables.py

@ankenyr ankenyr added the bug Something isn't working label Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants