【実践】Active Directoryでプロキシ設定を流す方法【クライアント反映・疎通確認まとめ】

Active Directory

記事内に広告が含まれています

  • Active Directory でプロキシサーバーの設定を行うグループポリシーの作り方が分からない
  • 設定が配布されているか確認まで行いたい

このようなお悩みをお持ちではありませんか?

今回は、Active Directory でプロキシサーバーの設定を一括で配布するグループポリシーの設定方法を解説します。

初心者にも分かるようにスクリーンショット付きで手順をまとめました。

次章で紹介する検証環境と同じ構成であれば、
同じように設定できると思います。

参考にしてみてください

検証環境のゴール

本記事では、

  • グループポリシーを使って、プロキシ設定を一括配布
  • 実際に設定が反映されているか確認

ここまでをゴールに解説します。

注意点(結論の先出し)

Internet Explorer の「インターネット設定(基本設定)」は、プロキシ設定を配布できるように見えますが、
今回の検証環境では ProxyServer レジストリが作成されず、プロキシが有効になっても接続先が設定されないケースを確認しました。

本記事では、新規ユーザー/既存ユーザーの両方で検証を行い、最終的にレジストリ(HKCU)へ直接設定する方法が最も確実であるという結論に至りました。

そのため、以下ではレジストリ(HKCU)へ直接プロキシ設定を配布する方法を解説します。

すぐに設定方法を知りたい方はこちらから設定手順へジャンプできます。

検証環境

今回はこちらの条件で検証を進めていきます。

  • プロキシサーバーは構築済み(squid)
  • プロキシサーバー・クライアント端末はドメイン参加済み

プロキシサーバーを構築したことがない方は、squidを用いたプロキシサーバー構築手順を別の記事で紹介してます。

プロキシサーバーについて初めて触る方でも分かるようにスクリーンショット付きで解説しています。

また、Active directoryでドメイン参加まで行ったことがない、もしくはやり方に不安がある方は
ドメイン参加手順を解説した記事も用意しています。

こちらの記事も合わせて参考にしてください。

ネットワーク構成

検証環境のネットワーク構成は以下のとおりです。

本検証では VirtualBox の NAT Network を使用しています。

NAT Network を使用することで、

  • 検証用VM同士の通信は可能
  • VMからインターネットへのアクセス可能
  • ホストOSとは相互に通信ができない

このような検証用途に適したネットワーク環境を構築できます。

Active Directoryのグループポリシー動作検証に焦点を当てるため、通信範囲を最小限にした構成を採用しています。

virtual boxのネットワークアダプターについて理解したい方は、

下記の公式ドキュメントをご参照ください。

公式ドキュメント

検証で使用するツール

検証で使用するツールとバージョンは
以下の通りです。

  • Virtual box バージョン 7.2.4 r170995 (Qt6.8.0 on Windows)
  • Windows server 2022(評価版)
  • Windows 11 pro(評価版)

設定手順

本操作はレジストリーの値を変更します。
十分に確認いただいてから行うか、検証環境で行うことをお勧めします。

グループポリシーの作成

グループポリシーの作成は主に2ステップあります。

もし有効化の手順をご存じの場合

プロキシサーバーの設定手順へ以下リンクからジャンプできます。

プロキシ設定の有効化
  • step.1
    グループポリシーの管理を開く
    グループポリシーオブジェクトを右クリック
  • step.2
    「新規」をクリック
  • step.3
    グループポリシーに名前を付ける

    ※ご利用環境によってお好きな名前を入力してください。

    ▼本記事の場合は以下のような名前にしました。

    GPO-User-Proxy-Settings
  • step.4
    作成したグループポリシーを右クリック
    「編集」をクリック
  • step.5
    レジストリーの設定項目まで遷移する

    以下のパスを参考にしてみてください。

    ユーザーの構成 > 基本設定 > Windowsの設定 > レジストリ

    実際の設定画面はこちらになります。

  • step.6
    「レジストリ」を右クリック
    「新規作成」 > 「レジストリ項目」をクリック
  • step.7
    「…」をクリック
  • step.8
    以下表を確認しながら、ProxyEnableのプロパティまで遷移する
    値のデータを「00000001」に書き換えて「OK」をクリック
    項目
    HiveHKEY_CURRENT_USER
    KeySoftware\Microsoft\Windows\CurrentVersion\Internet Settings
    Value nameProxyEnable
    TypeREG_DWORD
    Value00000001

    ※Valueに関しては「1」を入力いただいても問題ありません。
     OKをクリックすると「00000001」に自動で変換されます。

    実際の画面は以下の通りです。

  • step.9
    グループポリシー管理エディター上で「step.8」で設定した値が
    反映されていることを確認する

    この状態でグループポリシーの適用を行った場合、
    クライアント端末側は「プロキシサーバーを使う」がオンになります

まなび丸
まなび丸

次はプロキシサーバーの情報を入力するレジストリーの作成になります。

プロキシサーバーの反映
  • step.1
    「レジストリ」を右クリック
    「新規作成」 > 「レジストリ項目」をクリック
  • step.2
    「…」をクリック
  • step.3
    以下表を確認しながら、ProxyEnableのプロパティまで遷移する
    値のデータにプロキシサーバーの情報を入力して「OK」をクリック
    項目
    操作更新(Update)
    HiveHKEY_CURRENT_USER
    キー パスSoftware\Microsoft\Windows\CurrentVersion\Internet Settings
    値の名前ProxyServer
    種類REG_SZ
    値のデータ10.0.2.250:3128

    こちらのレジストリーは既存にないため、新規で作成する必要があります。

    プロキシサーバーの情報の入力の仕方は以下の通りです。

    プロキシサーバーのIPアドレス:ポート番号

    実際の画面は以下の通りです。

  • step.4
    グループポリシー管理エディター上で「step.3」で設定した値が
    反映されていることを確認する
  • step.5
    不安な方は、作成したグループポリシーをクリック
    「設定」タブでポリシーの内容を確認する
  • step.6
    ポリシーを適用したいOUを右クリック
    「既存のGPOのリンク」をクリック
  • step.7
    作成したポリシーを選択し、「OK」をクリック

    本記事の場合は、「GPO-User-Proxy-Settings」を選択しています。

  • step.8
    該当のOUにポリシーがリンクしたことを確認する
まなび丸
まなび丸

ドメインコントローラー側の作業は完了です!
残りはクライアント端末側になります

グループポリシーの適用(クライアント端末側)

タイムラインのタイトル
  • step.1
    グループポリシーの強制適用を行う
    gpupdate /force

    以下画像のとおりに正常に適用されたことを確認します。

  • step.2
    Windowsアイコンを右クリック
    「ネットワーク接続」をクリック
  • step.3
    「プロキシ」をクリック
  • step.4
    「編集」をクリック
  • step.5
    プロキシの設定が反映されていることを確認する

クライアント端末からプロキシ経由でのアクセスを行う

curlコマンドを使用して動作確認を行っていきます。

webブラウザーを開いて動作確認をしても問題ないのですが、squidのaccess.logに大量のログが発生します。

本記事では見やすさを重視して「curl」コマンドを使います

コマンドについてあまり使ったことがない方は、ブラウザーで動作確認を頂いても構いません。

クライアント端末からwww.example.comへwebアクセスを行います。

コマンドプロンプトを立ち上げて以下コマンドを入力します。

curl https://www.example.com/ --proxy  http://10.0.2.250:3128 -v

出力結果はこちらになります。

青太文字の箇所を確認してください。

成功すると「Connection established」が表示されます。

Microsoft Windows [Version 10.0.26100.7171]
(c) Microsoft Corporation. All rights reserved.

C:\Users\testuser01>curl https://www.example.com/ --proxy  http://10.0.2.250:3128 -v
*   Trying 10.0.2.250:3128...
* CONNECT: no ALPN negotiated
* allocate connect buffer
* Establish HTTP proxy tunnel to www.example.com:443
> CONNECT www.example.com:443 HTTP/1.1
> Host: www.example.com:443
> User-Agent: curl/8.16.0
> Proxy-Connection: Keep-Alive
>
< HTTP/1.1 200 Connection established
<
* CONNECT phase completed
* CONNECT tunnel established, response 200
* schannel: disabled automatic use of client certificate
* ALPN: curl offers http/1.1
* ALPN: server accepted http/1.1
* Established connection to 10.0.2.250 (10.0.2.250 port 3128) from 10.0.2.2 port 55280
* using HTTP/1.x
> GET / HTTP/1.1
> Host: www.example.com
> User-Agent: curl/8.16.0
> Accept: */*
>
* Request completely sent off
* schannel: remote party requests renegotiation
* schannel: renegotiating SSL/TLS connection
* schannel: SSL/TLS connection renegotiated
< HTTP/1.1 200 OK
< Date: Mon, 26 Jan 2026 05:15:28 GMT
< Content-Type: text/html
< Transfer-Encoding: chunked
< Connection: keep-alive
< CF-RAY: 9c3d885f19849879-NRT
< last-modified: Fri, 23 Jan 2026 20:51:32 GMT
< allow: GET, HEAD
< CF-Cache-Status: HIT
< Age: 4928
< Accept-Ranges: bytes
< Server: cloudflare
<
<!doctype html><html lang="en"><head><title>Example Domain</title><meta name="viewport" content="width=device-width, initial-scale=1"><style>body{background:#eee;width:60vw;margin:15vh auto;font-family:system-ui,sans-serif}h1{font-size:1.5em}div{opacity:0.8}a:link,a:visited{color:#348}</style><body><div><h1>Example Domain</h1><p>This domain is for use in documentation examples without needing permission. Avoid use in operations.<p><a href="https://iana.org/domains/example">Learn more</a></div></body></html>
* Connection #0 to host 10.0.2.250:3128 left intact

C:\Users\testuser01>

squid側のaccess.logの内容は以下の通りです。

curlコマンドで指定したwebへのアクセスログが確認できます。

1769404530.021    139 10.0.2.2 TCP_TUNNEL/200 5759 CONNECT www.example.com:443 - HIER_DIRECT/104.18.27.120 -

もし、上記のようにプロキシ経由でwebアクセスができない、もしくはプロキシ側でログが確認できない場合は、

トラブル対処法「ポリシーは適用されているが、プロキシ経由での通信不可」をご確認ください。

トラブル対処法

ここからはトラブル対処法について解説します。

クライアント端末にプロキシの設定が反映されていない

クライアント端末側に設定が反映されない可能性は2つ考えられます。

  • ポリシーの設定に誤りがある
  • リンクするOUが間違っている

まずは、ドメインコントローラーでポリシーの内容があっているかもう一度チェックしてください。

次に、クライアント端末側で確認する方法を2つご紹介します。

1つめは、「reg query」コマンドで確認する方法です。

コマンドプロンプトを立ち上げて、
以下のコマンドをコピー&ペーストしてください。

reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings"

実際の出力結果はこんな感じになります。

Microsoft Windows [Version 10.0.26100.7171]
(c) Microsoft Corporation. All rights reserved.

C:\Users\testuser01>reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings"

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings
    CertificateRevocation    REG_DWORD    0x1
    DisableCachingOfSSLPages    REG_DWORD    0x1
    IE5_UA_Backup_Flag    REG_SZ    5.0
    PrivacyAdvanced    REG_DWORD    0x1
    SecureProtocols    REG_DWORD    0x20a0
    User Agent    REG_SZ    Mozilla/4.0 (compatible; MSIE 8.0; Win32)
    ZonesSecurityUpgrade    REG_BINARY    F5CA4480C460DC01
    WarnonZoneCrossing    REG_DWORD    0x1
    EnableNegotiate    REG_DWORD    0x1
    ProxyEnable    REG_DWORD    0x1
    MigrateProxy    REG_DWORD    0x1
    EnableAutodial    REG_DWORD    0x0
    NoNetAutodial    REG_DWORD    0x0
    EnableHTTP1_1    REG_DWORD    0x1
    ProxyHTTP1.1    REG_DWORD    0x1
    ShowPunycode    REG_DWORD    0x0
    EnablePunycode    REG_DWORD    0x1
    UrlEncoding    REG_DWORD    0x0
    DisableIDNPrompt    REG_DWORD    0x0
    WarnonBadCertRecving    REG_DWORD    0x1
    WarnOnPostRedirect    REG_DWORD    0x1
    ProxyServer    REG_SZ    10.0.2.250:3128

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\5.0
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Cache
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Http Filters
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Lockdown_Zones
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\P3P
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Passport
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Wpad
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones

C:\Users\testuser01>
  • ProxyEnable REG_DWORD 0x1
  • ProxyServer REG_SZ 10.0.2.250:3128

ご利用環境によってプロキシサーバーの情報は変わりますが、この2点を確認してみてください。

ポリシーを適用していないユーザーのコマンド出力結果は以下の通りです。


値が先ほどご紹介したものと異なっている点が確認できます。

Microsoft Windows [Version 10.0.26100.7171]
(c) Microsoft Corporation. All rights reserved.

C:\Users\testuser02>reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings"

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings
    CertificateRevocation    REG_DWORD    0x1
    DisableCachingOfSSLPages    REG_DWORD    0x1
    IE5_UA_Backup_Flag    REG_SZ    5.0
    PrivacyAdvanced    REG_DWORD    0x1
    SecureProtocols    REG_DWORD    0x20a0
    User Agent    REG_SZ    Mozilla/4.0 (compatible; MSIE 8.0; Win32)
    ProxyEnable    REG_DWORD    0x0
    EnableAutodial    REG_DWORD    0x0
    NoNetAutodial    REG_DWORD    0x0
    EnableHTTP1_1    REG_DWORD    0x1
    ProxyHTTP1.1    REG_DWORD    0x1
    ShowPunycode    REG_DWORD    0x0
    EnablePunycode    REG_DWORD    0x1
    UrlEncoding    REG_DWORD    0x0
    DisableIDNPrompt    REG_DWORD    0x0
    EnableNegotiate    REG_DWORD    0x1
    WarnonBadCertRecving    REG_DWORD    0x1
    WarnonZoneCrossing    REG_DWORD    0x1
    WarnOnPostRedirect    REG_DWORD    0x1
    ZonesSecurityUpgrade    REG_BINARY    F5CA4480C460DC01
    MigrateProxy    REG_DWORD    0x1

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\5.0
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Cache
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Http Filters
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Lockdown_Zones
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\P3P
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Passport
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Wpad
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones

C:\Users\testuser02>

2つ目はgpresult /r」コマンド確認する方法です。

グループポリシーが適用されていれば、
以下の通り「ポリシー」名が表示されます。

Microsoft Windows [Version 10.0.26100.7171]
(c) Microsoft Corporation. All rights reserved.

C:\Users\testuser01>gpresult /r

Microsoft (R) Windows (R) Operating System グループ ポリシーの結果ツール v2.0
© Microsoft Corporation. All rights reserved.

作成日 ‎2026/‎01/‎26 時刻 12:44:42


RSOP のデータ PROXY\testuser01 - WIN-CLIENT-01 : ログ モード
-------------------------------------------------------------

OS 構成:                     メンバー ワークステーション
OS バージョン:               10.0.26100
サイト名:                    N/A
移動プロファイル:             N/A
ローカル プロファイル        C:\Users\testuser01
低速リンクで接続: いいえ


ユーザー設定
-------------
    CN=testuser01,OU=Proxy,DC=proxy,DC=local
    前回のグループ ポリシーの適用時: 2026/01/26 (12:44:26)
    グループ ポリシーの適用元:       win-dc-01.proxy.local
    グループ ポリシーの低速リンクのしきい値:   500 kbps
    ドメイン名:                        PROXY
    ドメインの種類:                        Windows 2008 またはそれ以降

    適用されたグループ ポリシー オブジェクト
    -----------------------------------------
        GPO-User-Proxy-Settings

    次の GPO はフィルターで除外されたため適用されませんでした。
    ------------------------------------------------------------
        ローカル グループ ポリシー
            フィルター: 未適用 (空)

    ユーザーは次のセキュリティ グループの一部です
    ---------------------------------------------
        Domain Users
        Everyone
        BUILTIN\Users
        NT AUTHORITY\INTERACTIVE
        CONSOLE LOGON
        NT AUTHORITY\Authenticated Users
        This Organization
        LOCAL
        認証機関によりアサートされた ID
        Medium Mandatory Level

C:\Users\testuser01>

ポリシーを適用していないユーザーのコマンド出力結果は以下の通りです。
ポリシーが適用されていないので、値が「N/A」になっていることが確認できます。

Microsoft Windows [Version 10.0.26100.7171]
(c) Microsoft Corporation. All rights reserved.

C:\Users\testuser02>gpresult /r

Microsoft (R) Windows (R) Operating System グループ ポリシーの結果ツール v2.0
© Microsoft Corporation. All rights reserved.

作成日 ‎2026/‎01/‎26 時刻 12:42:39


RSOP のデータ PROXY\testuser02 - WIN-CLIENT-01 : ログ モード
-------------------------------------------------------------

OS 構成:                     メンバー ワークステーション
OS バージョン:               10.0.26100
サイト名:                    N/A
移動プロファイル:             N/A
ローカル プロファイル        C:\Users\testuser02
低速リンクで接続: いいえ


ユーザー設定
-------------
    CN=testuser02,CN=Users,DC=proxy,DC=local
    前回のグループ ポリシーの適用時: 2026/01/26 (12:34:42)
    グループ ポリシーの適用元:       win-dc-01.proxy.local
    グループ ポリシーの低速リンクのしきい値:   500 kbps
    ドメイン名:                        PROXY
    ドメインの種類:                        Windows 2008 またはそれ以降

    適用されたグループ ポリシー オブジェクト
    -----------------------------------------
        N/A

    次の GPO はフィルターで除外されたため適用されませんでした。
    ------------------------------------------------------------
        ローカル グループ ポリシー
            フィルター: 未適用 (空)

    ユーザーは次のセキュリティ グループの一部です
    ---------------------------------------------
        Domain Users
        Everyone
        BUILTIN\Users
        NT AUTHORITY\INTERACTIVE
        CONSOLE LOGON
        NT AUTHORITY\Authenticated Users
        This Organization
        LOCAL
        認証機関によりアサートされた ID
        Medium Mandatory Level

C:\Users\testuser02>

ポリシーは適用されているが、プロキシ経由での通信不可

プロキシ側の設定が誤っている可能性が考えられます。

本記事ではsquidを使用していますので、
こちらのソフトを使用している前提で話を進めます。

squidを起動し、「Open Squid Configuration」をクリックします。

squidのDNSサーバーの設定が入っているか確認してください。

デフォルトでは設定が入っていますが、この設定が入っていない場合

  • プロキシサーバのwebアクセス → OK
  • クライアント端末webアクセス → NG

このような事象が発生します。

#
# 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:
#

# Only allow cachemgr access from localhost
http_access allow localhost manager
http_access deny manager

# 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

# We strongly recommend the following be uncommented to protect innocent
# web applications running on the proxy server who think the only
# one who can access services on "localhost" is a local user
#http_access deny to_localhost

#
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#

# Example rule allowing access from your local networks.
# Adapt localnet in the ACL section to list your (internal) IP networks
# from where browsing should be allowed
http_access allow localnet
http_access allow localhost

# And finally deny all other access to this proxy
http_access deny all

# Squid normally listens to port 3128
http_port 3128

# Uncomment the line below to enable disk caching - path format is /cygdrive/<full path to cache folder>, i.e.
#cache_dir aufs /cygdrive/d/squid/cache 3000 16 256


# Leave coredumps in the first cache dir
coredump_dir /var/cache/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

dns_nameservers 8.8.8.8 208.67.222.222

max_filedescriptors 3200

例えば、DNSの設定を削除してsquidの再起動を実施します。

#
# 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:
#

# Only allow cachemgr access from localhost
http_access allow localhost manager
http_access deny manager

# 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

# We strongly recommend the following be uncommented to protect innocent
# web applications running on the proxy server who think the only
# one who can access services on "localhost" is a local user
#http_access deny to_localhost

#
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#

# Example rule allowing access from your local networks.
# Adapt localnet in the ACL section to list your (internal) IP networks
# from where browsing should be allowed
http_access allow localnet
http_access allow localhost

# And finally deny all other access to this proxy
http_access deny all

# Squid normally listens to port 3128
http_port 3128

# Uncomment the line below to enable disk caching - path format is /cygdrive/<full path to cache folder>, i.e.
#cache_dir aufs /cygdrive/d/squid/cache 3000 16 256


# Leave coredumps in the first cache dir
coredump_dir /var/cache/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

DNSサーバーの情報を削除

max_filedescriptors 3200

この状態でクライアント端末からcurlコマンドを実行してみます。

するとDNSのエラーでアクセス不可になっていることが確認できます。

Microsoft Windows [Version 10.0.26100.7171]
(c) Microsoft Corporation. All rights reserved.

C:\Users\testuser01>curl https://www.example.com/ --proxy  http://10.0.2.250:3128 -v
*   Trying 10.0.2.250:3128...
* CONNECT: no ALPN negotiated
* allocate connect buffer
* Establish HTTP proxy tunnel to www.example.com:443
> CONNECT www.example.com:443 HTTP/1.1
> Host: www.example.com:443
> User-Agent: curl/8.16.0
> Proxy-Connection: Keep-Alive
>
< HTTP/1.1 503 Service Unavailable
< Server: squid/4.14
< Mime-Version: 1.0
< Date: Mon, 26 Jan 2026 05:23:56 GMT
< Content-Type: text/html;charset=utf-8
< Content-Length: 3539
< X-Squid-Error: ERR_DNS_FAIL 0
< Vary: Accept-Language
< Content-Language: en
<
* CONNECT tunnel failed, response 503
* closing connection #0
curl: (56) CONNECT tunnel failed, response 503

C:\Users\testuser01>

squid側のログでも通信が失敗していることが確認できます。

1769405504.758  30099 10.0.2.2 NONE/503 0 CONNECT www.example.com:443 - HIER_NONE/- -

まとめ

今回は、Active Directoryでプロキシサーバーの設定を配布するグループポリシーの設定を解説しました。

Active Directory の基本的な操作や概念は理解できたものの、

  • 体系的にActive directoryを学びたい
  • 実践的な内容にチャレンジしてみたい
  • 画面操作を見ながら学びたい

と感じた方もいる方もいらっしゃるかもしれません。

独学でActive directoryを学ぶ方法については別記事で紹介しています。

私ももともとITに詳しくはありませんでしたが、上記記事で紹介している手順をもとに学習を進めました。

スキルアップしたい、Active directoryについてもっと詳しくなりたい方は合わせてご確認ください。

Active directoryを勉強する際は、動画で学べる Udemyがおすすめです。

セール時には1講座が\1,500~\1,800程度で購入が可能です。

\詳しくは公式HPをチェック/

30日間の返金保証あり!
返金条件はこちらチェック


セール中か確認したい方は上記から公式HPで確認してみてください。

また、初心者向けにActive Director のおすすめ講座をレベル別に別記事でまとめています

ゼロから学ぶActive DirectoryおすすめUdemy講座3選

どれを購入すればいいのか分からない方は参考にしてみください。

コメント

タイトルとURLをコピーしました