1
mirror of https://git.dn42.dev/wiki/wiki.git synced 2024-11-27 11:23:37 +01:00
wiki/gre-on-freebsd.md

28 lines
657 B
Markdown
Raw Normal View History

2013-11-15 00:14:18 +01:00
# GRE on FreeBSD
This page describes how to configure GRE tunnels on FreeBSD.
## Requirements
* Root access to a FreeBSD system.
* Loaded if_gre.ko or device gre
* A static IPv4 address on both ends if you would like to preserve your sanity.
## 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="10.0.0.1 10.0.0.2 netmask 0xffffffff tunnel 1.2.3.4 5.6.7.8 descr foo"
```