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 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179
|
#syntax: simplejson
{
_: "every key starting with an _ is ignored, but kept"
_0: "it can be useful to add comment in the configuration file"
_1: "keep in mind that the configuration has no ordering"
# to make it easier, the simplejson format allows lines of comments too
exabgp: 3
neighbor {
first-peer {
_: "will pass received routes to the program"
tcp {
bind: "82.219.212.34"
connect: "195.8.215.15"
ttl-security: false
md5: "secret"
}
api {
syslog-text: [ "receive-routes" ]
syslog-json: [ "neighbor-changes","send-packets","receive-packets","receive-routes" ]
}
session {
router-id: "82.219.212.34"
hold-time: 180
asn {
local: 65500
peer: 65500
}
capability {
family {
inet4: ["unicast","multicast","nlri-mpls","mpls-vpn","flow-vpn","flow"]
inet6: ["unicast"]
_inet: ["unicast","flow"]
_alias: "all"
_alias: "minimal"
}
asn4: true
route-refresh: true
graceful-restart: false
multi-session: false
add-path: false
}
}
announce: [
"local-routes"
"off-goes-the-ddos"
]
}
}
apis {
_: "the names defined here can be used in the neighbors"
syslog-json {
encoder: "json"
program: "etc/exabgp/run/syslog-1.py"
}
_: "be careful to not loose comment if you use multiple _"
syslog-text {
encoder: "text"
program: "etc/exabgp/processes/syslog-2.py"
}
}
attributes {
normal-ebgp-attributes {
origin: "igp"
as-path: [ 3356, 1239, 38040, 9737 ]
local-preference: 500
aggregator: "10.0.0.1"
atomic-aggregate: false
originator-id: "10.0.0.1"
med: 10
community: [[3356,2], [3356,22], [3356,86], [3356,500], [3356,666], [3356,2064], "no-export"]
large-community: [[2914,0,666], [3320,1299,4]]
cluster-list: []
extended-community: []
}
simple-attributes {
next-hop: "212.73.207.153"
origin: "igp"
as-path: [ 3356, 1239, 38040, 9737 ]
local-preference: 500
aggregator: "10.0.0.1"
atomic-aggregate: false
originator-id: "10.0.0.1"
med: 10
community: [[3356,2], [3356,22], [3356,86], [3356,500], [3356,666], [3356,2064]]
large-community: [[2914,0,666], [3320,1299,4]]
cluster-list: []
extended-community: []
bgp-prefix-sid: [ 300, [ ( 800000,100 ), ( 1000000,5000 ) ] ]
}
}
flows {
filtering-condition {
simple-ddos {
source: "10.0.0.1/32"
destination: "192.168.0.1/32"
port: [[["=",80]]]
protocol: "tcp"
}
port-block {
port: [ [["=",80 ]],[["=",8080]] ]
destination-port: [ [[">",8080],["<",8088]], [["=",3128]] ]
source-port: [[[">",1024]]]
protocol: [ "tcp", "udp" ]
}
complex-attack {
packet-length: [ [[">",200],["<",300]], [[">",400],["<",500]] ]
_fragment: ["is-fragment"]
fragment: ["first-fragment","last-fragment" ]
_icmp-type: [ "unreachable", "echo-request", "echo-reply" ]
icmp-code: [ "host-unreachable", "network-unreachable" ]
tcp-flags: [ "urgent", "rst" ]
dscp: [ 10, 20 ]
}
}
filtering-action {
make-it-slow {
rate-limit: 9600
}
drop-it {
discard: true
}
send-it-elsewhere {
redirect: "65500:12345"
}
send-it-community {
redirect: "1.2.3.4:5678"
community: [[30740,0], [30740,30740]]
}
}
}
updates {
prefix {
local-routes {
normal-ebgp-attributes {
192.168.0.0/24 {
next-hop: "192.0.2.1"
}
192.168.0.0/24 {
next-hop: "192.0.2.2"
}
}
simple-attributes {
_: "it is possible to overwrite some previously defined attributes"
192.168.1.0/24 {
next-hop: "192.0.2.1"
}
192.168.2.0/24 {
}
}
}
remote-routes {
simple-attributes {
10.0.0.0/16 {
_: "those three can be defined everywhere too, but require the right capability"
label: [0, 1]
path-information: 0
route-distinguisher: "1:0.0.0.0"
split: 24
}
}
}
}
flow {
off-goes-the-ddos {
simple-ddos: "make-it-slow"
port-block: "drop-it"
}
saved_just_in_case {
complex-attack: "send-it-elsewhere"
}
}
}
}
|