setup squid proxy server
proxy server is used to block the sites in the office, to set up the normal proxy server you can follow the procedure below
proxy server is used to block the sites in the office, to set up the normal proxy server you can follow the procedure below
To
install squid proxy server
#apt-get
install squid
To
view the status of squid
#service
squid status
In
this /etc/init.d/squid restart will not work so to start and stop the
services
#service
squid stop
#service
squid start
To
go to the configuration file
# cd
/etc/squid
#ls
Here
you will see squid.conf then make a copy of it so that it can be used
after testing it
#cp
squid.conf squid.conf.bak
To
view the configuration file
#gedit
/etc/squid/squid.conf &
then
in the configuration file go assigin line no
then
go to the line number around 3400. ther you will find something like
Tag:
visible_hostname
at
the bottom you type
visible_hostname
sunnyproxyserver
then
save
Then
stop and start the service
#service
squid stop
#service
squid start
then
give
Then
to firefox for editing the firefox with system ip and http port no
first
go to firefox -> edit -> prefernces -> advanced ->
network -> then go to configuration of firefox connect to internet
-> manual proxy config
HTTP
192.168.x.x port: 3128
then
press ok
Then
go to firefox and type any site then it will proxy is annoyoing to
connect sunnyproxyserver
Then
to configuration file
#gedit
/etc/squid/squid.conf &
then
go to line no aroun 600 you will find
#http_access
allow localnet
then
here uncomment the #
Then
stop and start the service
#
service squid stop
#
service squid start
Then
go to firefox and type any website it will open
Then
again go to configuration file
# gedit
/etc/squid/squid.conf &
go
to line nop which we uncommented last
http_access
allow localnet
here
edit it as deny
like
this
http_access
deny localnet
Then
stop and start the services
#service
squid stop
#service
squid start
then
go to fire fox type any website it will be blocked as proxy
connection sunnyproxyserver
Then
go to configuration file again change the
http_access
deny localnet
to
#http_acess
allow alocalnet
if
you want to block some websites then apply acl
then
in configuration file around 630
you
will find
TAG:http_access
there
edit the configuration file at the bottom of it type
acl
block_websites dstdomain .msn.com .espn.com
http_acces
deny block_websites
then
save
then
stop and start the service
#service
squid stop
#service
squid start
then
go to the browser nad type msn.com and espn.com it will not opened
due to annoying of the proxy server
the
see weather other sites are opening or not
please add your comments for site improvement or suggest if any errors
ReplyDelete