亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 1618 | 回復(fù): 4
打印 上一主題 下一主題

[OpenBSD] OpenBSD3.8下的流量控制問題 [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報告]
發(fā)表于 2006-02-21 10:32 |只看該作者 |倒序瀏覽
我的pf.conf角本

ext_if="fxp0"
int_if="vr0"
my="192.168.0.1"

#table <spamd> persist
#table <spamd-white> persist

altq on $int_if cbq bandwidth 100Mb queue { std, ftp, ssh }
queue std bandwidth 90Mb cbq(default)
#queue tcp_ack priority 7
queue ftp bandwidth 1Mb priority 3
queue ssh bandwidth 9Mb cbq(borrow)

#set optimization aggressive
#scrub in on $ext_if

binat on $ext_if from $my to any -> 10.101.200.33
nat on $ext_if from !($ext_if) -> ($ext_if:0)
#rdr pass on $int_if proto tcp to port ftp -> 127.0.0.1 port 8021
#rdr pass on $ext_if proto tcp from <spamd> to port smtp \
#       -> 127.0.0.1 port spamd
#rdr pass on $ext_if proto tcp from !<spamd-white> to port smtp \
#       -> 127.0.0.1 port spamd

set skip on lo
pass on $ext_if all keep state

pass out on $int_if keep state
pass in on $int_if from any to any keep state flags S/SA queue std
pass in on $int_if proto tcp from any to any port 21 queue ftp
pass in on $int_if proto tcp from any to any port 22 queue ssh

=====================================================
我從ftp上下載一個5M大小的文件作為測試,但ftp和ssh似乎都未能成功限速
pfctl -v -sa |more

FILTER RULES:
pass on fxp0 all keep state
  [ Evaluations: 163       Packets: 7179      Bytes: 6341386     States: 30    ]
  [ Inserted: uid 0 pid 18702 ]
pass out on vr0 all keep state
  [ Evaluations: 163       Packets: 134       Bytes: 7305        States: 21    ]
  [ Inserted: uid 0 pid 18702 ]
pass in on vr0 all flags S/SA keep state queue std
  [ Evaluations: 77        Packets: 7025      Bytes: 6332705     States: 3     ]
  [ Inserted: uid 0 pid 18702 ]
pass in on vr0 proto tcp from any to any port = ftp queue ftp
  [ Evaluations: 33        Packets: 1         Bytes: 48          States: 0     ]
  [ Inserted: uid 0 pid 18702 ]
pass in on vr0 proto tcp from any to any port = ssh queue ssh
  [ Evaluations: 31        Packets: 0         Bytes: 0           States: 0     ]
  [ Inserted: uid 0 pid 18702 ]


ALTQ:
queue root_vr0 bandwidth 100Mb priority 0 cbq( wrr root ) {std, ftp, ssh}
  [ pkts:      34441  bytes:    7897576  dropped pkts:      0 bytes:      0 ]
  [ qlength:   0/ 50  borrows:      0  suspends:      0 ]
queue  std bandwidth 90Mb cbq( default )
  [ pkts:      34441  bytes:    7897576  dropped pkts:      0 bytes:      0 ]
  [ qlength:   0/ 50  borrows:      0  suspends:      0 ]
queue  ftp bandwidth 1Mb priority 3
  [ pkts:          0  bytes:          0  dropped pkts:      0 bytes:      0 ]
  [ qlength:   0/ 50  borrows:      0  suspends:      0 ]
queue  ssh bandwidth 9Mb cbq( borrow )
  [ pkts:          0  bytes:          0  dropped pkts:      0 bytes:      0 ]
  [ qlength:   0/ 50  borrows:      0  suspends:      0 ]
====================================================
請問各位有經(jīng)驗的達(dá)人們,我的pf.conf角本到底有什么錯誤呀

還有,如果我使用scrub in語句,就會在加載角本的時候報出錯信息,我記得3.8以前的版本都不會這樣的
# pfctl -f pf.conf.tes     t                                                                                                               
pf.conf.test:21: Rules must be in order: options, normalization, queueing, translation, filtering
pfctl: Syntax error in config file: pf rules not loaded

論壇徽章:
2
丑牛
日期:2013-09-29 09:47:222015七夕節(jié)徽章
日期:2015-08-21 11:06:17
2 [報告]
發(fā)表于 2006-02-21 10:38 |只看該作者
Rules must be in order: options, normalization, queueing, translation, filtering

注意順序

論壇徽章:
0
3 [報告]
發(fā)表于 2006-02-21 10:42 |只看該作者
啊哈,scrub in的問題解決了,謝謝幫忙,另外那個問題也請多多幫忙,我試了一上午了,還是沒有成功

論壇徽章:
0
4 [報告]
發(fā)表于 2006-02-22 19:25 |只看該作者
使用連接數(shù)進(jìn)行限, max-src-state等, 對bt 等多連接有特效, 對ssh, ftp這種單連接的可能失效。

對std的隊列的端口中去掉ftp, ssh, 因為執(zhí)行了這條規(guī)則后面的ftp, ssh這兩條規(guī)則不會執(zhí)行。


  1.   
  2. pass in on $int_if from any to any port $other-ports keep state flags S/SA queue std
復(fù)制代碼


[ 本帖最后由 rainren 于 2006-2-22 19:38 編輯 ]

論壇徽章:
0
5 [報告]
發(fā)表于 2006-02-22 19:42 |只看該作者
這是我們常犯的一個錯誤, 我也是前些時候在使用一個腳本封IP時看出來的!
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報專區(qū)
中國互聯(lián)網(wǎng)協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP