diff options
Diffstat (limited to 'bird/bird_common.conf')
-rw-r--r-- | bird/bird_common.conf | 90 |
1 files changed, 0 insertions, 90 deletions
diff --git a/bird/bird_common.conf b/bird/bird_common.conf deleted file mode 100644 index 2f7f9ac..0000000 --- a/bird/bird_common.conf +++ /dev/null | |||
@@ -1,90 +0,0 @@ | |||
1 | protocol device { | ||
2 | }; | ||
3 | |||
4 | function is_self_net() { | ||
5 | return net ~ OWNNETS; | ||
6 | }; | ||
7 | |||
8 | function is_valid_network() { | ||
9 | return net ~ [ | ||
10 | 172.16.0.0/12+, | ||
11 | 192.168.0.0/16+, | ||
12 | 10.0.0.0/8+, | ||
13 | 100.64.0.0/10+, | ||
14 | 2000::/3+, | ||
15 | fd00::/8+ | ||
16 | ]; | ||
17 | }; | ||
18 | |||
19 | protocol kernel { | ||
20 | ipv4 { | ||
21 | import none; | ||
22 | export filter { | ||
23 | if source = RTS_STATIC && proto != "vpnras_v4" && proto != "hack_v4" then reject; | ||
24 | krt_prefsrc = OWNIP4; | ||
25 | accept; | ||
26 | }; | ||
27 | }; | ||
28 | }; | ||
29 | |||
30 | protocol kernel { | ||
31 | ipv6 { | ||
32 | import none; | ||
33 | export filter { | ||
34 | if source = RTS_STATIC && proto != "vpnras_v6" && proto != "hack_v6" then reject; | ||
35 | krt_prefsrc = OWNIP6; | ||
36 | accept; | ||
37 | }; | ||
38 | }; | ||
39 | }; | ||
40 | |||
41 | template bgp v4peers { | ||
42 | local as OWNAS; | ||
43 | |||
44 | ipv4 { | ||
45 | # this lines allows debugging filter rules | ||
46 | # filtered routes can be looked up in birdc using the "show route filtered" command | ||
47 | import keep filtered; | ||
48 | import filter { | ||
49 | # accept every subnet, except our own advertised subnet | ||
50 | # filtering is important, because some guys try to advertise routes like 0.0.0.0 | ||
51 | if is_valid_network() && !is_self_net() then { | ||
52 | accept; | ||
53 | } | ||
54 | reject; | ||
55 | }; | ||
56 | export filter { | ||
57 | if is_valid_network() then { | ||
58 | accept; | ||
59 | } | ||
60 | reject; | ||
61 | }; | ||
62 | import limit 1000 action block; | ||
63 | }; | ||
64 | }; | ||
65 | |||
66 | template bgp v6peers { | ||
67 | local as OWNAS; | ||
68 | |||
69 | ipv6 { | ||
70 | # this lines allows debugging filter rules | ||
71 | # filtered routes can be looked up in birdc using the "show route filtered" command | ||
72 | import keep filtered; | ||
73 | import filter { | ||
74 | # accept every subnet, except our own advertised subnet | ||
75 | # filtering is important, because some guys try to advertise routes like 0.0.0.0 | ||
76 | if is_valid_network() && !is_self_net() then { | ||
77 | accept; | ||
78 | } | ||
79 | reject; | ||
80 | }; | ||
81 | export filter { | ||
82 | if is_valid_network() then { | ||
83 | accept; | ||
84 | } | ||
85 | reject; | ||
86 | }; | ||
87 | import limit 1000 action block; | ||
88 | }; | ||
89 | }; | ||
90 | |||