Enable gatewaying
For IPv4: # sysctl net.inet.ip.forwarding=1
For IPv6: # sysctl net.inet6.ip6.forwarding=1
Make permanent, /etc/sysctl.conf
net.inet.ip.forwarding=1 net.inet6.ip6.forwarding=1
On FreeBSD, /etc/rc.conf
gateway_enable="YES" #for ipv4 ipv6_gateway_enable="YES" #for ipv6