# Blocking ports with SQUID



## cryingvalor (Nov 4, 2006)

Hey guys how do you block ports using SQUID?

is this correct?:grin:


> acl block_port port 1234
> http_access deny block_port
> http_access allow all


----------



## TheMatt (May 9, 2006)

I am not farmilliar with SQUID, but have you tried it to see if you get errors or if it works?

BTW, what port are you trying to block?


----------



## cryingvalor (Nov 4, 2006)

Well after some trial and error it works :grin:.... 

Well I am trying to whitelist all ports and allow those only that are safe :grin:


----------



## PureEvilDan (May 26, 2005)

Easier to allow:
80, 81, 8080 443. 
HTTP & HTTPS ports. 
FTP/SSH you need to allow 20-23.


----------



## TheMatt (May 9, 2006)

Also, allow ports 25 and 110 for POP3 and SMTP mail, (465 for SMTP with SSL) and 119 for NNTP for newsgroups. If you are doing troubleshooting, you might also want to allow 7 to allow pings.


----------



## PureEvilDan (May 26, 2005)

Matt: you missed imap on port 143 

Offtopic: Signatures work again now


----------

