Basic routing over a VPN

Trying to get my FreeBSD server to act as a gateway to an OpenVPN connection... I have the OpenVPN connection working, it's up on tun0, and I have gateway_enable="YES" in /etc/rc.conf. What I want is the FreeBSD machine to accept traffic from the local 10.0.0.0/24 network connected to re0 and pass it to and from the internet over tun0 with NAT.
Have pf up and running with
Code:
ext_if = "tun0"
int_if = "re0"
localnet = $int_if:network
nat on $ext_if from $localnet to any -> ($ext_if)
block all
pass from { lo0, $localnet } to any keep state
I did this before, and I recall this being all I needed to do, can't remember if there was anything else I had to do to make it work
 
Hmm, messing around with it some more it looks like the FreeBSD machine is forwarding incoming packets to its default route, whether PF is running or not. And it stops doing that as soon as I start up OpenVPN.
 
Back
Top