nicmx / mark-src-range Goto Github PK
View Code? Open in Web Editor NEWCondenses several `--source <src> --jump MARK` ip6tables rules into one.
License: GNU General Public License v3.0
Condenses several `--source <src> --jump MARK` ip6tables rules into one.
License: GNU General Public License v3.0
This trick looks very promising in terms of performance improvement, I look forward to test it and compare its results with the metrics I already gathered, but I have a request.
Is it feasible to distribute marks across sub-prefixes of a shorter one?
ip6tables -t mangle -A PREROUTING --source <PREFIX> -j MARKSRCRANGE [--mark-offset <OFFSET>] [--sub-prefix-len <SUB_PREFIX_LEN>]
So...
ip6tables -t mangle -A PREROUTING --source 2001:db8:1234:5600::/56 -j MARKSRCRANGE --sub-prefix-len 64
... should have the same effects of...
ip6tables -t mangle -A PREROUTING --source 2001:db8:1234:5600::/64 -j MARK --set-mark 0
ip6tables -t mangle -A PREROUTING --source 2001:db8:1234:5601::/64 -j MARK --set-mark 1
ip6tables -t mangle -A PREROUTING --source 2001:db8:1234:5602::/64 -j MARK --set-mark 2
...
ip6tables -t mangle -A PREROUTING --source 2001:db8:1234:56ff::/64 -j MARK --set-mark 255
With --mark-offset
:
ip6tables -t mangle -A PREROUTING --source 2001:db8:1234:5700::/56 -j MARKSRCRANGE --sub-prefix-len 64 --mark-offset 256
ip6tables -t mangle -A PREROUTING --source 2001:db8:1234:5700::/64 -j MARK --set-mark 256
ip6tables -t mangle -A PREROUTING --source 2001:db8:1234:5701::/64 -j MARK --set-mark 257
...
Maybe I'm asking too much, but I think this would better fit to some real life scenarios.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.