BMS-HOSxP Community
HOSxP => Linux => ข้อความที่เริ่มโดย: sudjai ที่ กันยายน 12, 2008, 08:35:22 AM
-
ช่วยแนะนำวิธี set outlook ผ่าน net proxy linux (squid) ด้วยครับ (MailBox ของ สกส ครับ)
-
ต้องไปเปิด
squid.conf
ให้เวป ???.chi.or.th ออกได้ตรงเลยไม่ต้องผ่าน proxy ครับ
ผมจำ mail มันไม่ได้ครับ
-
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 Safe_ports port 631 # cups
acl Safe_ports port 873 # rsync
acl Safe_ports port 901 # SWAT
ใน Config ของ Squid ไม่ได้เปิด port 25 (SMTP) และ 110 (imap) เอา ไว้ให้
เราต้องเพิ่ม
acl Safe_ports port 25 # SMPT
acl Safe_ports port 110 # imap
เข้าไปดูนะครับ แล้ว reatart squid อีกทีน่าจะได้แล้วครับ
-
;D
ขอบคุณครับ พี่
มาถึงบ้านก็มีคนตอบแทนแล้ว
-
ขอบคุณครับ
แต่แบบนั้นมันจะทำให้ ใช้ mail อื่นได้ด้วยครับ
แต่ว่า รพ อาจจะไม่อยากให้ใช้
;D
-
ขอบคุณมาก ๆ ครับ ทุก ๆ ท่าน กำลังทดสอบครับได้ผลไงจะแจ้งให้ทราบครับพี่น้อง
-
แต่แบบนั้นมันจะทำให้ ใช้ mail อื่นได้ด้วยครับ
แต่ว่า รพ อาจจะไม่อยากให้ใช้
>:( >:( >:( >:(
แหม...อ.อ๊อด ใจร้ายจัง mail อื่น ๆ ก็ไม่ให้ใช้เหรอ
-
ผม set ตามนี้ แล้วก็ยังออกไม่ได้ครับ ต้องแก้ไขอะไรเปล่าครับ
#Recommended minimum configuration:
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 Safe_ports port 25 # SMPT
acl Safe_ports port 110 # imap
acl CONNECT method CONNECT
# TAG: http_access
# Allowing or Denying access based on defined access lists
#
# Access to the HTTP port:
# http_access allow|deny [!]aclname ...
#
# NOTE on default values:
#
# If there are no "access" lines present, the default is to deny
# the request.
#
# If none of the "access" lines cause a match, the default is the
# opposite of the last line in the list. If the last line was
# deny, the default is allow. Conversely, if the last line
# is allow, the default will be deny. For these reasons, it is a
# good idea to have an "deny all" or "allow all" entry at the end
# of your access lists to avoid potential confusion.
#
#Default:
# http_access deny all
#
[root@hpsever2 ~]# service squid restart
Stopping squid: ................[ OK ]
Starting squid: .[ OK ]
[root@hpsever2 ~]#
-
ช่วยทีครับ จะเพิ่ม web
ucdata1.chi.or.th
ใน squid.conf อย่างไร และบรรทัดไหนครับ
-
ผมเดาว่า คงใช้ไม่กี่เครื่องนะครับ
ผมให้เครื่องที่จะออกไป สกส. ใส่ DNS ครับ
-
ใส่อย่างไร ครับช่วยแนะนำด้วย ผมใช้ 4 เครื่องนะครับ
-
ประการที่ 1
ต้องทำการเปิดการ forward ของ linux ก่อนครับ
echo 1 > /proc/sys/net/ipv4/ip_forward
หรือจะไปตั้งไว้ใน /etc/sysctl.conf ก็ได้ครับ
net.ipv4.ip_forward = 1 แนะนำให้ใช้วิธีหลังครับ
ประการที่ 2
ตั้ง rule ของ iptables
iptables -F (ถ้ายังไม่ได้ตั้งกฎอะไรไว้นะครับ)
iptables -t nat -A POSTROUTING -s 192.168.1.0/255.255.255.0 -o eth1 -j MASQUERADE
iptables -A FORWARD -s 192.168.1.0/255.255.255.0 -j ACCEPT
/etc/init.d/iptables save
/etc/init.d/iptables restart
ทำสองอย่างก็ผ่านแล้วครับ
ที่มา: http://www.thaiadmin.org/board/index.php?topic=58042.0 (http://www.thaiadmin.org/board/index.php?topic=58042.0)
-
ทำตามลิ๊งยังบ่ได้ครับ เหอะๆ ทำไงดี ขอความกรุณาท่านผู้รู้
-
ผมทำตามนี้แล้วได้ครับ
# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
# service iptables save
# service iptables restart
# echo 1 > /proc/sys/net/ipv4/ip_forward
# iptables-save -c > /etc/iptables-save
*** # คือเครื่องหมายระบุบรรทัด
แต่น่าจะเปิด port 25 กับ 110 ตามตัวอย่างของคุณ sothorn ก่อนนะครับ
eth0 ของเครื่องที่ผมใช้คือแลนตัวที่ชี้ไป router (ออกเน็ต) ครับ ลองดูนะครับ