問題:squid 與DNS 的疑問 最近小弟在設定proxy sever出現了我覺得奇怪的地方,我一開始試用一台測試伺服器(192.168.0.3 主機名稱testserver)架設好squid在IE上做好 proxy 的設定,而在這台主機上的網路服務只有22、 111、139、445、3128這幾個,在client連線上網都正常,後來又在另一台安裝好squid(192.168.0.2 主機名稱 server),將IE的 proxy 設定成 192.168.0.2這台,卻發現開謀些網頁會出現 DNS no records 的現象,如下 The requested URL could not be retrieved -------------------------------------------------------------------------------- While trying to retrieve the URL: [url]http://www.thg.com.tw/index.html[/url] The following error was encountered: Unable to determine IP address from host name for [url]www.thg.com.tw[/url] The dnsserver returned: No DNS records This means that: The cache was not able to resolve the hostname presented in the URL. Check if the address is correct. Your cache administrator is webmaster. -------------------------------------------------------------------------------- Generated Wed, 04 Oct 2006 03:30:33 GMT by server (squid/2.6.STABLE4) 我就在想是不是我的設定檔問題,於是就把testserver的設定檔拿到server的主機上使用,但是結果還是一樣,差別在於我的server主機有其他的服務21、22、25、53、80、111、139、445、....3128等服務,主機都在一台IP分享器底下,我的設定檔如下 http_port 3128 cache_dir diskd /home/proxy_cache 1000 16 256 access_log /usr/local/squid/var/logs/access.log squid cache_log /usr/local/squid/var/logs/cache.log refresh_pattern ^ftp: 1440 20% 10080 refresh_pattern ^gopher: 1440 0% 1440 refresh_pattern . 0 20% 4320 acl internalip src 192.168.0.0/24 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 localhost http_access allow internalip http_access deny all http_reply_access allow all cache_effective_user nobody cache_effective_group nobody visible_hostname server 其他一大堆的都是系統預設前面有#字的設定,我自己覺得可能是DNS的問題,我也有將DNS給stop在測試,結果還是相同,還請各位高手幫小弟指點一下方向,謝謝!:confused: |
回覆: 問題:squid 與DNS 的疑問 hi, 這樣的錯誤訊息, Unable to determine IP address from host name for [url]www.thg.com.tw[/url] 是否有嘗試過用 nslookup 和 dig 除錯? 另第二台 squid 主機的 dns server 是否有指定到外部 dns ? 如:/etc/resolv.conf 希望能幫上忙 |
回覆: 問題:squid 與DNS 的疑問 謝謝樓上大哥提示,我去比對一下兩台的DNS設定,192.168.0.3那台對外DNS是168.95.0.1而192.168.0.2那台是社168.95.1.1 後來將168.95.1.1改成168.95.192.1或168.95.0.1或改成自己192.168.0.2就沒問題了:circle: |
所有時間均為 +8。現在的時間是 01:54 AM。 |
XML | RSS 2.0 | RSS |
本論壇所有文章僅代表留言者個人意見,並不代表本站之立場,討論區以「即時留言」方式運作,故無法完全監察所有即時留言,若您發現文章可能有異議,請 email :[email protected] 處理。