Skip to content

Instantly share code, notes, and snippets.

@wen-long
Created July 31, 2014 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save wen-long/64ab75b2cfbea1bcc42d to your computer and use it in GitHub Desktop.
Save wen-long/64ab75b2cfbea1bcc42d to your computer and use it in GitHub Desktop.
iptables -N http
iptables -A http -m string --string "HTTP/1.1 302 Moved Temporarily" --algo bm -j RETURN
iptables -A http -m string ! --string "HTTP/1.1 302 Found" --algo bm -j RETURN
iptables -A http -m string ! --string "Connection: close" --algo bm -j RETURN
iptables -A http -m string --string "videoplayer" --algo bm -j LOG --log-prefix "http_302" --log-level 5
iptables -A http -m string --string "videoplayer" --algo bm -j DROP
iptables -A http -j LOG --log-prefix "WTF" --log-level 5
iptables -I FORWARD -i eth0.2 -p tcp --sport 80 -m ttl --ttl-eq 127 -j http
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment