HOME  |  SERVICES  |  Profile  |  RSS

 

Setting Bandwidth Management OpenBSD

3:03 PM

Langsung saja buka file pf.conf : # vi /etc/pf.conf

# Interface
ext_if="rl0" #---> interface ethernet keluar (isp)
int_if="rl1" #---> interface ethernet lokal

#Target
ip_client1="192.168.1.10"
ip_client2="192.168.1.11"
ip_client3="192.168.1.12"

# Queue
altq on {$ext_if $int_if} hfsc queue {q_def,q_client1,q_share}
queue q_def bandwidth 512Kb hfsc(default realtime 512Kb upperlimit 512Kb)
queue q_client1 bandwidth 512Kb hfsc(realtime 512Kb)
queue q_share bandwidth 512Kb hfsc(realtime 512Kb upperlimit 512Kb) \
(q_client2,q_client3)
queue q_client2 bandwidth 128Kb hfsc(realtime 128Kb upperlimit 512Kb)
queue q_client3 bandwidth 64Kb hfsc(realtime 64Kb upperlimit 256Kb)

# nat/rdr

nat-anchor "ftp-proxy/*"
nat on $ext_if from $int_if:network to any -> $ext_if

rdr-anchor "ftp-proxy/*"

# pass queue
pass in quick on $int_if from $ip_client1 to any keep state queue q_client1
pass out quick on $int_if from any to $ip_client1 keep state queue q_client1

pass in quick on $int_if from $ip_client2 to any keep state queue q_client2
pass out quick on $int_if from any to $ip_client2 keep state queue q_client2

pass in quick on $int_if from $ip_client3 to any keep state queue q_client3
pass out quick on $int_if from any to $ip_client3 keep state queue q_client3

~

simpan :wq

jalankan: #pfctl -f /etc/pf.conf

0 comments:





CO.CC:Free Domain