PCNSE
NSE
StrongSwan
Configure access-lists The command is: config router access-listI would advise not to try access-list with BGP. The concept of BGP works arounds prefixes and uses prefixes. The prefix gives you more options and flexibility within matches & is simple and straight forward. Also if you use a access-list you have to reference it in a route-mp and then apply that route-map; config router route-map edit " myroutemap" config rule edit 1 set match-ip-address myacl next end next end So it' s little bit more involved than just a simple config router access-list fwiw; Unless you needs to enforce other BGP properties ( communities, metrics,etc....) than you can get by with a simple prefix-list and avoid the route-map imho
PCNSE
NSE
StrongSwan
 config router aspath-list
     edit " SELF_PREFIX_ONLY" 
             config rule
                 edit 1
                     set action permit
                     set regexp " ^$" 
                 next
             end
     next
 end
 
 config router route-map
     edit " RTM-BGP-Outbound-ProviderA" 
         set comments " RTM for egress to Cogent" 
             config rule
                 edit 1
                     set match-as-path " SELF_PREFIX_ONLY" 
                 next
                 edit 2
                     set action deny
                 next
             end
     next
 
 config router bgp
     set as 65500
         config neighbor
             edit " 1.2.3.4" 
                 set soft-reconfiguration enable
                 set remote-as 150
                 set route-map-out " RTM-BGP-Outbound-ProviderA" 
             next
 end
 end
 
 
 Hope this helps!
					
				
			
			
				-- Mathieu Nantel Systems Engineer / Conseiller Technique - Fortinet Montreal, QC
 
					
				
				
			
		
| User | Count | 
|---|---|
| 2707 | |
| 1416 | |
| 810 | |
| 716 | |
| 455 | 
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.