จำกัดความเร็ว

รูปภาพของ panomm
panomm
Rating 2
Posts: 96
Joined: 28-08-2006

หวัดดีปีใหม่ คุณสมเดช  สอบถาม 1 เรื่อง ครับ

ตอนนี้ผมใช้ linux sis 5.0 อยู่ครับ 

คือ ถ้าผมจะ limit ip ลูกข่ายเบอร์ 192.168.212.222 ให้เขาใช้งาน internet ได้แค่ 10 kb ต้องทำอย่างไร ครับ

ช่วยแนะนำหน่อยครับ (ทุกวันนี้ เขาใช้งาน อินเตอร์เน็ตเยอะมากๆ เกินความจำเป็น จะให้แค่ 10 kb ก็พอ)

ขอบคุณครับ

รูปภาพของ somdej
somdej
Rating 10
Posts: 3377
Joined: 26-01-2004
ดูตัวอย่างใน proxy ของ SIS 55 ครับ

เรื่อง dely pool หนะครับ

เห็นเคยมีคนแปะไว้ให้แล้วในกระทู้ไหนซักอัน ถ้าหาไม่เจอก็บอกนะครับ จะเอา file ขึ้นให้ download ครับ ;) 

--
ช่วงเวลาของการเปลี่ยนแปลง แต่งงานพร้อมปลูกบ้าน มีลูกพร้อมย้ายสายงาน เปลี่ยนรถใหม่พร้อมกับ Notebook ใหม่ (ที่มาพร้อมกับ OS ใหม่ MacOSX) แต่ยังไง ก็ยังใช้ TLE-Ubuntu อยู่ดี :)
-----------------------------------------
ขายรถไปแล้วครับ ... เสียดายครับ ;)
-------------------------------------------------
คำแนะนำสำหรับมือใหม่ครับ เชิญที่นี่ครับ -> http://wiki.opentle.org/Newbie_README
คำแนะนำสำหรับผู้สนใจลินุกซ์ซิส (มือใหม่) เชิญที่นี่ครับ -> http://wiki.opentle.org/SIS-NewBie
คำแนะนำเรื่องความปลอดภัยของ LinuxSIS เชิญที่นี่ครับ ->  http://wiki.opentle.org/SIS5-Security
Upgrade - Bug fix ของ SIS เชิญที่นี่ครับ -> http://wiki.opentle.org/SIS-Upgrade-Bugfix
รูปภาพของ panomm
panomm
Rating 2
Posts: 96
Joined: 28-08-2006
ค้นแล้วไม่เจอ
ยังหาไม่เจอครับ
รูปภาพของ somdej
somdej
Rating 10
Posts: 3377
Joined: 26-01-2004
ที่นี่ครับ

ftp://ftp.opentle.org/people/somdej/squid.conf

:) 

--
ช่วงเวลาของการเปลี่ยนแปลง แต่งงานพร้อมปลูกบ้าน มีลูกพร้อมย้ายสายงาน เปลี่ยนรถใหม่พร้อมกับ Notebook ใหม่ (ที่มาพร้อมกับ OS ใหม่ MacOSX) แต่ยังไง ก็ยังใช้ TLE-Ubuntu อยู่ดี :)
-----------------------------------------
ขายรถไปแล้วครับ ... เสียดายครับ ;)
-------------------------------------------------
คำแนะนำสำหรับมือใหม่ครับ เชิญที่นี่ครับ -> http://wiki.opentle.org/Newbie_README
คำแนะนำสำหรับผู้สนใจลินุกซ์ซิส (มือใหม่) เชิญที่นี่ครับ -> http://wiki.opentle.org/SIS-NewBie
คำแนะนำเรื่องความปลอดภัยของ LinuxSIS เชิญที่นี่ครับ ->  http://wiki.opentle.org/SIS5-Security
Upgrade - Bug fix ของ SIS เชิญที่นี่ครับ -> http://wiki.opentle.org/SIS-Upgrade-Bugfix
รูปภาพของ panomm
panomm
Rating 2
Posts: 96
Joined: 28-08-2006
error ครับ

เข้าได้  ftp://ftp.opentle.org/people/somdej/squid.conf

เห็นไฟล์ แต่ Download ไม่ได้ครับ ขึ้นข้อความแบบนี้ครับ

An error occurren while copying the file

 

รูปภาพของ somdej
somdej
Rating 10
Posts: 3377
Joined: 26-01-2004
ขอโทษครับ

พอดีรีบร้อนไปหน่อย ลืมแก้เรื่องสิทธิหนะครับ

ตอนนี้น่าจะได้แล้วครับ ลองดูอีกครับนะคร้บ :) 

--
ช่วงเวลาของการเปลี่ยนแปลง แต่งงานพร้อมปลูกบ้าน มีลูกพร้อมย้ายสายงาน เปลี่ยนรถใหม่พร้อมกับ Notebook ใหม่ (ที่มาพร้อมกับ OS ใหม่ MacOSX) แต่ยังไง ก็ยังใช้ TLE-Ubuntu อยู่ดี :)
-----------------------------------------
ขายรถไปแล้วครับ ... เสียดายครับ ;)
-------------------------------------------------
คำแนะนำสำหรับมือใหม่ครับ เชิญที่นี่ครับ -> http://wiki.opentle.org/Newbie_README
คำแนะนำสำหรับผู้สนใจลินุกซ์ซิส (มือใหม่) เชิญที่นี่ครับ -> http://wiki.opentle.org/SIS-NewBie
คำแนะนำเรื่องความปลอดภัยของ LinuxSIS เชิญที่นี่ครับ ->  http://wiki.opentle.org/SIS5-Security
Upgrade - Bug fix ของ SIS เชิญที่นี่ครับ -> http://wiki.opentle.org/SIS-Upgrade-Bugfix
รูปภาพของ panomm
panomm
Rating 2
Posts: 96
Joined: 28-08-2006
สคริปใน squid.conf.txt
ที่โหลดมาจาก ftp ของคุณสมเดช
ขออยายความ หน่อยครับ (อธิบาย) ปัญหาคือ ผมจะจำกัดความเร็ว ของ IP เบอร์ 192.168.212.222 ให้วิ่งได้แค่ 10 k ครับ
ต้องใส่สคริปตรงไหน บ้าง ครับ
ขอบคุณครับ
#   Squid.conf preconfig for LinuxSIS 5.5
#WebA means such lines will be edited by WebAdmin in order to advance proxy configuration.
# SIS 5.5 Config WebA
http_port 8080 transparent
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
# SIS 5.5 Config WebA
cache_dir ufs /var/spool/squid 512 16 256
# SIS 5.5 Config WebA
#redirect_program /usr/bin/squidGuard -c /etc/squid/squidguard-blacklists.conf
# SIS 5.5 Config WebA
redirect_children 5
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
# SIS 5.5 Config WebA
# Dont forget to edit network here
acl SIS5_Network src 192.168.0.0/16
http_access allow SIS5_Network
# SIS 5.5 Config WebA LDAP auth Mod
#auth_param basic credentialsttl 2 hours
auth_param basic credentialsttl 30 seconds
auth_param basic casesensitive off
# SIS 5.5 Config WebA LDAP auth chk
#auth_param basic program /usr/lib/squid/squid_ldap_auth -b "ou=People,dc=sis,dc=com" localhost
#auth_param basic program /usr/lib/squid/squid_ldap_auth -b "ou=People,dc=sis,dc=com" -f "(&(uid=%s)(l=web))" localhost
#auth_param basic children 5
#auth_param basic credentialsttl 30 seconds
#acl SIS55_ldpass proxy_auth REQUIRED
#http_access allow SIS55_ldpass
# SIS 5.5 BW_Control  WebA Mod for Gaysorn
#acl SIS55_Big src 192.168.10.7/32
#acl all_network src 192.168.0.0/16
#delay_pools 2
#delay_class 1 2
#delay_parameters 1 64000/64000 32000/32000
#delay_access 1 deny SIS55_Big
#delay_access 1 allow !SIS55_Big
#all_network
#delay_class 2 2
#delay_parameters 2 64000/64000 64000/64000
#delay_access 2 allow SIS55_Big
#SIS 5.5 WebA authen by mac address
#acl SIS55_MacAdd arp 11:12:13:14:15:16
#http allow SIS55_MacAdd
#http deny !SIS55_MacAdd
#Default value from org squid
refresh_pattern ^ftp:  1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern .  0 20% 4320
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563
acl Safe_ports port 80  
# http acl Safe_ports port 21  
# ftp acl Safe_ports port 443 563 
# https, snews acl Safe_ports port 70  
# gopher acl Safe_ports port 210  
# wais acl Safe_ports port 1025-65535 
# unregistered ports acl Safe_ports port 280  
# http-mgmt acl Safe_ports port 488  
# gss-http acl Safe_ports port 591  
# filemaker acl Safe_ports port 777  
# multiling http
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access deny all
http_reply_access allow all
icp_access allow all
# SIS 5.5 Config
visible_hostname LinuxSIS_55
# SIS 5.0 Config_Trans WebA in 55 is change to one line in the same line with port
#httpd_accel_host virtual
#httpd_accel_port 80
#httpd_accel_with_proxy on
#httpd_accel_uses_host_header on
coredump_dir /var/spool/squid
access_log /var/log/squid/access.log squid
cache_log /var/log/squid/cache.log squid
รูปภาพของ somdej
somdej
Rating 10
Posts: 3377
Joined: 26-01-2004
ดูตรงส่วนของ

เรื่อง dely pool ที่ remask ไว้แหละครับ

ลองอ่านดูก่อนครับ ;) 

 

--
ช่วงเวลาของการเปลี่ยนแปลง แต่งงานพร้อมปลูกบ้าน มีลูกพร้อมย้ายสายงาน เปลี่ยนรถใหม่พร้อมกับ Notebook ใหม่ (ที่มาพร้อมกับ OS ใหม่ MacOSX) แต่ยังไง ก็ยังใช้ TLE-Ubuntu อยู่ดี :)
-----------------------------------------
ขายรถไปแล้วครับ ... เสียดายครับ ;)
-------------------------------------------------
คำแนะนำสำหรับมือใหม่ครับ เชิญที่นี่ครับ -> http://wiki.opentle.org/Newbie_README
คำแนะนำสำหรับผู้สนใจลินุกซ์ซิส (มือใหม่) เชิญที่นี่ครับ -> http://wiki.opentle.org/SIS-NewBie
คำแนะนำเรื่องความปลอดภัยของ LinuxSIS เชิญที่นี่ครับ ->  http://wiki.opentle.org/SIS5-Security
Upgrade - Bug fix ของ SIS เชิญที่นี่ครับ -> http://wiki.opentle.org/SIS-Upgrade-Bugfix
รูปภาพของ panomm
panomm
Rating 2
Posts: 96
Joined: 28-08-2006
เพิ่มเติม

ช่วงนี้หรือเปล่าครับ ท่านสมเดช

4 บรรทัดนี้หมายความว่าอย่างไร ครับ

#acl SIS55_Big src 192.168.10.7/32
#acl all_network src 192.168.0.0/16
#delay_pools 2
#delay_class 1 2

รูปภาพของ somdej
somdej
Rating 10
Posts: 3377
Joined: 26-01-2004
ตั้งแต่ BW_Control จนถึง authen by mac address

ผมจะ remask ไว้เป็นเรื่องๆ หนะครับ

ถ้ายังไม่รู้ว่าตรงไหน ก็ดูนี่ก็ได้ครับ คือตั้งแต่

#acl SIS55_Big src 192.168.10.7/32

จนถึง 

#delay_access 2 allow SIS55_Big

หนะครับ

ส่วนคำถามนั้น สองบรรทัดแรก เป็นการนิยามตัวแปร

สองบรรทัดหลัง เป็นการบอกว่าจะใช้ pool ซึ่งมี 2 pool

รายละเอียด ลอง search ตัว keyword ที่สงสัย (คงแค่ 2 บรรทัดหลัง เพราะ 2 บรรทัดแรก แค่นิยามตัวแปรเฉยๆ) ใน google ดูครับ

เช่น search คำว่า delay_pool หรือ delay_class ดูครับ :) 

--
ช่วงเวลาของการเปลี่ยนแปลง แต่งงานพร้อมปลูกบ้าน มีลูกพร้อมย้ายสายงาน เปลี่ยนรถใหม่พร้อมกับ Notebook ใหม่ (ที่มาพร้อมกับ OS ใหม่ MacOSX) แต่ยังไง ก็ยังใช้ TLE-Ubuntu อยู่ดี :)
-----------------------------------------
ขายรถไปแล้วครับ ... เสียดายครับ ;)
-------------------------------------------------
คำแนะนำสำหรับมือใหม่ครับ เชิญที่นี่ครับ -> http://wiki.opentle.org/Newbie_README
คำแนะนำสำหรับผู้สนใจลินุกซ์ซิส (มือใหม่) เชิญที่นี่ครับ -> http://wiki.opentle.org/SIS-NewBie
คำแนะนำเรื่องความปลอดภัยของ LinuxSIS เชิญที่นี่ครับ ->  http://wiki.opentle.org/SIS5-Security
Upgrade - Bug fix ของ SIS เชิญที่นี่ครับ -> http://wiki.opentle.org/SIS-Upgrade-Bugfix
รูปภาพของ panomm
panomm
Rating 2
Posts: 96
Joined: 28-08-2006
ยังยากไป

หลังจากได้ทดลอง มาหลายวัน ยังไม่เป็นผลสำเร็จครับ (ใจจริงๆไม่ยากเข้าไปแก้ด้วยมือเลยครับ กลัวมันจะตีกันกับเว็บมิน) เดี๋ยวมันจะบล็อกไม่อยู่ (ค่าที่เคยตั้งไว้)

เสนอแนะว่า น่าจะมี หน้า Advance เพิ่มเข้ามาสักนิดในส่วนของเว็บมินลักษณะคล้ายๆกับหน้าของ Bad Site / Good Site สำหรับการจำกัดความเร็ว คือให้ระบุ ip ลูกข่าย และความเร็วที่จะกำหนดให้ใช้งาน

พิจารณาด้วยครับ

ขอบคุณครับ

รูปภาพของ aums
aums
Rating 10
Posts: 1036
Joined: 08-05-2003
#acl SIS55_Big src

#acl SIS55_Big src 192.168.10.7/32
#acl all_network src 192.168.0.0/16
#delay_pools 2
#delay_class 1 2
#delay_parameters 1 64000/64000 32000/32000
#delay_access 1 deny SIS55_Big
#delay_access 1 allow !SIS55_Big
#all_network
#delay_class 2 2
#delay_parameters 2 64000/64000 64000/64000
#delay_access 2 allow SIS55_Big

เอา # ออก restart squid ซัก 3 รอบ ใช้ได้เลยครับ

--

เวลาผ่านไปไวยังโกหก

MSN : sompriaw @ hotmail.com 

E-mail : sompriaw.aums@gmail.com

รูปภาพของ somdej
somdej
Rating 10
Posts: 3377
Joined: 26-01-2004
อย่าลืมแก้
ip ให้เหมาะสมด้วยนะครับ ;)
--
ช่วงเวลาของการเปลี่ยนแปลง แต่งงานพร้อมปลูกบ้าน มีลูกพร้อมย้ายสายงาน เปลี่ยนรถใหม่พร้อมกับ Notebook ใหม่ (ที่มาพร้อมกับ OS ใหม่ MacOSX) แต่ยังไง ก็ยังใช้ TLE-Ubuntu อยู่ดี :)
-----------------------------------------
ขายรถไปแล้วครับ ... เสียดายครับ ;)
-------------------------------------------------
คำแนะนำสำหรับมือใหม่ครับ เชิญที่นี่ครับ -> http://wiki.opentle.org/Newbie_README
คำแนะนำสำหรับผู้สนใจลินุกซ์ซิส (มือใหม่) เชิญที่นี่ครับ -> http://wiki.opentle.org/SIS-NewBie
คำแนะนำเรื่องความปลอดภัยของ LinuxSIS เชิญที่นี่ครับ ->  http://wiki.opentle.org/SIS5-Security
Upgrade - Bug fix ของ SIS เชิญที่นี่ครับ -> http://wiki.opentle.org/SIS-Upgrade-Bugfix
รูปภาพของ panomm
panomm
Rating 2
Posts: 96
Joined: 28-08-2006
อีกนิด ครับ
แก้ไฟล์ชื่อ squid. อะไร ครับ
รูปภาพของ somdej
somdej
Rating 10
Posts: 3377
Joined: 26-01-2004
ก็ชื่อเดียวกับที่ผมเอาให้ download แหละครับ
squid.conf ;)
--
ช่วงเวลาของการเปลี่ยนแปลง แต่งงานพร้อมปลูกบ้าน มีลูกพร้อมย้ายสายงาน เปลี่ยนรถใหม่พร้อมกับ Notebook ใหม่ (ที่มาพร้อมกับ OS ใหม่ MacOSX) แต่ยังไง ก็ยังใช้ TLE-Ubuntu อยู่ดี :)
-----------------------------------------
ขายรถไปแล้วครับ ... เสียดายครับ ;)
-------------------------------------------------
คำแนะนำสำหรับมือใหม่ครับ เชิญที่นี่ครับ -> http://wiki.opentle.org/Newbie_README
คำแนะนำสำหรับผู้สนใจลินุกซ์ซิส (มือใหม่) เชิญที่นี่ครับ -> http://wiki.opentle.org/SIS-NewBie
คำแนะนำเรื่องความปลอดภัยของ LinuxSIS เชิญที่นี่ครับ ->  http://wiki.opentle.org/SIS5-Security
Upgrade - Bug fix ของ SIS เชิญที่นี่ครับ -> http://wiki.opentle.org/SIS-Upgrade-Bugfix
รูปภาพของ aums
aums
Rating 10
Posts: 1036
Joined: 08-05-2003
server+os  แรงพอ

server+os  แรงพอ

แต่กัว เนตแรงไม่พอ

--

เวลาผ่านไปไวยังโกหก

MSN : sompriaw @ hotmail.com 

E-mail : sompriaw.aums@gmail.com

รูปภาพของ panomm
panomm
Rating 2
Posts: 96
Joined: 28-08-2006
ยังใช้ 5.0

ผมใช้ sis 5.0 รุ่นเดิมอยู่ จะได้ไหมครับ

รูปภาพของ somdej
somdej
Rating 10
Posts: 3377
Joined: 26-01-2004
ได้ครับผม :)
ลองดูเลยครับ ;)
--
ช่วงเวลาของการเปลี่ยนแปลง แต่งงานพร้อมปลูกบ้าน มีลูกพร้อมย้ายสายงาน เปลี่ยนรถใหม่พร้อมกับ Notebook ใหม่ (ที่มาพร้อมกับ OS ใหม่ MacOSX) แต่ยังไง ก็ยังใช้ TLE-Ubuntu อยู่ดี :)
-----------------------------------------
ขายรถไปแล้วครับ ... เสียดายครับ ;)
-------------------------------------------------
คำแนะนำสำหรับมือใหม่ครับ เชิญที่นี่ครับ -> http://wiki.opentle.org/Newbie_README
คำแนะนำสำหรับผู้สนใจลินุกซ์ซิส (มือใหม่) เชิญที่นี่ครับ -> http://wiki.opentle.org/SIS-NewBie
คำแนะนำเรื่องความปลอดภัยของ LinuxSIS เชิญที่นี่ครับ ->  http://wiki.opentle.org/SIS5-Security
Upgrade - Bug fix ของ SIS เชิญที่นี่ครับ -> http://wiki.opentle.org/SIS-Upgrade-Bugfix
Syndicate content