Enable gatewaying
For IPv4: # sysctl net.inet.ip.forwarding=1
For IPv6: # sysctl net.inet6.ip6.forwarding=1
Make permanent with
/etc/sysctl.conf
net.inet.ip.forwarding=1 net.inet6.ip6.forwarding=1