- 论坛徽章:
- 0
|
大家好:
环境:以前做的策略是禁止192.168.0.12-192.168.0.188 上163的网站,经过测试是好用的!
iptables -A URL -p tcp -m iprange --src-range 192.168.0.12-192.168.0.188 -m time --timestart 07:12 --timestop 17:56 --days Sun,Mon,Tue,Wed,Thu,Fri,Sat -m string --string "www.163.com" -j DROP
现在想先禁止所有的网站,然后打开www.163.com
iptables -A URL -p tcp -m iprange --src-range 192.168.0.12-192.168.0.188 -j DROP
iptables -I URL -p tcp -m iprange --src-range 192.168.0.12-192.168.0.188 -m time --timestart 07:12 --timestop 17:56 --days Sun,Mon,Tue,Wed,Thu,Fri,Sat -m string --string "www.163.com" -j ACCEPT
结果发现: 注:我的URL链是在FORWARD上的,我的ip:192.168.0.178
Chain URL (1 references)
pkts bytes target prot opt in out source destination
0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 source IP range 192.168.0.12-192.168.0.179 TIME from 7:12 to 17:56 on all days STRING match "www.163.com"
2 96 DROP tcp -- * * 0.0.0.0/0 0.0.0.0/0 source IP range 192.168.0.12-192.168.0.188 TIME from 7:12 to 17:56 on all days
我上了www.163.com,但没上去,
我的本意是想上去163,而其他的网站上不去,但发现匹配的是第二的规则,第一个规则没起任何作用!
不知道为什么,请高手指点! |
|