Skip to content

Instantly share code, notes, and snippets.

@dgoujard
Forked from aveao/bird1-bird-vultr.conf
Created February 16, 2020 21:47
Show Gist options
  • Save dgoujard/5d67ea5dbe814313ee8b3c48cecb436a to your computer and use it in GitHub Desktop.
Save dgoujard/5d67ea5dbe814313ee8b3c48cecb436a to your computer and use it in GitHub Desktop.
BIRD configs for BGP stuffs (HE Tunnelbroker, Vultr etc)
router id [our IPv4];
protocol bgp vultr
{
local as [our ASN];
source address [our IPv4 from vultr];
import all;
export filter {
if net ~ [[the IPv4 block we want to announce]] then accept;
reject;
};
graceful restart on;
multihop 2;
neighbor 169.254.169.254 as 64515;
password "[BGP password given to vultr, up to 16 bytes! (send a ticket if you accidentally gave one that's too long)]";
}
protocol static
{
route [the IPv4 block we want to announce] reject;
}
protocol direct
{
interface "dummy*";
import all;
}
protocol device
{
scan time 5;
}
router id [our IPv4];
protocol bgp he
{
local as [our ASN];
source address [client IP given by HE];
import all;
export filter {
if net ~ [[the IPv6 block we want to announce]] then accept;
reject;
};
graceful restart on;
neighbor [server IP given by HE] as 6939;
}
protocol static
{
route [the IPv6 block we want to announce] reject;
}
protocol direct
{
interface "dummy*";
import all;
}
protocol device
{
scan time 5;
}
router id [our IPv4];
protocol bgp vultr
{
local as [our ASN];
source address [server's IPv6 from vultr];
import all;
export filter {
if net ~ [[the IPv6 block we want to announce]] then accept;
reject;
};
graceful restart on;
multihop 2;
neighbor 2001:19f0:ffff::1 as 64515;
password "[BGP password given to vultr, up to 16 bytes! (send a ticket if you accidentally gave one that's too long)]";
}
protocol static
{
route [the IPv6 block we want to announce] reject;
}
protocol direct
{
interface "dummy*";
import all;
}
protocol device
{
scan time 5;
}
protocol bgp [a name for us to refer to our peer]
{
local as [our ASN];
source address [our IPv6 on wireguard];
import all;
export filter {
if net ~ [[the IPv6 block we want to announce]] then accept;
reject;
};
graceful restart on;
multihop 2;
neighbor [their IPv6 on wireguard] as [their ASN];
}
#!/bin/bash
ip link add dummy1 type dummy
ip link set dummy1 up
ip -6 addr add [the IPv6 block we want to announce] dev dummy1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment