Skip to content

Instantly share code, notes, and snippets.

@hiber
hiber / firewall.user
Last active August 29, 2015 14:12
DNS spoofing ip list
#awk -F'.' '{printf "iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string \"|%02x%02x%02x%02x|\" --from 60 --to 180 -j DROP #%s\n", $1, $2, $3, $4, $0}' iplist.txt
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|710bc2be|" --from 60 --to 180 -j DROP #113.11.194.190
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|76053106|" --from 60 --to 180 -j DROP #118.5.49.6
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|0c578500|" --from 60 --to 180 -j DROP #12.87.133.0
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|7ada65be|" --from 60 --to 180 -j DROP #122.218.101.190
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|7b7ef9ee|" --from 60 --to 180 -j DROP #123.126.249.238
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|7b3231ab|" --from 60 --to 180 -j DROP #12