- 论坛徽章:
- 0
|
用的是Linux2.4.18的内核 iptables1.3.0
从ftp.netfilter.org//pub/patch-o-matic-ng/snapshot/patch-o-matic-ng-20060702.tar.bz2获得patch-o-matic-ng-20060702.tar.bz2
在/usr/src下解压到patch-o-matic-ng
KERNEL_DIR=/usr/src/linux
IPTABLES_DIR=/usr/src/iptables1.3.0
进入patch-o-matic-ng
运行。/runme base
相应选上yes
进入kernel目录 编译内核
在network option进入netifliter选择相应的time
编译
进入iptables所在目录编译iptables
查看产生有 libipt_time.so
iptables -A FORWARD -s 192.168.1.0/24 -m time --timestart 08:00 --timestop 17:00 -j DROP
发现没有效果 依然能上网
iptables -L
Chain FORWARD (policy DROP)
target prot opt source destination
sysfw all -- anywhere anywhere state NEW
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT all -- 192.168.1.0/24 anywhere state NEW
DROP all -- 192.168.1.0/24 anywhere TIME from 8:0 to 17:0 on all days
Chain INPUT (policy DROP)
target prot opt source destination
sysfw all -- anywhere anywhere state NEW
re-admin all -- anywhere anywhere
lo-admin all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain lo-admin (1 references)
target prot opt source destination
ACCEPT all -- 192.168.1.0/24 anywhere
Chain p2pfw (0 references)
target prot opt source destination
Chain re-admin (1 references)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT icmp -- anywhere anywhere icmp echo-request
Chain sysfw (2 references)
target prot opt source destination
DROP udp -- anywhere anywhere udp dpts:135:netbios-ssn
DROP tcp -- anywhere anywhere tcp dpts:135:netbios-ssn
DROP tcp -- anywhere anywhere tcp dpt:445
困扰一天了给找哈问题 |
|