Standard access-list example on Cisco Router

Hello Hussein.

When creating and implementing (extended) access lists, you are specifying how to filter traffic based on source and destination IPs, protocols, ports etc. In order to filter traffic that is generated locally by the router, you just have to determine the IP address from which it is being generated (an IP address of a local physical or loopback interface) and filter it accordingly by applying the access list to the appropriate interface(s).

You don’t have to do anything special for locally generated traffic, just make sure you have the appropriate IP address ranges included in your access lists.

I hope this has been helpful!

Laz