![](/img/trans.png)
[英]Expose client behind NAT to internet by using a public reverse-proxy (with access to the internet)
[英]Basic Authentication in Squid Server(behind NAT) over internet
我已經搜索了“基本身份驗證無法通過互聯網在squid服務器上工作”的搜索類型沒有適當的答案我的問題。
這是我的問題:我在防火牆后面設置了一個squid代理服務器。 我已將端口(54321)轉發到squid代理正在偵聽的端口9999。 現在一切都很好。 我可以從任何地方連接到這個代理。 但我需要某種身份驗證,因此啟用了basic_ncsa_auth。 現在,我可以在從LAN計算機進行身份驗證后訪問Internet。 很好,一切都按照我的意願進行,但是,
來自互聯網我有用戶名/密碼(firefox)彈出窗口,經過身份驗證后,我從squid代理獲得“緩存訪問被拒絕”消息。
如果有人指出我在這里做錯了什么,我真的很感激。
這是我的squid.conf文件:
http_port 9999
auth_param basic program /usr/lib/squid3/basic_ncsa_auth /etc/squid3/passwd
auth_param basic realm proxy
acl authenticated proxy_auth REQUIRED
http_access allow authenticated
網絡設置:防火牆靜態IP:端口:54321轉發到代理服務器:10.11.12.8:9999。
你的Squid配置是否允許http_reply_access?
http_reply_access allow all
如果密碼超過8個字符,則還需要確保未使用DES散列,這是htpasswd命令的默認值。
以下是使用MD5散列算法創建新密碼文件的方法:
[root@localhost ~] htpasswd -cm /tmp/passwd testuser
New password:
Re-type new password:
Adding password for user testuser
檢查文件的內容:
[root@localhost ~] cat /tmp/password
testuser:$apr1$VxCDyltg$krZ6v7VrnULVOiuS0u6KD1
使用basic_ncsa_auth驗證密碼:
[root@localhost ~] /usr/lib64/squid/basic_ncsa_auth /tmp/passwd
testuser superspurs
OK
現在在CLI驗證:
[root@TLABprx00 ~]# http_proxy=http://localhost:9999/ curl http://www.msftncsi.com/ncsi.txt --proxy-user testuser:superspurs
Microsoft NCSI
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.