howto/GRE on FreeBSD

  • Search
  • Home
  • All
  • Files
  • History
  • Latest Changes
  • Home

    • Getting Started
    • Registry Authentication
    • Address Space
    • BGP communities
    • FAQ
  • How-To

    • Wireguard
    • Openvpn
    • IPsec With Public Keys
    • Tinc
    • GRE on FreeBSD
    • GRE on OpenBSD
    • IPv6 Multicast (PIM-SM)
    • SSM Multicast
    • MPLS
    • Bird2
    • FRRouting
    • OpenBGPD
    • Mikrotik RouterOS
    • EdgeRouter
    • Static routes on Windows
    • Universal Network Requirements
    • VyOS
    • NixOS
  • Services

    • IRC
    • Whois registry
    • DNS
    • IX Collection
    • Public DNS
    • Looking Glasses
    • Automatic Peering
    • Repository Mirrors
    • Distributed Wiki
    • Certificate Authority
    • Route Collector
    • Registry
  • Internal

    • Internal services
    • Interconnections
    • APIs
    • Show and Tell
    • Historical services
  • Historical

    • Bird 1
    • Quagga
  • External Tools

    • Paste Board
    • Git Repositories

dn42

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"

Hosted by: BURBLE-MNT, GRMML-MNT, XUU-MNT, JAN-MNT, LARE-MNT, SARU-MNT, ANDROW-MNT, MARK22K-MNT | Accessible via: dn42, dn42.dev, dn42.eu, wiki.dn42.us, dn42.de (IPv6-only), dn42.cc (wiki-ng), dn42.wiki, dn42.pp.ua, dn42.obl.ong

Last edited by lare, 2023-04-08 20:08:13