portaudit から、squid 2.7.9 に脆弱性があるよ(portaudit: squid -- denial of service)と言う指摘がずっと来ていたのだけれど、2.7系はもう修正する気がないようなので、しばらく放置していた。
FreeBSDのportsは、www/squid が 2.7系, www/squid31 が squid 3.1系、www/squid32 が squid 3.2系となっている。(squid の最新安定版は3.3系らしい)
そこで、とりあえず3.2系に移行してみることにする。
一度squid 2.7.9 をアンインストールして、新たにwww/squid32をインストール。そして、起動してみると、(エラーの行だけ抽出)
FATAL: Bungled squid.conf line 715: cache_dir coss /var/squid/cache/coss 10000 block-size=1024 max-size=500000
と言うエラーで起動しない。
/usr/local/etc/squid/squid.conf.default にデフォルトの設定が、/usr/local/etc/squid/squid.conf.documented に説明付きの設定ファイルがあるので、これを見てみると、
#       NP: COSS filesystem in Squid-3 has been deemed too unstable for
#           production use and has thus been removed from this release.
#           We hope that it can be made usable again soon.
とあるので、当面はCOSSは使えないらしい。 cache_dirの行をコメントアウトすると、
ERROR: Directive 'emulate_httpd_log' is obsolete.
emulate_httpd_log : Replace this with an access_log directive using the format 'common' or 'combined'.
FATAL ERROR: auth_param digest program /usr/local/libexec/squid/digest_pw_auth: (2) No such file or directory
ERROR: '0.0.0.0/0.0.0.0' needs to be replaced by the term 'all'.
SECURITY NOTICE: Overriding config setting. Using 'all' instead.
WARNING: (B) '::/0' is a subnetwork of (A) '::/0'
WARNING: because of this '::/0' is ignored to keep splay tree searching predictable
WARNING: You should probably remove '::/0' from the ACL named 'all'
aclParseAclLine: ACL 'manager' already exists with different type.
FATAL: Bungled squid.conf line 1856: acl manager proto cache_object
みたいな感じ。
  • emulate_http_log は、access_log の common か combined を使え
    →とりあえずコメントアウト。
  • digest_pw_auth なんて見つかりません。
    →digest_file_auth に置き換わったらしい
  • all を置き換えてます。
    →デフォルト(?)でallは定義済みのようなので、コメントアウト
  • ::0がどうこう。
    →IPv6の設定は書いてないんだけど?
  • acl manager は、既に別の形で存在します。
    →こちらもコメントアウト
で、再度通すと、
WARNING: Netmasks are deprecated. Please use CIDR masks instead.
WARNING: IPv4 netmasks are particularly nasty when used to compare IPv6 to IPv4 ranges.
WARNING: For now we will assume you meant to write /32
WARNING: (B) '127.0.0.1' is a subnetwork of (A) '127.0.0.1'
WARNING: because of this '127.0.0.1' is ignored to keep splay tree searching predictable
WARNING: You should probably remove '127.0.0.1' from the ACL named 'localhost'
WARNING: (B) '127.0.0.1' is a subnetwork of (A) '127.0.0.1'
WARNING: because of this '127.0.0.1' is ignored to keep splay tree searching predictable
WARNING: You should probably remove '127.0.0.1' from the ACL named 'localhost'
WARNING: Netmasks are deprecated. Please use CIDR masks instead.
WARNING: IPv4 netmasks are particularly nasty when used to compare IPv6 to IPv4 ranges.
WARNING: For now we will assume you meant to write /32
WARNING: (B) '127.0.0.0/8' is a subnetwork of (A) '127.0.0.0/8'
WARNING: because of this '127.0.0.0/8' is ignored to keep splay tree searching predictable
WARNING: You should probably remove '127.0.0.0/8' from the ACL named 'to_localhost'
  • Netmasksはdeprecatedなので、CIDR maskを使え。
    →/255.255.255.255 の代わりに、/32 とか書く。
  • 127.0.0.1とlocalhostがどうしたこうした。
    →とりあえず、acl localhost の行をコメントアウト
  • to_localhost がどうしたこうした。
    →そもそも、to_localhostって言うaclを使っていなかったので削除
これで、なんとか起動した感じ。
後は、コメントアウトしたcache_dir を ufs で復活させて、squid -z でキャッシュディレクトリを初期化して、squidを再起動したら動いているように見える。

トラックバック(0)

このブログ記事を参照しているブログ一覧: squid 2.7 → 3.2 の移行

このブログ記事に対するトラックバックURL: https://www.wizard-limit.net/cgi-bin/mt/mt-tb.cgi/3022

コメントする

このブログ記事について

このページは、falseが2013年4月15日 12:50に書いたブログ記事です。

ひとつ前のブログ記事は「zshとNFDファイル名」です。

次のブログ記事は「iOS6の印刷」です。

最近のコンテンツはインデックスページで見られます。過去に書かれたものはアーカイブのページで見られます。

広告

Powered by Movable Type 6.1.1