Jan 07
Ubuntu Feisty + Squid proxy
I have a LAN at home and one of my machines is connected to the Internet. I wanted to share this connection with the other machines.
When I had Ubuntu Edgy earlier, I had set up Internet Connection Sharing, referring this thread at Ubuntuforums.org. Now I am using Feisty and thought I will set up a proxy server this time. So I went with Squid. My installation log (for plain http access) is given below.
- Install Squid. Open a terminal and type
- Set visible_hostname
If you got the below error message after installation, you will need to set visible_hostname. - Grant access to machines on your LAN
Add the following lines to squid.conf to create an acl and grant http_access to it (you can find a commented example around line 2590 in this file). Replace the IP address range as required.acl my_network src 192.168.1.0/24 http_access allow my_network
- (Re)start squid
sudo /etc/init.d/squid restart
sudo apt-get install squid
FATAL: Could not determine fully qualified hostname. Please set 'visible_hostname'
Edit /etc/squid/squid.conf as root and add a hostname (line 2899 on my system - line numbers are wrt the config file that is created when Squid 2.6.5-4 is installed from the Feisty repository)
visible_hostname newpc
Now you can point the browsers on your LAN machines to port 3128 on the machine where squid is running.
