Skip to main content

DDoS mitigation with FastNetMon

FastNetMon is a software-based DoS/DDoS detection tool that analyzes flows and signals a mitigation action over BGP such as traffic redirection or selective destination blackholes.

To get started with Pathvector and FastNetMon, first install Pathvector and FastNetMon Advanced.

Configure FastNetMon

From the fcli prompt:

set main mirror_afpacket enable
set main interfaces bond0
set main process_ipv6_traffic enable
set main networks_list
set main networks_list 2001:db8::/48

set main email_notifications_enabled enable
set main email_notifications_tls enable
set main email_notifications_auth enable
set main email_notifications_port 587
set main email_notifications_host
set main email_notifications_from
set main email_notifications_username
set main email_notifications_password examplepassword
set main email_notifications_recipients

set hostgroup global threshold_mbps 900
set hostgroup global ban_for_bandwidth enable
set hostgroup global threshold_tcp_syn_mbps 10
set hostgroup global ban_for_tcp_syn_bandwidth enable
set hostgroup global threshold_icmp_mbps 10
set hostgroup global ban_for_icmp_bandwidth enable

set hostgroup global enable_ban enable
set main enable_ban_ipv6 enable
set main enable_ban enable
set main unban_enabled enable
set main ban_time 300 # Unban after 5 minutes

set main gobgp enable
set main gobgp_ipv6 enable
set main gobgp_announce_host enable
set main gobgp_announce_host_ipv6 enable
set main gobgp_next_hop
set main gobgp_next_hop_ipv6 100::1
set main gobgp_bgp_listen_port 1179

set bgp pathvector
set bgp pathvector local_asn 65530
set bgp pathvector remote_asn 65530
set bgp pathvector local_address
set bgp pathvector remote_address
set bgp pathvector ipv4_unicast enable
set bgp pathvector ipv6_unicast enable
set bgp pathvector active enable


Configure Pathvector

Pathvector config needs a few extra options for the FastNetMon session:

asn: 65530
local-asn: 65530 # In this example the ASN and local ASN are set explicitly for iBGP
neighbors: [ "" ]
filter-rpki: false # ROAs may have a maxLength that would cause the routes to be filtered
filter-prefix-length: false # Disable prefix length filter so /32 and /128 routes will be accepted
enforce-first-as: false # We don't care about the first AS in path
enforce-peer-nexthop: false # Peer nexthops will be set to blackhole addresses, not the BGP peer address
announce-originated: false # No need to announce anything to FNM. While it does support learning routes over BGP, the implementation requires a cronjob to run the updates:
neighbor-port: 1179 # The default BGP port will conflict, so we'll use a different one for FastNetMon
add-on-import: [ "65530,666" ] # More communities can be added here for other peers, or added on a per-peer basis
mp-unicast-46: true # FastNetMon will announce both IPv4 and IPv6 routes over this multiprotocol session