• 締切済み

squidのaclの設定

こんにちは! 教えて下さい。 squidに利用時間制限をかけたいのですがうまく行きません。 例 (1)acl staff time W 16:00-17:00 (2)acl staff src "/etc/squid/access.proxy" (3)http-access allow staff (2)と(3)の行でaccess.proxyに記述しているIPアドレス はインターネット接続が出来ます。 ここに水曜日の16:00-17:00までの間と いう条件を指定しようと思い(1)を追加したら、 ACL 'staff' already exists with different type,skipping というメッセージが出てスキップされてしまいます。 どこが悪いのでしょうか?

みんなの回答

  • ken2
  • ベストアンサー率36% (86/235)
回答No.1

ACとは、アクセスコントロールの定義です acl の次は、定義名になります。 この場合、定義名が重複しているということです。

toshi_1919
質問者

お礼

回答ありがとうございます。

関連するQ&A

  • squid is already running process ID****と出てsquid start,stop restartができない

    squid is already running process ID****と出てsquid start,stop restartができないです。 configは acl lan src 192.168.1.0/255.255.255.0 ←NW編集 http_access allow lan ←追加 しかいじっていないです。 自動設定ON(chkconfig squid on)してshutdownして 今日立ち上げたら上記エラーが出てしまいます。 どうすればsquid stop できるのでしょうか。 ご教授願います。

  • squid ある特定のドメインからアクセス許可

    特定のドメイン(例 example.com)クライアントからのみアクセスさせたい。 その場合、下記のような記述で可能でしょうか。 /etc/squid/squid.conf acl fromclient srcdom_regex .example.com acl http_access allow fromclient aclの属性は下記のページを参考にしてみました。 http://www.kamao.net/doc/homework/squid.html

  • プロキシについて(squid)

    Linuxでプロキシをするためにsquidを使いました。 IEのプロキシアドレスをそのLinuxのサーバーに設定して、アクセスしてみると 以下のエラーが発生しました。 While trying to retrieve the URL: http://www.yahoo.co.jp/ The following error was encountered: Unable to determine IP address from host name for www.yahoo.co.jp The dnsserver returned: Server Failure: The name server was unable to process this query. This means that: The cache was not able to resolve the hostname presented in the URL. Check if the address is correct. Your cache administrator is root. -------------------------------------------------------------------------------- Generated Sat, 24 Jan 2004 05:14:41 GMT by localhost.localdomain (squid/2.5.STABLE1) ちなみにsquid.confは以下のとおりです。 http_port 8080 icp_port 0 hierarchy_stoplist cgi-bin ? acl QUERY urlpath_regex cgi-bin \? no_cache deny QUERY acl manager proto cache_object acl SSL_ports port 443 563 acl Safe_ports port 80 # http acl Safe_ports port 21 # ftp acl Safe_ports port 443 563 # https, snews 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 acl all src 0.0.0.0/0.0.0.0 acl localhost src 127.0.0.1/255.255.255.255 acl rb_local src 192.168.0.0/16 http_access allow localhost http_access allow rb_local http_access deny all icp_access allow all

  • squidでIPアドレスを範囲指定したい

    123.456.0.0~123.456.255.255 までの範囲のIPアドレスを許可したいのですが どのように設定すればよいかわかりません。 現在の設定は以下のようになっています。 acl hoge 123.456.0.0/255.255.255.255 http_access allow hoge OSは [root@vps squid]# cat /etc/redhat-release CentOS release 5.4 (Final)

  • squidでWinUpdateのみ許可するには?

    現在Squidを利用して、工場からは特定のHPのみ見れるように設定してあるのですが、WinUpdateを利用する設定の仕方がわからずはまっております。 squid.confの設定は、下記のようになっており、 acl passlist url_regex "/etc/squid/passlist.txt" http_access allow secnet passlist passlist.txtでは ^http://microsoft.com/ ^http://v4.windowsupdate.microsoft.com/ のように設定してあるのですが、「Windows Update エラー」となってしまいます。 おそらくドメインが変わるためだと思うのですが・・・ どなたかsquidでWinUpdateを許可できる設定を教えてください。

  • squidと多段プロキシ

    OS : RedHatLinux 7.2 + squid (標準でインストールされるバージョン) LAN側IP 192.168.1.0/24 GW 192.168.1.254 Linux IP:192.168.1.10 設定項目表を確認すると、WEBのプロキシサーバーのアドレスが 192.168.8.1:3128 となっているんです。 ただ、このサーバーは内部側になくてどうやら接続先に あるようなのです。教育機関のネットワークですので少し特殊と思います。 squid.confの中として http_port 8080 acl_*** src 192.168.1.0/255.255.255.0 http_access allow *** forwarded_for off この程度しか変更しておりません。 ただ、cache_peer 192.168.8.1 parene 3128 3130 の 項目を入れてみたのですが、変化無しでした。 Linux上でのブラウザでプロキシの設定のところを 192.168.8.1 に 設定するといいのですが、ローカルIP(192.168.1.10) を入れるとだめみたいです。 当然、クライアントにIP 192.168.8.1を入れると通ります。 クライアントはRedHatLinuxのプロキシを使いたいのです。 クライアント→Proxy→教育機関Proxy→WEB 皆様のお知恵をお借りしたいと思います。 よろしくお願いします。

  • Squidの出先指定

    Squidの設定について教えて下さい。 クライアントAのIP 192.168.1.0/24 クライアントBのIP 172.21.0.0/16 クライアントAについては192.168.1.1のデフォルトゲートウェイ クライアントBについては172.21.1.1のデフォルトゲートウェイ 1台の筐体でSquidがクライアントIPを基準にデフォルトゲートウェイの 向け先を変更することはできますか? cache_peer_accessを使うといけるのではとのことですが情報があれば教えて下さい。 例)こんな感じでいけますか? acl user1 src 192.168.1.0/24 acl user2 src 172.21.0.0/16 cache_peer_acces 192.168.1.1 allow users1 cache_peer_acces 172.21.0.1 allow users2 cache_peer_acces deny all

  • squid.confのalways_direct allowで複数のドメインを指定する記述方法を教えてください

    squid2.5で、proxyを通さずダイレクトに参照させる設定をsquid.confにしたいのですが、「acl 名前 dstdomain ドメインかアドレス」「always_direct allow 名前」の記述で、ダイレクトに参照させたいドメインやアドレスが複数の場合はどう記述すればよいのでしょうか。 squid.confの該当項目の記述例では1ドメインのみの例が書かれていたため複数のドメインを一括して記述する方法がわかりません。 (それとも、aclの行と、always_direct allow の行をドメインごとに書くものなのでしょうか) よろしくお願いします。

  • ポート指定でプロキシ(squid)を経由すると拒否される

    プロキシ(squid)経由でインターネットに接続しているのですが、 https://www.xxxxxx.co.jp:16590/ のようにポート番号を指定すると、「Access Denied」とエラーが表示され接続できません。 squidのログを見るとTCP_DENIED/403 と出力されおり、どうやらsquidに拒否されているようです。原因不明で困っています。どなたか回避方法をご教授下さい。宜しくお願いいたします。 squid.confの設定 http_access allow manager localhost http_access deny manager http_access deny !Safe_ports http_access deny CONNECT !SSL_ports acl our_networks src 192.168.3.0/24 192.168.4.0/24 http_access allow our_networks http_access allow localhost http_access deny all http_reply_access allow all IEには、下記のようなエラーが表示されます。 ERROR The requested URL could not be retrieved While trying to retrieve the URL: www.xxxxxx.co.jp:16590 The following error was encountered: Access Denied. Squidのログには、以下のように出力されます。 1199959865.497 0 192.168.4.41 TCP_DENIED/403 1361 CONNECT www.xxxxx.co.jp:16590 - NONE/- text/html 1199959866.291 747 192.168.4.41 TCP_MISS/200 6318 CONNECT urs.microsoft.com:443 - DIRECT/65.54.225.100 - 1199959866.310 757 192.168.4.41 TCP_MISS/200 6318 CONNECT urs.microsoft.com:443 - DIRECT/65.54.225.100 - 1199959866.656 114 192.168.4.41 TCP_CLIENT_REFRESH_MISS/200 6900 GET http://dl.toolbar.yahoo.co.jp/dl/tbphrl.data - DIRECT/211.14.13.219 text/plain

  • プロキシサーバーでコンテンツの閲覧制限ができません

    Centos6.5の環境で、プロキシサーバーとしてSquidを使用しています。クライアントPCにはプロキシ設定をしてIEの閲覧が自由にできる状態です。 例えば、www.facebook.comの閲覧制限をしたいため、vi /etc/squid/squid.conf 内にacl denydomain dstdomain www.facebook.com を追加して、/etc/rc.d/init.d/squid のrestartを実行しましたが、クライアントPCから普通に見れています。何がいけないのでしょうか。squid.confの記載内容は以下のとおりです。 よろしくお願いします。 # # Recommended minimum configuration: # acl manager proto cache_object acl localhost src 127.0.0.1/32 ::1 acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1 # 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 # from where browsing should be allowed http_access allow localnet http_access allow localhost http_access allow lan # And finally deny all other access to this proxy http_access deny all acl denydomain dstdomain www.facebook.com # Squid normally listens to port 3128 http_port 8080 # We recommend you to use at least the following line. hierarchy_stoplist cgi-bin ? # Uncomment and adjust the following to add a disk cache directory. #cache_dir ufs /var/spool/squid 100 16 256 # Leave coredumps in the first cache dir 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 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 prox.hogehoge.jp forwarded_for off