In this scenario we have two servers connected on the same VLAN so typically they will be able to communicate directly and do not pass default gateway where you could perform ACL filtering.
To disallow network devices from direct communication use command “switchport protected” under interface configuration.
Configuration Example:
enable configure terminal ! interface FastEthernet0/1 switchport access vlan 10 switchport mode access switchport protected ! interface FastEthernet0/2 switchport access vlan 10 switchport mode access switchport protected ! interface FastEthernet0/3 switchport trunk encapsulation dot1q switchport mode trunk end