私はubuntu 14.04でブリッジを使用するためのtorとobfsproxyに問題があります。 Torはobfsproxyを起動できず、常に拒否された許可を返します。
grep -v "^#" /etc/tor/torrc | sed '/^$/d'
UseBridges 1
Bridge obfs2 192.36.27.216:55313 fccb4bf2a7b89b070902bdd05923c255fb4b0bdb
ClientTransportPlugin obfs2,obfs3 exec /usr/bin/obfsproxy --managed
tail -f /var/log/tor/log
Aug 01 13:06:30.000 [notice] Tor 0.2.4.23 (git-05b81fcd2a655c5a) opening new log file.
Aug 01 13:06:30.000 [notice] Parsing GEOIP IPv4 file /usr/share/tor/geoip.
Aug 01 13:06:30.000 [notice] Parsing GEOIP IPv6 file /usr/share/tor/geoip6.
Aug 01 13:06:30.000 [warn] OpenSSL version from headers does not match the version we're running with. If you get weird crashes, that might be why. (Compiled with 1000105f: OpenSSL 1.0.1e 11 Feb 2013; running with 1000106f: OpenSSL 1.0.1f 6 Jan 2014).
Aug 01 13:06:33.000 [warn] Could not launch managed proxy executable at '/usr/bin/obfsproxy' ('Permission denied').
Aug 01 13:06:34.000 [notice] Bootstrapped 5%: Connecting to directory server.
Aug 01 13:06:34.000 [warn] We were supposed to connect to bridge '192.36.27.216:55313' using pluggable transport 'obfs2', but we can't find a pluggable transport proxy supporting 'obfs2'. This can happen if you haven't provided a ClientTransportPlugin line, or if your pluggable transport proxy stopped running.
apparmor profile / etc/apparmor.d/system_torを変更し、3行追加しました。
/usr/bin/obfsproxy PUx,
profile /etc/apparmor.d/usr.bin.obfsproxy {
}
ファイル全体のサンプル:
# vim:syntax=apparmor
#include <tunables/global>
profile system_tor flags=(attach_disconnected) {
#include <abstractions/tor>
/usr/bin/obfsproxy PUx,
profile /etc/apparmor.d/usr.bin.obfsproxy {
}
owner /var/lib/tor/** rwk,
owner /var/lib/tor/ r,
owner /var/log/tor/* w,
# During startup, tor (as root) tries to open various things such as
# directories via check_private_dir(). Let it.
/var/lib/tor/** r,
/{,var/}run/tor/ r,
/{,var/}run/tor/control w,
/{,var/}run/tor/socks w,
/{,var/}run/tor/tor.pid w,
/{,var/}run/tor/control.authcookie w,
/{,var/}run/tor/control.authcookie.tmp rw,
/{,var/}run/systemd/notify w,
# Site-specific additions and overrides. See local/README for details.
#include <local/system_tor>
}
ライン
/usr/bin/obfsproxy PUx,
上記の投稿から取りました
Ubuntuの新しいバージョンでは、/etc/apparmor/system_tor
が次のようになる必要があります。
# vim:syntax=apparmor
#include <tunables/global>
profile system_tor {
#include <abstractions/tor>
owner /var/lib/tor/** rwk,
owner /var/log/tor/* w,
/usr/bin/obfsproxy PUx, ## this is the FIX
/{,var/}run/tor/control w,
/{,var/}run/tor/tor.pid w,
/{,var/}run/tor/control.authcookie w,
/{,var/}run/tor/control.authcookie.tmp rw,
# Site-specific additions and overrides. See local/README for details.
#include <local/system_tor>
}
Ubuntuの以前のバージョンで使用されていたPUx
の代わりにUx
に注意してください。