freebsd openvpn server redirect-gateway

Route all client’s traffic from our openvpn server


# vim /usr/local/etc/openvpn/server.conf
push "redirect-gateway def1"
push "dhcp-option DNS 8.8.8.8


vim /etc/pf.conf
nat on $wan_inf from 10.8.0.0/24 to any -> ($wan_inf)
pass in quick from 10.8.0.0/24 to any keep state

Leave a Reply

Your email address will not be published. Required fields are marked *