Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Jan 2015 14:14:29 +0000
From:      krad <kraduk@gmail.com>
To:        Panagiotis Atmatzidis <atma@convalesco.org>
Cc:        Maciej Suszko <maciej@suszko.eu>, FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: A way to load PF rules at startup using OpenVPN
Message-ID:  <CALfReyeAzvO=D6A+ood3WTrwqhzWgX7J3_RrE7F_4Y25u7jcNA@mail.gmail.com>
In-Reply-To: <44269B05-51E7-4279-B828-1990DC73251F@convalesco.org>
References:  <F84CF488-7CF6-4580-B169-AA441166E2CB@convalesco.org> <20150120101144.735f0b67@helium> <CALfReyfuR-+OZ4H1RUuwMcvZEgcciwnisCC31vm4+NDaXFVu6g@mail.gmail.com> <F3202279-808B-4CBC-9F67-4CB89E9A59F9@convalesco.org> <20150120140631.377bee87@helium> <44269B05-51E7-4279-B828-1990DC73251F@convalesco.org>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
cloned_interfaces should take care of that, as i have tun0 referenced in my
pf.conf and it works fine. Check its defined correctly with:

# sysrc cloned_interfaces
cloned_interfaces: gif0 tun0 bridge0



another way of doing it would be to comment out the last line in your
pf.conf and add an anchor at the end

eg
anchor "vpn/*"


then do something like

echo "pass in quick on vtnet0 proto { tcp udp } from tun0 to vtnet0 port
8123" | pfctl -a vpn -f -

after openvpn has started up.

The problem you have is someone stops openvpn from running at startup
suddenly you have no firewall. Its also starting up much later than it
should so you are exposing yourself for a small window of time.


On 20 January 2015 at 13:39, Panagiotis Atmatzidis <atma@convalesco.org>
wrote:

> Hello,
>
> > On 20 Jan 2015, at 15:06, Maciej Suszko <maciej@suszko.eu> wrote:
> >
> > On Tue, 20 Jan 2015 14:18:28 +0200
> > Panagiotis Atmatzidis <atma@convalesco.org> wrote:
> >
> > [=E2=80=A6]
> >
> > Post your pf.conf, pfctl -nvf /etc/pf.conf with tun0 present and
> > absent, look at dmesg -a, messages etc.
>
> Using =E2=80=98pfctl -nvf /etc/pf.conf=E2=80=99 without tun0 comes up wit=
h the following
> error:
>
> No IP address found for tun0
> /etc/pf.conf:86: could not parse host specification
>
> Line is 86 is:
> https://gist.github.com/atmosx/2dcff31a0d8868d4b1c7#file-pf-conf-L83 <
> https://gist.github.com/atmosx/2dcff31a0d8868d4b1c7#file-pf-conf-L86>;
>
> But how do I bypass this using pf.conf alone? The .conf needs to become
> =E2=80=98dynamic=E2=80=99 somehow.
>
> >
> > Just my 2 cents...
> > --
> > regards, Maciej Suszko.
>
>
>
> Panagiotis (atmosx) Atmatzidis
>
> email:  atma@convalesco.org
> URL:    http://www.convalesco.org
> GnuPG ID: 0x1A7BFEC5
> gpg --keyserver pgp.mit.edu --recv-keys 1A7BFEC5
>
> "As you set out for Ithaca, hope the voyage is a long one, full of
> adventure, full of discovery [...]" - C. P. Cavafy
>
>
>
>
>



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?CALfReyeAzvO=D6A+ood3WTrwqhzWgX7J3_RrE7F_4Y25u7jcNA>