12 มี.ค. 2558

บล็อก baidu ด้วย iptables

1.เพิ่มคำสั่ง บล็อกด้วย string ลงใน chain magle
#iptables -t mangle -A PREROUTING -p tcp --dport 80 -m string --string 'baidu' --algo bm -j DROP

2.DROP จาก Domain โดยใช้ dig
#iptables -t mangle -A PREROUTING -d $(dig @8.8.8.8 upf.bav.baidu.com +short) -j DROP

3.มองดูผลงาน
#iptables -t mangle -nvxL | grep DROP

ไม่มีความคิดเห็น:

แสดงความคิดเห็น