Skip to content

Instantly share code, notes, and snippets.

View AtaxyaNetwork's full-sized avatar

Cécile Morange AtaxyaNetwork

View GitHub Profile
@AtaxyaNetwork
AtaxyaNetwork / bgp-filter.txt
Last active October 18, 2023 19:45
BGP routing filter ROS7
Replace $PREFIX-v4 and $PREFIX-v6 with your prefixes (eg. 192.0.2.0/24)
Replace $LEIGHT with the length of your prefix (eg. 24)
chain=BGP-IN-v4 rule="if ( dst==$PREFIX-v4 ) { reject }"
chain=BGP-IN-v4 rule="if ( dst==192.168.0.0/16) { reject }"
chain=BGP-IN-v4 rule="if ( dst==127.0.0.0/8) { reject }"
chain=BGP-IN-v4 rule="if ( dst==10.0.0.0/8 ) { reject }"
chain=BGP-IN-v4 rule="if ( dst==169.254.0.0/16) { reject }"
chain=BGP-IN-v4 rule="if ( dst==172.16.0.0/12 ) { reject }"