![]() |
PCDVD數位科技討論區
(https://www.pcdvd.com.tw/index.php)
- 疑難雜症區
(https://www.pcdvd.com.tw/forumdisplay.php?f=34)
- - 關於squid的問題(for freebsd)
(https://www.pcdvd.com.tw/showthread.php?t=922130)
|
---|
關於squid的問題(for freebsd)
我的系統版本是freebsd 2.6.9-89.35.1.EL
squid的版本是2.5 stable2 現在的問題是,我在上面架設proxy,但3128port不知為啥開不了 我用別台電腦去telnet 3128,但都出現連線失敗 應該說,我嘗試過其他的port也是一樣,都會出線連線失敗 而在linux主機上去telnet 3128其他台時都正常,不清楚問題再那 設定檔內去看都有設定. 這個是squid的設定檔 http://www.megaupload.com/?d=BLGDQRUX 執行服務的過程中沒有錯誤訊息 這是個是啟動squid後的log檔 Mar 1 14:51:47 edm101 freshclam[2908]: -------------------------------------- Mar 1 14:52:05 edm101 sshd(pam_unix)[3546]: session opened for user root by (uid=0) Mar 1 14:54:08 edm101 sshd(pam_unix)[3577]: session opened for user root by (uid=0) Mar 1 15:01:11 edm101 clamd[2679]: No stats for Database check - forcing reload Mar 1 15:01:12 edm101 clamd[2679]: Reading databases from /var/clamav Mar 1 15:01:19 edm101 clamd[2679]: Database correctly reloaded (905686 signatures) Mar 1 15:03:17 edm101 squid[3608]: Squid Parent: child process 3610 started Mar 1 15:03:52 edm101 squid[3608]: Squid Parent: child process 3610 exited with status 0 而以下這個則是啟動squid的過程 # /usr/local/squid/sbin/squid -N -d1 2011/03/01 15:04:06| Starting Squid Cache version 2.5.STABLE2 for i686-pc-linux-gnu... 2011/03/01 15:04:06| Process ID 3613 2011/03/01 15:04:06| With 1024 file descriptors available 2011/03/01 15:04:06| Performing DNS Tests... 2011/03/01 15:04:06| Successful DNS name lookup tests... 2011/03/01 15:04:06| DNS Socket created at 0.0.0.0, port 34273, FD 4 2011/03/01 15:04:06| Adding nameserver xxx.xxx.xxx.xxx from /etc/resolv.conf 2011/03/01 15:04:06| Unlinkd pipe opened on FD 9 2011/03/01 15:04:06| Swap maxSize 3072000 KB, estimated 236307 objects 2011/03/01 15:04:06| Target number of buckets: 11815 2011/03/01 15:04:06| Using 16384 Store buckets 2011/03/01 15:04:06| Max Mem size: 8192 KB 2011/03/01 15:04:06| Max Swap size: 3072000 KB 2011/03/01 15:04:06| logfileOpen: /usr/local/squid/var/logs/store/log: (21) Is a directory 2011/03/01 15:04:06| Rebuilding storage in /usr/local/squid/var/cache1 (CLEAN) 2011/03/01 15:04:06| Rebuilding storage in /usr/local/squid/var/cache2 (CLEAN) 2011/03/01 15:04:06| Using Least Load store dir selection 2011/03/01 15:04:06| chdir: /usr/local/squid/var/cache: (2) No such file or directory 2011/03/01 15:04:06| Current Directory is /usr/local/squid/sbin 2011/03/01 15:04:06| Loaded Icons. 2011/03/01 15:04:06| Accepting HTTP connections at 192.168.3.101, port 3128, FD 10. 2011/03/01 15:04:06| Accepting ICP messages at 0.0.0.0, port 3130, FD 11. 2011/03/01 15:04:06| WCCP Disabled. 2011/03/01 15:04:06| Ready to serve requests. 2011/03/01 15:04:06| Done scanning /usr/local/squid/var/cache1 swaplog (0 entries) 2011/03/01 15:04:06| Done scanning /usr/local/squid/var/cache2 swaplog (0 entries) 2011/03/01 15:04:06| Finished rebuilding storage from disk. 2011/03/01 15:04:06| 0 Entries scanned 2011/03/01 15:04:06| 0 Invalid entries. 2011/03/01 15:04:06| 0 With invalid flags. 2011/03/01 15:04:06| 0 Objects loaded. 2011/03/01 15:04:06| 0 Objects expired. 2011/03/01 15:04:06| 0 Objects cancelled. 2011/03/01 15:04:06| 0 Duplicate URLs purged. 2011/03/01 15:04:06| 0 Swapfile clashes avoided. 2011/03/01 15:04:06| Took 0.4 seconds ( 0.0 objects/sec). 2011/03/01 15:04:06| Beginning Validation Procedure 2011/03/01 15:04:06| Completed Validation Procedure 2011/03/01 15:04:06| Validated 0 Entries 2011/03/01 15:04:06| store_swap_size = 0k 2011/03/01 15:04:07| storeLateRelease: released 0 objects 2011/03/01 15:04:27| Preparing for shutdown after 0 requests 2011/03/01 15:04:27| Waiting 0 seconds for active connections to finish 2011/03/01 15:04:27| FD 10 Closing HTTP connection 2011/03/01 15:04:27| Shutting down... 2011/03/01 15:04:27| FD 11 Closing ICP connection 2011/03/01 15:04:27| Closing unlinkd pipe on FD 9 2011/03/01 15:04:27| storeDirWriteCleanLogs: Starting... 2011/03/01 15:04:27| Finished. Wrote 0 entries. 2011/03/01 15:04:27| Took 0.0 seconds ( 0.0 entries/sec). 唔,不知道還缺什麼呢??我執行squid之後 就停在 2011/03/01 15:04:27| Took 0.0 seconds ( 0.0 entries/sec). 不動 要自己按ctrl+c取消 但我看網路文件指出 只要有出現 2011/03/01 15:04:06| Ready to serve requests. 就算啟動成功.. 那這樣3128port還不通的話,是還缺了什麼呢?? |
freebsd 2.6.9-89.35.1.EL... 你確定? 這是對的嗎?
另外看service 有沒有起來請在 conlose 裡面 telnet 自己的 localhost 如果 localhost 有反應, 從 remote telnet 進 FreeBSD 看看... 如果不行把 rc.firewall 關掉看看 |
引用:
是的,系統版本是用指令查詢而知 conlose?是指在本機對自己的port做telnet嗎?? 如果是這樣的話,那是可以通的,已經有試過. 那remote telnet是? 關防火牆是指在squid的設定裡面嗎?我是有看到防火牆選項,而且也已經關閉 另外附上cache.log的訊息 2011/03/04 14:00:06| Starting Squid Cache version 2.5.STABLE2 for i686-pc-linux-gnu... 2011/03/04 14:00:06| Process ID 7341 2011/03/04 14:00:06| With 1024 file descriptors available 2011/03/04 14:00:06| Performing DNS Tests... 2011/03/04 14:00:06| Successful DNS name lookup tests... 2011/03/04 14:00:06| DNS Socket created at 0.0.0.0, port 32792, FD 4 2011/03/04 14:00:06| Adding nameserver xxx.xxx.xxx.xxx from /etc/resolv.conf 2011/03/04 14:00:06| Unlinkd pipe opened on FD 9 2011/03/04 14:00:06| Swap maxSize 3072000 KB, estimated 236307 objects 2011/03/04 14:00:06| Target number of buckets: 11815 2011/03/04 14:00:06| Using 16384 Store buckets 2011/03/04 14:00:06| Max Mem size: 8192 KB 2011/03/04 14:00:06| Max Swap size: 3072000 KB 2011/03/04 14:00:06| logfileOpen: /usr/local/squid/var/logs/store/log: (21) Is a directory 2011/03/04 14:00:06| Rebuilding storage in /usr/local/squid/var/cache1 (CLEAN) 2011/03/04 14:00:06| Rebuilding storage in /usr/local/squid/var/cache2 (CLEAN) 2011/03/04 14:00:06| Using Least Load store dir selection 2011/03/04 14:00:06| chdir: /usr/local/squid/var/cache: (2) No such file or directory 2011/03/04 14:00:06| Current Directory is /root 2011/03/04 14:00:06| Loaded Icons. 2011/03/04 14:00:06| Accepting HTTP connections at 192.168.3.101, port 3128, FD 10. 2011/03/04 14:00:06| Accepting ICP messages at 0.0.0.0, port 3130, FD 11. 2011/03/04 14:00:06| WCCP Disabled. 2011/03/04 14:00:06| Ready to serve requests. 2011/03/04 14:00:07| Done scanning /usr/local/squid/var/cache1 swaplog (0 entries) 2011/03/04 14:00:07| Done scanning /usr/local/squid/var/cache2 swaplog (0 entries) 2011/03/04 14:00:07| Finished rebuilding storage from disk. 2011/03/04 14:00:07| 0 Entries scanned 2011/03/04 14:00:07| 0 Invalid entries. 2011/03/04 14:00:07| 0 With invalid flags. 2011/03/04 14:00:07| 0 Objects loaded. 2011/03/04 14:00:07| 0 Objects expired. 2011/03/04 14:00:07| 0 Objects cancelled. 2011/03/04 14:00:07| 0 Duplicate URLs purged. 2011/03/04 14:00:07| 0 Swapfile clashes avoided. 2011/03/04 14:00:07| Took 0.4 seconds ( 0.0 objects/sec). 2011/03/04 14:00:07| Beginning Validation Procedure 2011/03/04 14:00:07| Completed Validation Procedure 2011/03/04 14:00:07| Validated 0 Entries 2011/03/04 14:00:07| store_swap_size = 0k 2011/03/04 14:00:07| storeLateRelease: released 0 objects 2011/03/04 14:00:27| Preparing for shutdown after 0 requests 2011/03/04 14:00:27| Waiting 0 seconds for active connections to finish 2011/03/04 14:00:27| FD 10 Closing HTTP connection 2011/03/04 14:00:27| Shutting down... 2011/03/04 14:00:27| FD 11 Closing ICP connection 2011/03/04 14:00:27| Closing unlinkd pipe on FD 9 2011/03/04 14:00:27| storeDirWriteCleanLogs: Starting... 2011/03/04 14:00:27| Finished. Wrote 0 entries. 2011/03/04 14:00:27| Took 0.0 seconds ( 0.0 entries/sec). CPU Usage: 0.180 seconds = 0.059 user + 0.121 sys Maximum Resident Size: 0 KB Page faults with physical i/o: 0 Memory usage for squid via mallinfo(): total space in arena: 2000 KB Ordinary blocks: 1929 KB 4 blks Small blocks: 0 KB 11 blks Holding blocks: 192 KB 1 blks Free Small blocks: 0 KB Free Ordinary blocks: 70 KB Total in use: 2121 KB 106% Total free: 70 KB 4% 2011/03/04 14:00:27| Squid Cache (Version 2.5.STABLE2): Exiting normally. |
2011/03/04 14:00:06| Starting Squid Cache version 2.5.STABLE2 for i686-pc-linux-gnu...
你用的是linux吧...... |
2.6.9-89.35.1.EL <---- 這是 linux 的 kernel :flash:
http://www.google.com/search?q=2.6....5.1.EL&ie=UTF-8 FreeBSD 通常是從 v4 之後用的, FreeBSD 通常不會這樣說 kernel 的 version 另外我說的是: 另如: 1. 10.100.100.100 (Linux + squid 本機) 2. 10.100.100.200 (Clinet 機器, 可能是 window 或是 unix-like) 1. 首先你先確定 10.100.100.200 可以 ping 的到 10.100.100.100 2. 登入 10.100.100.100 的 console (我是說坐在實機面前登入機器, 不是用遠端登入) 3. 在 10.100.100.100 下打 telnet localhost 3128, 看有沒有反應 4. 從 10.100.100.200 下打 telnet 10.100.100.100 3128 看有沒有反應 5. 如果沒有反應, 請修改並從新啟動 linux 的 iptable, 或停掉 iptable 6. 如果有反應, 那請等 1 到 5 分鐘看有沒有起來 |
引用:
喔喔,不好意思,我對linux不很熟,所以很多東西還搞不懂 剛剛下了uname -a指令後 Linux xxx.xxx.xxx 2.6.9-89.35.1.EL #1 Tue Jan 18 17:34:23 EST 2011 i686 i686 i386 GNU/Linux 原來是linux.. 喔喔喔喔喔!!!!!!可以了!!!!!!! 成功了!!!!! 非常感謝PAN_PAN網友提供了iptable的關鍵字!!!! 不過,現在還有個問題,我使用ip網頁查詢,發現透過該proxy server出去的ip是顯示unknown 但我已經有修改forwarded_for,將之改成off 不知道還要修改那邊才會送出正確的ip資訊呢??? |
引用:
修改了有從新 restart squid services 嗎? |
引用:
有的,我是直接重啟主機本身. 現在還在尋找變成unknown的原因,有可能是我那邊的設定漏掉沒設嗎?? |
引用:
http://www.cyberciti.biz/faq/squid-...ent-ip-address/ 應該是這個吧... :laugh: :laugh: |
引用:
這個我已經調過了,就是因為調成off才會顯示unknown.. 我之前在windows用同一套架過,一樣是改成off,就會正常顯示ip,不知道是那邊漏掉了呢? |
所有的時間均為GMT +8。 現在的時間是10:43 PM. |
vBulletin Version 3.0.1
powered_by_vbulletin 2025。