네트워크 트래픽 사용량 설정을 컨트롤 할수 있는 netfilter 옵션
커널포함사항...CONFIG_NETFILTER_XT_MATCH_QUOTA: 'quota' match support
The configuration item CONFIG_NETFILTER_XT_MATCH_QUOTA:
- prompt: 'quota' match support
- type: tristate
- depends on:
CONFIG_NETFILTER_ADVANCED
- defined in net/netfilter/Kconfig
- found in Linux Kernels: from 2.6.18 release still available on 2.6.32 release
- module created:
xt_quota
, xt_quota
, xt_quota
iptables 옵션
quota
Implements network quotas by decrementing a byte counter with each packet.
--quota bytes
The quota in bytes.
모듈확인
modeprobe ipt_quota
설정
나는 방화벽단에 적용하기 위해 FORWARD 체인으로 적용하였다...
# TCP DST 80번포트로 향하는 트래픽이 100바이트를 초과하는 부분에 대해서 차단
iptables -A FORWARD -p tcp --dport 80 -m quota --quota 1024 -j ACCEPT
iptables -A FORWARD -p tcp --dport 80 -j DROP
quota 최대 설정값은.....정확히는 모르겟고..확인해본바...
너무 높은값을 설정할경우 아래와같은 에러메세지...
[root@mojily~]# iptables-restore < ipt
iptables-restore v1.4.2: quota invalid: '19260000000000000000'
Error occurred at line: 6
Try `iptables-restore -h' or 'iptables-restore --help' for more information.
테스트해본바... 아래정도선에서 걸리는듯 보여진다..
18400 000 000 000 000 000 ~ 18450 000 000 000 000 000
18patabit 내외...
[이 게시물은 최고관리자님에 의해 2009-12-14 20:59:39 리눅스에서 이동 됨]