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
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
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