Hi all,
I've set up an openVPN client on my server, now I'd like to route the traffic to and from a jail through the vpn tunnel.
I figured the best way to do this would be to use a PF NAT rule, but I can't seem to get it to work in my little test setup.
Network
em0 10.0.0.10 (host)
em0_alias 10.0.2.1 (jail)
tun0
Can anyone enlighten me, please?
I've set up an openVPN client on my server, now I'd like to route the traffic to and from a jail through the vpn tunnel.
I figured the best way to do this would be to use a PF NAT rule, but I can't seem to get it to work in my little test setup.
Network
em0 10.0.0.10 (host)
em0_alias 10.0.2.1 (jail)
tun0
Code:
/etc/pf.vpn
VPN = "tun0"
LAN = "em0"
# NAT
nat pass on $VPN from 10.0.2.1 to any -> ($VPN)
# FIREWALL
pass in all
pass out all keep state
Can anyone enlighten me, please?