顯示文章

這裡允許您檢視這個會員的所有文章。請注意, 您只能看見您有權限閱讀的文章。


主題 - bowingchen

頁: [1]
1
hi 大家好,

問個問題,

是否可用VMware vSphere Client(電腦A) 連到 vmware workstation 10(或9)(電腦B) 分享的vm嗎?
現在的vmware workstation 10 做得很像 vmware server 1.x,
但是就少了vmware server console。

謝謝
Bowing Chen

2
各位好,
我想在squid for windows新增使用者認證,找了些資料發現應可用ncsa_auth.exe
來達到簡單使用者認證, 但是squid執行後依然無法進行認證,可否幫忙找一下問題,謝謝.
電腦 = windows 7 x86 ultimate + squid for windows 2.7版

參考資料一
---------------------------------------------------------------
http://www.l-penguin.idv.tw/article/proxy-auth.htm
# 認證時出現的提示
auth_param basic realm Welcome to l-penguin's proxy service, please enter your name and password.
# 指定是由 ncsa_auth 認證,帳號密碼檔為 squid-passwd
auth_param basic program /usr/local/squid/libexec/ncsa_auth /usr/local/squid/etc/squid-passwd

# 設定使用 proxy_auth
acl squid-passwd proxy_auth REQUIRED
# 允許通過認證的者用者使用用 Proxy
http_access allow squid-passwd
---------------------------------------------------------------

參考資料二
---------------------------------------------------------------
Proxy Authentication
http://docstore.mik.ua/squid/FAQ-9.html
Another option is to use proxy-authentication.

   1. Recompile squid with -DUSE_PROXY_AUTH=1. Uncomment USE_PROXY_AUTH in src/Makefile.

              make clean
              vi src/Makefile
              make
              make install

   2. Configure proxy authentication in squid.conf.

              proxy_auth /usr/local/squid/etc/passwd

      passwd is an apache-style file of passwords for authenticated proxy access Looks like username:password, with the password being standard crypt() format.
   3. Create the passwd file and give the passwords to your users. You can use apache's htpasswd program to generate and maintain the passwd file. The usernames in the passwd file do not need to correspond to system user names. You may give many people the same username and password combination to access your cache.

apache's htpasswd program
http://docstore.mik.ua/Squid/htpasswd/
---------------------------------------------------------------


參考資料三
---------------------------------------------------------------
http://blog.jimbooth.co.uk/?p=3
squid.exe -i(installs the Squid service)
squid.exe -z (creates the cache directories)
– click Start and Run and type in services.msc or
click Control Panel – Administrative Tools – Services.
Squid should be listed.

squid -r (removes the Squid service)
Usage
1. Start: Control Panel/Admin.tools/Services: choose "Start" for the "Squid" service.
2. Stop: Control Panel/Admin.tools/Services: choose "Stop" for the "Squid" service.
3. squid -h Print help message.
4. squid -k reconfigure | rotate | shutdown | interrupt | kill | debug | check (Send signal to running copy and exit)
5. squid -v Print version

lets create the passwd file.

generate the hashed password for you to insert directly into the passwd file
– so go ahead and create a username and password.
http://www.htaccesstools.com/htpasswd-generator/
The result should look similar to this:

admin:$apr1$rzgs2/..$B9qzMQS9kL0nuWJpWYaSU0

Now create a text file called passwd.text in your c:\squid\etc folder -(or another folder of your choice).
Copy and paste in your user / pass combo and save and close the file.

cd\squid\libexec
ncsa_auth.exe c:\squid\etc\passwd

Now type in the user name and password you created and saved eariler in the passwd file in the format <username> <password> without the brackets but with the space.

ncsa_auth should report OK.

Now try a user name or password which does not exist – ncsa_auth should report ERR.

The program will continue in an infinite loop so press CTRL C to exit out of it.
---------------------------------------------------------------

依據以上三篇參考資料,歸納在windows應可行的資料
---------------------------------------------------------------
auth_param basic realm Welcome to Squid proxy service, please enter your name and password.
auth_param basic program c:/squid/libexec/ncsa_auth.exe c:/squid/etc/passwd
acl auth_users proxy_auth REQUIRED
http_access allow all auth_users
---------------------------------------------------------------

我的squid.conf比較像第三篇文章所示,但有些不同,經比對,我的設定檔內容如下
"第一次新增"為目前可正常run的設定檔,
"第一次新增"為要增加 ncsa_auth.exe 認證所新增的設定, squid可正常啟動, 但無法進行認證,
---------------------------------------------------------------
auth_param basic program c:/squid/libexec/ncsa_auth.exe c:/squid/etc/passwd  #第二次新增
acl auth_users proxy_auth REQUIRED   #第二次新增
acl all src all
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8
acl localnet src 10.0.0.0/8    # RFC1918 possible internal network
acl localnet src 172.16.0.0/12    # RFC1918 possible internal network
acl localnet src 192.168.0.0/16    # RFC1918 possible internal network
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 CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localnet    #-->是否要取消
http_access allow localhost   #第一次新增-->是否要取消
http_access allow all auth_users   #第二次新增
http_access deny all
icp_access allow localnet
icp_access deny all
http_port 3128
hierarchy_stoplist cgi-bin ?
access_log c:/squid/var/logs/access.log squid
refresh_pattern ^ftp:        1440    20%    10080
refresh_pattern ^gopher:    1440    0%    1440
refresh_pattern -i (/cgi-bin/|\?) 0    0%    0
refresh_pattern .        0    20%    4320
acl shoutcast rep_header X-HTTP09-First-Line ^ICY.[0-9]
upgrade_http0.9 deny shoutcast
visible_hostname localhost    #第一次新增
---------------------------------------------------------------


頁: [1]