質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
Amazon EC2

Amazon EC2は“Amazon Elastic Compute Cloud”の略称です。Amazon Web Services(AWS)の一部であり、仮想化されたWebサーバーのコンピュータリソースをレンタルできるサービスです。

AWS(Amazon Web Services)

Amazon Web Services (AWS)は、仮想空間を機軸とした、クラスター状のコンピュータ・ネットワーク・データベース・ストーレッジ・サポートツールをAWSというインフラから提供する商用サービスです。

Q&A

0回答

1023閲覧

EC2+Squidでプロキシサーバを立てて、複数IPでアクセス元を分散させる

Anon_

総合スコア334

Amazon EC2

Amazon EC2は“Amazon Elastic Compute Cloud”の略称です。Amazon Web Services(AWS)の一部であり、仮想化されたWebサーバーのコンピュータリソースをレンタルできるサービスです。

AWS(Amazon Web Services)

Amazon Web Services (AWS)は、仮想空間を機軸とした、クラスター状のコンピュータ・ネットワーク・データベース・ストーレッジ・サポートツールをAWSというインフラから提供する商用サービスです。

0グッド

0クリップ

投稿2020/04/19 05:13

編集2022/01/12 10:55

下記のサイトの通りに設定を行ったのですが、アクセスのたびにIPが変わりません。
他のサイトも確認し色々試してみたのですが何が間違っているのか検討がつかない状況です。

下記サイトの記載で設定が間違っている点などがあれば教えていただきたいです。

https://blog.ryskit.com/entry/2019/06/01/221836

「追記」
squid.confの設定内容です。IPは伏せております。

# # Recommended minimum configuration: # # Example rule allowing access from your local networks. # Adapt to list your (internal) IP networks from where browsing # should be allowed 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 localnet src fc00::/7 # RFC 4193 local private network range acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines 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 # # Recommended minimum Access Permission configuration: # # Deny requests to certain unsafe ports http_access deny !Safe_ports # Deny CONNECT to other than secure SSL ports http_access deny CONNECT !SSL_ports # Only allow cachemgr access from localhost http_access allow localhost manager http_access deny manager http_access allow localnet http_access allow localhost coredump_dir /var/spool/squid # # Add any of your own refresh_pattern entries above these. # 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 http_access allow all client_persistent_connections off server_persistent_connections off acl balance random 1/2 balance_on_multiple_ip on http_port 3218 visible_hostname unknown forwarded_for off request_header_access X-Forwarded-For deny all request_header_access Via deny all request_header_access Cache-Control deny all reply_header_access X-Forwarded-For deny all reply_header_access Via deny all reply_header_access Cache-Control deny all max_filedesc 65535 tcp_outgoing_address 52.xxx.xxx.xxx balance tcp_outgoing_address 52.xxx.xxx.xxx balance

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

yu_1985

2020/04/19 14:31

記載が途中までになってるので追記してください。 また、実際の設定を貼ったほうがいいでしょう。 そもそも、スクレイピングが弾かれるのを防ぐために接続元IPを変えるというのは、なぜ向こうが接続を弾いているかを考えるとお行儀のいいことだとは思いませんが…。
Anon_

2020/04/20 04:31

ありがとうございます。 あくまで後学のためですので実際に利用するわけではありません。 よろしくお願いいたします。
Anon_

2020/04/21 04:08

全く同じ通りにやっているのですがなぜなのでしょうか。
yu_1985

2020/04/21 06:07

「下記サイトの記載」ではなく「実際の自分の設定」をコードブロックで貼ったほうがいいです。 自分では気づいていないところでミスをしている可能性がゼロではありません。
yu_1985

2020/04/21 13:15

> 52.xxx.xxx.xxx はパブリックIPだと思いますが、この部分に設定するのはプライベートIPではないでしょうか?
Anon_

2020/04/24 00:45

おっしゃる通りプライベートIPを設定し直したのですが、ランダムにIPが振り分けられません。 確認くんで確認しているのですがインスタンスに自動で割り振られるパブリックIPしか表示されません。
Anon_

2020/04/25 02:15

別の回線からアクセスしてみたところ割り当てた別のIPに割り振られました。 ただブラウザを更新するたびにIPが変わるわけではなくキャッシュか何かで保たれるのでしょうか。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問