ทดสอบๆๆ ระบบ Reverse Proxy ไหลย้อนกลับ ;D

โดยการนำ
Squid หรือปลาหมึก สวรรค์มาช่วย ลด Process เครื่องลงได้มากกว่า " 50 % :"
หากเพบปัญหาใดๆ เข้าเวปได้ช้า หรือ ไว กว่าเดิมรบกวนแจ้งด้วยนะคร้าบบบผม
เพราะคงเป็นไม้ตายสุดท้ายที่ผมจะงัดออกมาใช้ คือการนำ Proxy Server มาใช้ประโยชน์กับเวป ๛sc ก็คือการนำ เทคโนโลยี่ ปลาหมึก สวรรค์ มาใช้ให้เป็นประโยชน์กับเวปของตัวเองซะเลย....แต่วิ่ธีการ Set config แตกต่างกันโดยสิ้นเชิงกับการนำมาใช้ แบบร้านเนตทั่วไปเลยนะครับ ทดสอบจริงแล้ว Process หายลงไปก่า 50% เลยทีเดียว

ขอบคุณครับ
และขอขอบคุณ ปลาหมึกสวรรค์ ......มาช่วยด้วย
ทดลองดูนะครับ เพราะตอนนี้ก็ยังโดน Flood อยู่ แต่ ใช้ Snort จับ ดักเอาไว้หมดเล้ว...
ส่วน Admin หรือผู้ดูแลระบบ Webhosing ให้องค์กรท่านลองเอาปลาหมึกมาใช้ดูนะครับ เอา config " จริงๆ " ของผมไปทดสอบดูได้เลยครับ...
เหอๆ Reverse Proxy สมชื่อ จริงๆ ชนาด Config ยังต้อง Reverse กลับหัวตามเลย เอากับมันเลย สิท่าน :c_laugh:
นี่ครับ squid.conf ของ เวปผม
acl snmppublic snmp_community local-squid-ro
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 local_network src 172.16.0.0/16 10.0.0.0/8
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
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 nc_post method POST
acl nc_script urlpath_regex -i \.htm \.php \.html /$
cache deny nc_post
cache deny nc_script
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
acl web_ports port 80
http_access allow web_ports
http_access allow manager localhost
http_access allow manager local_network
http_access deny manager
acl purge method PURGE
http_access allow purge localhost
http_access allow purge local_network
http_access deny purge
http_access deny all
icp_access deny all
http_port 9085 transparent
cache_peer 61.47.6.178 multicast 80 0 no-query
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY
memory_replacement_policy heap LFUDA
cache_replacement_policy heap LFUDA
access_log none
cache_access_log /dev/null
cache_log /dev/null
cache_store_log none
acl apache rep_header Server ^Apache
no_cache deny QUERY apache
broken_vary_encoding allow apache
cache_effective_user squid
cache_effective_group squid
visible_hostname ReverseProxyBySiamCaFe.net
#cache_dir aufs /var/spool/squid 10240 16 256
#refresh_pattern /.gif 4320 50% 43200
#refresh_pattern /.jpg 4320 50% 43200
#refresh_pattern /.jpeg 4320 50% 43200
#refresh_pattern /.png 4320 50% 43200
#refresh_pattern ^ftp: 14400 90% 43200 reload-into-ims
#refresh_pattern ^gopher: 1440 0% 1440
#refresh_pattern . 0 20% 4320 reload-into-ims
ผมใช้วิธี การ ใช้ Iptables ให้เป็นประโยชน์แทนครับโดยการจับ Port เวป " 80 " ไปยัง Port ที่เรากำหนดไว้ใน Proxy Server โดยการพิมพ์คำสั่ง
iptables-t nat -D PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 9085
iptables save
iptables restart
จบ