¿ù°£ Àα⠰Խù°

°Ô½Ã¹° 111°Ç
   
Bandwidth Quota's using iptables (³×Æ®¿öÅ© Æ®·¡ÇÈ ÄõÅͼ³Á¤)
±Û¾´ÀÌ : ÃÖ°í°ü¸®ÀÚ ³¯Â¥ : 2009-12-08 (È­) 17:05 Á¶È¸ : 8063
±ÛÁÖ¼Ò :
                             

³×Æ®¿öÅ© Æ®·¡ÇÈ »ç¿ë·® ¼³Á¤À» ÄÁÆ®·Ñ ÇÒ¼ö ÀÖ´Â 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 ¸®´ª½º¿¡¼­ À̵¿ µÊ]

ÃÖ°í°ü¸®ÀÚ 2009-12-28 (¿ù) 15:45
1 GBYTE = 1073741824 BYTE
300 GBYTE = 322122547200 BYTE

iptables -A TRAFFIC_QUOTA -m quota --quota 107374182400 -d 115.68.27.77 -j RETURN
iptables -A TRAFFIC_QUOTA -d 115.68.27.77 -j DROP
À̸§ Æнº¿öµå
ºñ¹Ð±Û (üũÇÏ¸é ±Û¾´À̸¸ ³»¿ëÀ» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.)
¿ÞÂÊÀÇ ±ÛÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä.
   

 



 
»çÀÌÆ®¸í : ¸ðÁö¸®³× | ´ëÇ¥ : ÀÌ°æÇö | °³ÀÎÄ¿¹Â´ÏƼ : ·©Å°´åÄÄ ¿î¿µÃ¼Á¦(OS) | °æ±âµµ ¼º³²½Ã ºÐ´ç±¸ | ÀüÀÚ¿ìÆí : mojily°ñ¹ðÀÌchonnom.com Copyright ¨Ï www.chonnom.com www.kyunghyun.net www.mojily.net. All rights reserved.