Wednesday, February 8, 2017

How to Open a Port in Squid Proxy Server

Squid Proxy


By default the following TCP port numbers are opened in squid proxy server.

acl Safe_ports port 80                    # http
acl Safe_ports port 21                    # ftp
acl Safe_ports port 443                  # https
acl Safe_ports port 70                    # gopher
acl Safe_ports port 210                  # wais
acl Safe_ports port 280                  # http-mgmt
acl Safe_ports port 488                  # gss-http
acl Safe_ports port 591                  # filemaker
acl Safe_ports port 777                  # multiling http
acl Safe_ports port 1025-65535   # unregistered ports

If a web server listening on custom port 81/TCP, squid server will not allow to browse to  that server due to the port 81/TCP is not listed as Safe_ports.
  
Follow the steps to enable a port in squid server:

[root@server ~]# vi /etc/squid/squid.conf

acl Safe_ports port 81                         # Add this line with the default port acls
http_access allow Safe_ports              # allow access
                                                        # add the above two lines to squid,conf

Restart or reload squid server with changes:

[root@server ~]# service squid reload
                or
[root@server ~]# service squid restart

No comments:

Post a Comment