Last active
March 3, 2019 11:36
-
-
Save KCCat/543043f9b1d82d4ae5dc00c849c8ff71 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iptables -t mangle -A POSTROUTING -o ppp+ -p tcp -m string --algo bm --from 40 --to 69 --hex-string 'GET ' -j CONNMARK --set-mark 1/1 | |
iptables -t mangle -A POSTROUTING -o ppp+ -p tcp -m string --algo bm --from 40 --to 69 --hex-string 'POST ' -j CONNMARK --set-mark 1/1 | |
iptables -t filter -A INPUT -i ppp+ -p tcp -m connmark --mark 1/1 -m string --algo bm --from 40 --to 69 --hex-string 'HTTP/1.1 302 ' -j DPI | |
iptables -t filter -A FORWARD -i ppp+ -p tcp -m connmark --mark 1/1 -m string --algo bm --from 40 --to 69 --hex-string 'HTTP/1.1 302 ' -j DPI | |
iptables -t filter -N DPI | |
iptables -t filter -A DPI -j LOG --log-level info --log-prefix 'DPI 302: ' --log-tcp-options --log-ip-options | |
iptables -t filter -A DPI -j CONNMARK --set-mark 0/1 | |
iptables -t filter -A DPI -j DROP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment