質問するログイン新規登録

質問編集履歴

4

誤字があったため

2020/08/05 20:29

投稿

ayamiya0713
ayamiya0713

スコア6

title CHANGED
File without changes
body CHANGED
@@ -75,4 +75,4 @@
75
75
  ご存知の方、ご教授いただければ幸いです。
76
76
 
77
77
 
78
- 追記します。多段プロキシ構成となっており、主なホワイトリスト制限は子プロキシでかけるため、子プロキシの設定ファイルを記述しております。また、上手くいかないのはwhitelistのURL中身のみであり、それ以外のサブドメインなどで記述したものは適用されています。
78
+ 追記します。多段プロキシ構成となっており、主なホワイトリスト制限は子プロキシでかけるため、子プロキシの設定ファイルを記述しております。また、上手くいかないのはwhitelistのIPで記述した箇所のみであり、それ以外のサブドメインなどで記述したものは適用されています。

3

squid.confとwhitelistの内容を記述

2020/08/05 20:29

投稿

ayamiya0713
ayamiya0713

スコア6

title CHANGED
File without changes
body CHANGED
@@ -72,4 +72,7 @@
72
72
  squidのホワイトリストで、サイトのURLではなくIPを許可したいのですが、どのように記述すればいいのでしょうか。
73
73
  試しにgoogleのIP(216.58.220.142)をそのまま記述してみたのですが、うまくいきませんでした。
74
74
 
75
- ご存知の方、ご教授いただければ幸いです。
75
+ ご存知の方、ご教授いただければ幸いです。
76
+
77
+
78
+ 追記します。多段プロキシ構成となっており、主なホワイトリスト制限は子プロキシでかけるため、子プロキシの設定ファイルを記述しております。また、上手くいかないのはwhitelistのURLの中身のみであり、それ以外のサブドメインなどで記述したものは適用されています。

2

squid.confとwhitelistの内容を記述

2020/08/05 20:28

投稿

ayamiya0713
ayamiya0713

スコア6

title CHANGED
File without changes
body CHANGED
@@ -1,4 +1,4 @@
1
- ```ここに言語を入力
1
+ ```squid.conf
2
2
  acl SSL_ports port 443
3
3
  acl Safe_ports port 80 # http
4
4
  # acl Safe_ports port 21 # ftp
@@ -61,7 +61,15 @@
61
61
 
62
62
  #logrotate setting
63
63
 
64
+ ```
65
+ ```whitelist
66
+ .cman.jp
67
+ .directcloud.jp
68
+ www.air-japan.jp
69
+ 216.58.220.142
70
+ ```
71
+
64
- ```squidのホワイトリストで、サイトのURLではなくIPを許可したいのですが、どのように記述すればいいのでしょうか。
72
+ squidのホワイトリストで、サイトのURLではなくIPを許可したいのですが、どのように記述すればいいのでしょうか。
65
73
  試しにgoogleのIP(216.58.220.142)をそのまま記述してみたのですが、うまくいきませんでした。
66
74
 
67
75
  ご存知の方、ご教授いただければ幸いです。

1

squid.confの内容を記述しました

2020/08/05 20:19

投稿

ayamiya0713
ayamiya0713

スコア6

title CHANGED
File without changes
body CHANGED
@@ -1,4 +1,67 @@
1
+ ```ここに言語を入力
2
+ acl SSL_ports port 443
3
+ acl Safe_ports port 80 # http
4
+ # acl Safe_ports port 21 # ftp
5
+ acl Safe_ports port 443 # https
6
+ # acl Safe_ports port 70 # gopher
7
+ # acl Safe_ports port 210 # wais
8
+ # acl Safe_ports port 1025-65535 # unregistered ports
9
+ # acl Safe_ports port 280 # http-mgmt
10
+ # acl Safe_ports port 488 # gss-http
11
+ # acl Safe_ports port 591 # filemaker
12
+ # acl Safe_ports port 777 # multiling http
13
+
14
+
15
+ acl CONNECT method CONNECT
16
+
17
+ acl client1 src <クライアントIP>
18
+
19
+ http_access deny !Safe_ports
20
+
21
+ http_access deny CONNECT !SSL_ports
22
+
23
+ http_access allow localhost manager
24
+ http_access deny manager
25
+
26
+ http_access allow client1
27
+ http_access allow localhost
28
+ http_access deny all
29
+
30
+ # Squid listens to port
31
+ http_port 8080
32
+
33
+ # ParentProxySetting
34
+ cache_peer <親プロキシのPrivateIP> parent 8080 0 no-query
35
+
36
+ acl whitelist dstdomain "/etc/squid/whitelist"
37
+
38
+
39
+ cache_peer_access <親プロキシのプライベートIP> allow whitelist
40
+ cache_peer_access <親プロキシのプライベートIP> deny all
41
+ never_direct allow all
42
+
43
+ # Uncomment and adjust the following to add a disk cache directory.
44
+ # cache_dir ufs /var/spool/squid 100 16 256
45
+ # cache_mem 256MB
46
+
47
+ # Leave coredumps in the first cache dir
48
+ coredump_dir /var/spool/squid
49
+
50
+ no_cache deny all
51
+
52
+ #
53
+ # Add any of your own refresh_pattern entries above these.
54
+ #
55
+ refresh_pattern ^ftp: 1440 20% 10080
56
+ refresh_pattern ^gopher: 1440 0% 1440
57
+ refresh_pattern -i (/cgi-bin/|?) 0 0% 0
58
+ refresh_pattern . 0 20% 4320
59
+
60
+ logformat squid [%{%Y/%m/%d.%H:%M:%S}tl] %6tr %>a %Ss/%03>Hs %<st %rm %ru %[un %Sh/%<a %mt
61
+
62
+ #logrotate setting
63
+
1
- squidのホワイトリストで、サイトのURLではなくIPを許可したいのですが、どのように記述すればいいのでしょうか。
64
+ ```squidのホワイトリストで、サイトのURLではなくIPを許可したいのですが、どのように記述すればいいのでしょうか。
2
65
  試しにgoogleのIP(216.58.220.142)をそのまま記述してみたのですが、うまくいきませんでした。
3
66
 
4
67
  ご存知の方、ご教授いただければ幸いです。