Cisco – Close port 80 & 443 on Cisco switch

ciscointernetswitch

Hi i have Cisco switch model 2960 48 ports i plane to disable three ports on it for Internet service. I want to know how can apply the command on port number 20,21and 23 to close port number 80&443 .

Best Answer

As I understand, you want to block http/https traffic on switch ports 20,21 and 23 so that users cannot access any web pages (http/https), is it correct?

If yes, you can try to use Port ACLs. You would need an ACL and apply it to switch ports 20,21 and 23.

Let me assume the format of your switch port 20 is f0/20, the following configuration is an example of Port ACLs on switch port 20:

 ip access-list extended block-http-https
    deny   tcp any any eq www
    deny   tcp any any eq 443
    permit ip any any

 interface FastEthernet0/20
   switchport mode access
   ip access-group block-http-https in
 end

I hope it is helpful and answers your question.