squidをインストールしプロキシ構築したがインターネットエクスプローラーにプロキシを設定しても接続できません。
何が原因か突き止めるために問題の切り分けをしたいです。
詳しい方いましたらご教示お願い致します。
環境はkagoya vpsのcentos6です。
squidは起動しています。pingコマンドやyumコマンドも通るのでVPSはインターネットに接続できている状態です。
[root]# service squid start Starting squid: . [ OK ] [root]# service squid status squid (pid 1379) is running...
sqlclientコマンドの実行結果です。リダイレクトされていますが、問題ないとゆうことなのでしょうか。
[root]# squidclient -u aiueo http://google.com Proxy password: HTTP/1.0 301 Moved Permanently Location: http://www.google.com/ Content-Type: text/html; charset=UTF-8 Date: Wed, 11 Jul 2018 14:21:05 GMT Expires: Fri, 10 Aug 2018 14:21:05 GMT Cache-Control: public, max-age=2592000 Server: gws Content-Length: 219 X-XSS-Protection: 1; mode=block X-Frame-Options: SAMEORIGIN X-Cache: MISS from unknown X-Cache-Lookup: MISS from unknown:3128 Via: 1.0 unknown (squid/3.1.23) Connection: close <HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8"> <TITLE>301 Moved</TITLE></HEAD><BODY> <H1>301 Moved</H1> The document has moved <A HREF="http://www.google.com/">here</A>.
アクセスログはこんな感じです。
[root]# cat /var/log/squid/access.log 1531318865.725 64 ::1 TCP_MISS/301 660 GET http://google.com/ aiueo DIRECT/2404:6800:4004:81a::200e text/html
インターネットエクスプローラーにプロキシを設定しても下のようなエラーが出ておりBASIC認証で設定しましたがIDとPASSWORDも要求されませんでした。
プロキシ サーバーに問題がある、またはアドレスが正しくありません。
ポートが開放されていないために接続できないことが考えられますが、同サーバーのcentos7の環境ではポート開放のための特別なコマンドを打たずにプロキシの構築と接続確認ができているため可能性が低いと考えます。一応確認してみたところiptableもファイヤウォールも設定されておりません。kagoyaにはセキュリティグループといって特定のIPのみサーバーに接続する機能がありましたが、設定しない場合は任意のIPから接続許可されるようです。ソース
[root]# firewall-cmd --zone=public --add-port=3128/tcp --permanent -bash: firewall-cmd: command not found [root]# iptable status -bash: iptable: command not found
プロキシ構築の流れは以下のような感じです。
yum -y install squid
yum -y install httpd-tools
htpasswd -c /etc/squid/.htpasswd aiueo
vi /etc/squid/squid.conf(下記の設定を追記)
auth_param basic program /usr/lib64/squid/ncsa_auth /etc/squid/.htpasswd
auth_param basic children 5
auth_param basic realm Squid Basic Authentication
auth_param basic credentialsttl 24 hours
acl password proxy_auth REQUIRED
http_access allow password
forwarded_for off
request_header_access Referer deny all
request_header_access X-Forwarded-For deny all
request_header_access Via deny all
request_header_access Cache-Control deny all
visible_hostname unknown
no_cache deny all
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2018/07/11 14:51
2018/07/11 15:08
退会済みユーザー
2018/07/11 15:13
退会済みユーザー
2018/07/11 16:17
2018/07/11 16:28 編集
退会済みユーザー
2018/07/12 04:21
退会済みユーザー
2018/07/12 09:18