gre-on-freebsd.md
... ...
@@ -0,0 +1,27 @@
1
+# GRE on FreeBSD
2
+
3
+This page describes how to configure GRE tunnels on FreeBSD.
4
+
5
+## Requirements
6
+
7
+* Root access to a FreeBSD system.
8
+* Loaded if_gre.ko or device gre
9
+* A static IPv4 address on both ends if you would like to preserve your sanity.
10
+
11
+## Create a temporary gre tunnel
12
+
13
+```
14
+ifconfig gre$INDEX create
15
+ifconfig gre$INDEX tunnel $TUNNEL_SRC $TUNNEL_DST
16
+ifconfig gre$INDEX inet $LOCAL $REMOTE netmask 0xffffffff
17
+ifconfig gre$INDEX descr $DESCR
18
+```
19
+
20
+## Create a persistent gre tunnel
21
+
22
+Add this to your `rc.conf`.
23
+
24
+```
25
+cloned_interfaces="$cloned_interfaces gre0"
26
+ifconfig_gre0="10.0.0.1 10.0.0.2 netmask 0xffffffff tunnel 1.2.3.4 5.6.7.8 descr foo"
27
+```