0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

[メモ]Squidでプロキシを試してみる

Last updated at Posted at 2020-06-05

EC2にSquidをインストールする

以下参考にさせて頂きました。
[AWS EC2にプロキシサーバを構築して海外向けサイトを国内から閲覧する]
(https://haloechoes.com/server-operations/build-proxy-servers-for-overseas-sites/)

Proxy 接続テスト

ブラウザーにプロキシ設定を追加してアクセス。送信元IPがEC2のIPになる
image.png

ログ

googleにアクセスした際のSquidアクセスログ

[05/Jun/2020:05:19:46 +0000] "GET http://google.com/ HTTP/1.1" 301 653 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:65.0) Gecko/20100101 Firefox/65.0" TCP_MISS:HIER_DIRECT
[05/Jun/2020:05:19:47 +0000] "POST http://ocsp.pki.goog/gts1o1 HTTP/1.1" 200 826 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:65.0) Gecko/20100101 Firefox/65.0" TCP_MISS:HIER_DIRECT

リバースProxy接続テスト

以下参考にさせて頂きました。
Squidをリバースプロキシサーバーとして使う

ログ

Squidアクセスログ

[05/Jun/2020:07:18:17 +0000] "GET http://xxx.ap-northeast-1.compute.amazonaws.com:3128/test.html HTTP/1.1" 304 405 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36" TCP_REFRESH_UNMODIFIED:FIRSTUP_PARENT

Nginxアクセスログ

127.0.0.1 - - [05/Jun/2020:07:21:18 +0000] "GET /test.html HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36" "220.215.xxx.xxx"
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?