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

iptables no longer used #8

Open
GavinKacprowicz opened this issue Jan 5, 2024 · 1 comment
Open

iptables no longer used #8

GavinKacprowicz opened this issue Jan 5, 2024 · 1 comment

Comments

@GavinKacprowicz
Copy link

How would I do this same thing for nftables?

@GavinKacprowicz
Copy link
Author

Would this work?

Remove existing iptables entries

nft delete rule ip mangle PREROUTING iifname "usb+" ip ttl set add 2
nft delete rule ip mangle POSTROUTING oifname "usb+" ip ttl set add 2
nft delete rule ip6 mangle PREROUTING iifname "usb+" ip6 ! ip6 nexthdr icmpv6 ttl set add 2
nft delete rule ip6 mangle POSTROUTING oifname "usb+" ip6 ! ip6 nexthdr icmpv6 ttl set add 2

Move past TTL & HL hotspot detections

nft add table inet mangle
nft add chain inet mangle PREROUTING { type filter hook prerouting priority 0 ; }
nft add chain inet mangle POSTROUTING { type filter hook postrouting priority 0 ; }

nft add rule inet mangle PREROUTING iifname "usb+" ttl set add 2
nft insert rule inet mangle POSTROUTING oifname "usb+" ttl set add 2

nft add rule inet mangle PREROUTING iifname "usb+" ip protocol != icmpv6 hl set add 2
nft insert rule inet mangle POSTROUTING oifname "usb+" ip protocol != icmpv6 hl set add 2

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

No branches or pull requests

1 participant