Simple Configuration Tips Put Squid on the Menu - Page 3

By Carla Schroder | Posted Jun 2, 2004
Page 3 of 3   |  Back to Page 1
Print ArticleEmail Article
  • Share on Facebook
  • Share on Twitter
  • Share on LinkedIn
Continued From Page 2

Running Squid
And now, the moment we've all been waiting for -- making Squid go:

# /etc/init.d/squid start
Starting proxy server: squid.

Squid tries hard to be helpful. It checks for errors at startup, and tells where they are.

A useful way to test Squid is to start it from the command line. Shut Squid down:

# squid -k shutdown

Restart it in a terminal with this command, and mounds of interesting output shall pour forth:

# squid -N -d1
2004/05/31 15:26:01| Starting Squid Cache version 2.5.STABLE5 for i386-debian-linux-gnu...
2004/05/31 15:26:01| Process ID 3807
2004/05/31 15:26:01| With 1024 file descriptors available
2004/05/31 15:26:01| Performing DNS Tests...
2004/05/31 15:26:01| Successful DNS name lookup tests...
2004/05/31 15:26:01| DNS Socket created at 0.0.0.0, port 32871, FD 4
2004/05/31 15:26:01| Adding nameserver 12.169.174.2 from /etc/resolv.conf
2004/05/31 15:26:01| Adding nameserver 12.169.174.3 from /etc/resolv.conf

The line we're most interested in seeing is

2004/05/31 15:26:02| Ready to serve requests.

Let's give it a test drive. Configure a Web browser on the Squid server. Tell it "localhost" and "port 3128." Start Web surfing. You should be able to cruise the Web without a care. To make sure it's going through Squid, shut Squid down by hitting ctrl+c. Now when you click a link, it should give an error message like "The connection was refused when attempting to contact the proxy server."

Other clients on the LAN can connect either by the Squid server's IP or hostname, and port. You now have a functioning http caching server. Come back next week for more details on access control lists, and additional Squid management tips and tricks.

Resources

Comment and Contribute
(Maximum characters: 1200). You have
characters left.
Get the Latest Scoop with Enterprise Networking Planet Newsletter