Thursday, October 30, 2008

How To install Internet Gateway in Ubuntu with squid

Use apt for instalation.user@server:~$ sudo apt-get install squid

please, backup file configuration (original)

user@server:~$ cp /etc/squid/squid.conf /etc/squid/squid.conf.backup

configuration file /etc/squid/squid.conf

user@server:~$ sudo nano /etc/squid/squid.conf

http_port 3128 /* listening port squid */

cache_dir ufs /var/spool/squid 5120 16 256 /*locate saving cache */

cache_mem 8 MB /* max memory for squid in memory cache*/

acl our_networks src 192.168.1.0/24 /* access list network client proxy is permitted */

http_access allow our_networks /* allow http access from network client */

cache_mgr webmaster /* configure cache manager */

visible_hostname proxy.network.net /* hostname in error message */

forwarded_for on /* configure transoarabt if anonymous proxy diset off */

another configuration is default. press Ctrl+O to saving, Ctrl+X for exit.

make directory cache with this command

user@server:~$ sudo squid -z

Restart Squid with comman

user@server:~$ sudo /etc/init.d/squid restart