l7-filter-userspace 限制p2p

iptables -t mangle -I PREROUTING -s  xxx.xxx.xxx.xxx -j NFQUEUE

意思: 在表(默认为:filter) 插入一条规则在进入路由之前 源IP包丢到NFQUEUE

iptables -t mangle -I PREROUTING -d xxxxxxxxxxxxx -j  NFQUEUE

意思:在表(默认为:filter) 插入一条规则 目IP包丢到NFQUEUE

为l7-filter编写过滤标签

例如:

http 80

http为协议.80只是一个标记

iptables -t mangle -P FORWARD DROP 

过滤转发链

 

iptables -t mangle -I FORWARD -m mark --mark 80 -j DRODP

iptables -t mangle -A FORWARD -j ACCEPT

 

 

 

 

 

 

posted on 2013-11-22 18:11  Technology  阅读(437)  评论(0)    收藏  举报

导航