This repository has been archived by the owner on Apr 8, 2021. It is now read-only.
/
bird.conf
108 lines (88 loc) · 1.88 KB
/
bird.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
timeformat protocol iso long;
# local addresses
define mz_addr_mz = 10.37.1.3; # mz-mesh-ip
# AS
define mwu_as = 65037; # private AS of mwu
router id mz_addr_mz;
# functions
function is_default() {
return net ~ [
0.0.0.0/0
];
}
function is_freifunk() {
return net ~ [
10.0.0.0/8{16,24}
];
}
function is_dn42() {
return net ~ [
172.22.0.0/15{20,28}
];
}
function is_chaosvpn() {
return net ~ [
172.31.0.0/16+
];
}
function is_mwu_self_nets() {
return net ~ [
10.56.0.0/16+,
10.37.0.0/16+
];
}
function is_wi_self_net() {
return net ~ [
10.56.0.0/16+
];
}
function is_mz_self_net() {
return net ~ [
10.37.0.0/16+
];
}
# sanity check: don't allow critical overrides
filter ebgp_icvpn_import_filter {
if is_mwu_self_nets() then reject;
if is_default() then reject;
if is_freifunk() then accept;
if is_dn42() then accept;
if is_chaosvpn() then accept;
reject;
}
# protocols
# necessary to inform bird about devices
protocol device {
scan time 30;
};
protocol kernel kernel_mwu {
scan time 30;
import none;
export all;
kernel table ipt_mwu;
};
# templates for iBGP
template bgp bgp_ibgp_mwu {
local mz_addr_mz as mwu_as;
import filter ebgp_icvpn_import_filter;
export none;
direct;
gateway direct;
};
# P E E R I N G S
# iBGP
protocol bgp mwu_spinat from bgp_ibgp_mwu { # spinat
neighbor 10.37.0.7 as mwu_as;
};
protocol bgp mwu_lotuswurzel from bgp_ibgp_mwu { # lotuswurzel
neighbor 10.37.0.23 as mwu_as;
};
protocol bgp mwu_ingwer from bgp_ibgp_mwu { # ingwer
neighbor 10.37.0.161 as mwu_as;
};
protocol bgp mwu_wasserfloh from bgp_ibgp_mwu { # wasserfloh
neighbor 10.37.0.231 as mwu_as;
};
protocol bgp mwu_uffschnitt from bgp_ibgp_mwu { # uffschnitt
neighbor 10.37.0.101 as mwu_as;
};