Date: Sun, 16 Dec 2018 12:15:46 +0100 From: Kristof Provost <kp@freebsd.org> To: Hubert Hauser <atypical@autisticstory.net> Cc: freebsd-hackers@freebsd.org Subject: Re: Unable to open /dev/pf device inside the jail Message-ID: <20181216111545.GD49515@vega.codepro.be> In-Reply-To: <17e9f383-95bd-37c2-6bfe-0dc17424624f@autisticstory.net> References: <17e9f383-95bd-37c2-6bfe-0dc17424624f@autisticstory.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2018-12-16 01:23:21 (+0100), Hubert Hauser <atypical@autisticstory.net> wrote: > I'm trying to set TransPort setting in the torproxy jail but when I try > to start Tor inside the jail I'm giving errors: > > |root@torproxy:~ # service tor restart Stopping tor. Waiting for PIDS: > 95355. Starting tor. Dec 16 00:23:07.760 [notice] Tor 0.3.4.9 > (git-4ac3ccf2863b86e7) running on FreeBSD with Libevent 2.1.8-stable, > OpenSSL 1.0.2o-freebsd, Zlib 1.2.11, Liblzma 5.2.3, and Libzstd 1.3.5. > Dec 16 00:23:07.760 [notice] Tor can't help you if you use it wrong! > Learn how to be safe at > https://www.torproject.org/download/download#warning Dec 16 00:23:07.760 > [notice] Read configuration file "/usr/local/etc/tor/torrc". Dec 16 > 00:23:07.774 [notice] Scheduler type KISTLite has been enabled. Dec 16 > 00:23:07.774 [notice] Opening Socks listener on 127.0.1.1:9050 Dec 16 > 00:23:07.774 [notice] Opening DNS listener on 127.0.1.1:9053 Dec 16 > 00:23:07.774 [notice] Opening Transparent pf/netfilter listener on > 127.0.0.1:9040 Dec 16 00:23:07.774 [warn] open("/dev/pf") failed: No > such file or directory Dec 16 00:23:07.774 [notice] Closing > partially-constructed Socks listener on 127.0.1.1:9050 Dec 16 > 00:23:07.774 [notice] Closing partially-constructed DNS listener on > 127.0.1.1:9053 Dec 16 00:23:07.774 [notice] Closing > partially-constructed Transparent pf/netfilter listener on > 127.0.0.1:9040 Dec 16 00:23:07.775 [warn] Failed to parse/validate > config: Unable to open /dev/pf for transparent proxy. Dec 16 > 00:23:07.775 [err] Reading config failed--see warnings above. > /usr/local/etc/rc.d/tor: WARNING: failed to start tor| > > I've created this jail using ezjail-admin tool. Could anyone tell me why > I'm unable to change host pf settings and how can I do it inside the jail? > Assuming that you've got a vnet jail that is possible, but you'll need to tweak your devfs configuration to give the jail the pf device node. I edited /etc/defaults/devfs.rules to add 'add path pf unhide' to the '[devfsrules_jail=4]' section. It's probably cleaner to do that in /etc/devfs.rules though. Regards, Kristof
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20181216111545.GD49515>