Configure Multiple IP for Squid Proxy Server & hide Version and Hostname
Proxy server is a computer system or application which is installed on computer system that works as a acts as an agent or channel for requests from clients looking for resources from other servers. You can check see this post for more information about installation and configuration of Squid Proxy.
Now after installation when you try to check your IP in any site like whatismyip.com it will show that you are using proxy along with the hostname and version of Squid proxy server which is a security concern.
1) Hide Proxy version & server hostname
a) Hide Squid Version
open “/etc/squid/squid.conf” in a editor like vim and search for “httpd_suppress_version_string” and enable it.
Change FROM:
# Suppress Squid version string info in HTTP headers and HTML error pages.
#
#Default:
#httpd_suppress_version_string off
TO:
# Suppress Squid version string info in HTTP headers and HTML error pages.
#
#Default:
httpd_suppress_version_string on
b) Hide Hostname
Search for “visible_hostname” and change FROM:
# If you want to present a special hostname in error messages, etc,
# define this. Otherwise, the return value of gethostname()
# will be used. If you have multiple caches in a cluster and
# get errors about IP-forwarding you must set them to have individual
# names with this setting.
#
#Default:
# none
TO:
# If you want to present a special hostname in error messages, etc,
# define this. Otherwise, the return value of gethostname()
# will be used. If you have multiple caches in a cluster and
# get errors about IP-forwarding you must set them to have individual
# names with this setting.
#
#Default:
visible_hostname <your desired hostname>
<your desired hostname> will be the name you want to show to world
2) Configure Multiple IP for Squid
Sometime it happens that the Proxy server which you have setup have multiple IP address and you want to configure squid server to use multiple IP addresses (i.e. Systems will show the secondary IP of the server instead of primary). Open squid configuration file; search for “tcp_outgoing_address” and add following
acl ip2 myip <IP Address 2>
tcp_outgoing_address <IP Address 1> ip1
tcp_outgoing_address <IP Address 2> ip2
Replace <IP Address> with the IP assigned to your Proxy Server.
Restart Squid Server with command “service squid restart“
2 thoughts on “Configure Multiple IP for Squid Proxy Server & hide Version and Hostname”
You must log in to post a comment.