forked from poldy79/FfsConfigGenerator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbird_ffrl_main.conf.tpl
56 lines (48 loc) · 1.1 KB
/
bird_ffrl_main.conf.tpl
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
define ffrl_nat_address = ${NAT_V4};
function is_default() {
return net ~ [
0.0.0.0/0
];
}
function is_ffrl_nat() {
return net ~ [
${NAT_V4}/32
];
}
function is_ffrl_tunnel_nets() {
return net ~ [
100.64.8.164/31
#FIXME here are some missing
];
}
# BGP Import Filter fuer Rheinland
filter ebgp_ffrl_import_filter {
if is_default() then accept;
reject;
}
# BGP Export Filter fuer Rheinland
filter ebgp_ffrl_export_filter {
if is_ffrl_nat() then accept;
reject;
}
# IP-NAT-Adresse legen wir in die interne BIRD Routing Table
protocol static ffrl_uplink_hostroute {
table tk_stuttgart;
route ${NAT_V4}/32 reject;
}
# Wir legen die Transfernetze in die interne BIRD Routing Table
protocol direct {
table tk_stuttgart;
interface "tun-*";
import where is_ffrl_tunnel_nets();
}
# BGP Template fuer Rheinland Peerings
template bgp ffrl_uplink {
table tk_stuttgart;
local as 65019;
import keep filtered;
import filter ebgp_ffrl_import_filter;
export filter ebgp_ffrl_export_filter;
next hop self;
direct;
};