All Pages > howto > VPN tunnel > GRE > FreeBSD

GRE on FreeBSD

This page describes how to configure GRE tunnels on FreeBSD.


Create a temporary gre tunnel

ifconfig gre$INDEX create
ifconfig gre$INDEX tunnel $TUNNEL_SRC $TUNNEL_DST
ifconfig gre$INDEX inet $LOCAL $REMOTE netmask 0xffffffff
ifconfig gre$INDEX descr $DESCR

Create a persistent gre tunnel

Add this to your rc.conf.

cloned_interfaces="$cloned_interfaces gre0"
ifconfig_gre0=" netmask 0xffffffff tunnel descr foo"