LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   Squid Proxy on Linux (http://www.linuxquestions.org/questions/linux-server-73/squid-proxy-on-linux-641403/)

obzerver 05-11-2008 06:16 AM

Squid Proxy on Linux
 
Hi,

I need help with Squid Proxy Caching Software.

I have reviewed the official Squid documents and searched the web extensively for it but couldn't find a simple configuration guide.


Here is my problem:

1- I installed FREEBSD release 7 [ Full Installation ]

2- I installed SQUID 3
./configure
make
make install

3. added only
visible_hostname myhost

4. run the command
./squid -z

5. ./squid start

but ./squid -k check
gives me:
Squid: error: could not send signal 0 to process 15456: (3) no such process



my question:
what is the minimum configuration i can do to start using squid just ?

thanks

Moved from Windows to Linux

acid_kewpie 05-11-2008 06:54 AM

by default you'd need to change nothing from the default configs, you really need to provide more information as to why it's not loading for us to help you. check the squid logs files for information in this area.

obzerver 05-11-2008 07:12 AM

Thank you for your prompt reply. I really appreciate it.

I am attaching the log files and squid.conf file
oops i just notice that i can't put attachments.

here is the
log file

Quote:

Originally Posted by access.log
1210496615.307 1 127.0.0.1 TCP_DENIED/403 1726 GET http://www.google.com - NONE/- text/html
1210496620.452 0 127.0.0.1 TCP_DENIED/403 1726 GET http://www.google.com - NONE/- text/html
1210496631.620 0 127.0.0.1 TCP_DENIED/403 1726 GET http://www.google.com - NONE/- text/html

Quote:

Originally Posted by cache.log
2008/05/11 11:58:37| Creating Swap Directories
2008/05/11 11:58:37| Making directories in /usr/local/squid/var/cache/00
2008/05/11 11:58:37| Making directories in /usr/local/squid/var/cache/01
2008/05/11 11:58:37| Making directories in /usr/local/squid/var/cache/02
2008/05/11 11:58:37| Making directories in /usr/local/squid/var/cache/03
2008/05/11 11:58:37| Making directories in /usr/local/squid/var/cache/04
2008/05/11 11:58:38| Making directories in /usr/local/squid/var/cache/05
2008/05/11 11:58:38| Making directories in /usr/local/squid/var/cache/06
2008/05/11 11:58:38| Making directories in /usr/local/squid/var/cache/07
2008/05/11 11:58:38| Making directories in /usr/local/squid/var/cache/08
2008/05/11 11:58:39| Making directories in /usr/local/squid/var/cache/09
2008/05/11 11:58:39| Making directories in /usr/local/squid/var/cache/0A
2008/05/11 11:58:39| Making directories in /usr/local/squid/var/cache/0B
2008/05/11 11:58:40| Making directories in /usr/local/squid/var/cache/0C
2008/05/11 11:58:40| Making directories in /usr/local/squid/var/cache/0D
2008/05/11 11:58:40| Making directories in /usr/local/squid/var/cache/0E
2008/05/11 11:58:40| Making directories in /usr/local/squid/var/cache/0F
2008/05/11 12:00:01| Starting Squid Cache version 3.0.STABLE5 for i386-unknown-freebsd7.0...
2008/05/11 12:00:01| Process ID 15444
2008/05/11 12:00:01| With 7168 file descriptors available
2008/05/11 12:00:01| Performing DNS Tests...
FATAL: ipcache_init: DNS name lookup tests failed.
Squid Cache (Version 3.0.STABLE5): Terminated abnormally.
CPU Usage: 0.019 seconds = 0.010 user + 0.010 sys
Maximum Resident Size: 5428 KB
Page faults with physical i/o: 0
2008/05/11 14:46:06| Starting Squid Cache version 3.0.STABLE5 for i386-unknown-freebsd7.0...
2008/05/11 14:46:06| Process ID 2128
2008/05/11 14:46:06| With 7168 file descriptors available
2008/05/11 14:46:06| Performing DNS Tests...
FATAL: ipcache_init: DNS name lookup tests failed.
Squid Cache (Version 3.0.STABLE5): Terminated abnormally.
CPU Usage: 0.019 seconds = 0.010 user + 0.010 sys
Maximum Resident Size: 4532 KB
Page faults with physical i/o: 0
2008/05/11 14:46:12| Starting Squid Cache version 3.0.STABLE5 for i386-unknown-freebsd7.0...
2008/05/11 14:46:12| Process ID 2132
2008/05/11 14:46:12| With 7168 file descriptors available
2008/05/11 14:46:12| Performing DNS Tests...
FATAL: ipcache_init: DNS name lookup tests failed.
Squid Cache (Version 3.0.STABLE5): Terminated abnormally.
CPU Usage: 0.019 seconds = 0.010 user + 0.010 sys
Maximum Resident Size: 3964 KB
Page faults with physical i/o: 0
2008/05/11 14:47:06| Starting Squid Cache version 3.0.STABLE5 for i386-unknown-freebsd7.0...
2008/05/11 14:47:06| Process ID 2134
2008/05/11 14:47:06| With 7168 file descriptors available
2008/05/11 14:47:06| Performing DNS Tests...
FATAL: ipcache_init: DNS name lookup tests failed.
Squid Cache (Version 3.0.STABLE5): Terminated abnormally.
CPU Usage: 0.019 seconds = 0.000 user + 0.019 sys
Maximum Resident Size: 4000 KB
Page faults with physical i/o: 0
2008/05/11 14:47:09| Starting Squid Cache version 3.0.STABLE5 for i386-unknown-freebsd7.0...
2008/05/11 14:47:09| Process ID 2136
2008/05/11 14:47:09| With 7168 file descriptors available
2008/05/11 14:47:09| Performing DNS Tests...
FATAL: ipcache_init: DNS name lookup tests failed.
Squid Cache (Version 3.0.STABLE5): Terminated abnormally.
CPU Usage: 0.019 seconds = 0.019 user + 0.000 sys
Maximum Resident Size: 5380 KB
Page faults with physical i/o: 0
2008/05/11 14:47:15| Starting Squid Cache version 3.0.STABLE5 for i386-unknown-freebsd7.0...
2008/05/11 14:47:15| Process ID 2138
2008/05/11 14:47:15| With 7168 file descriptors available
2008/05/11 14:47:15| Performing DNS Tests...
FATAL: ipcache_init: DNS name lookup tests failed.
Squid Cache (Version 3.0.STABLE5): Terminated abnormally.
CPU Usage: 0.019 seconds = 0.010 user + 0.010 sys
Maximum Resident Size: 5472 KB
Page faults with physical i/o: 0
2008/05/11 14:48:09| Starting Squid Cache version 3.0.STABLE5 for i386-unknown-freebsd7.0...
2008/05/11 14:48:09| Process ID 2140
2008/05/11 14:48:09| With 7168 file descriptors available
2008/05/11 14:48:09| Performing DNS Tests...
FATAL: ipcache_init: DNS name lookup tests failed.
Squid Cache (Version 3.0.STABLE5): Terminated abnormally.
CPU Usage: 0.019 seconds = 0.014 user + 0.005 sys
Maximum Resident Size: 5476 KB
Page faults with physical i/o: 0
2008/05/11 14:48:12| Starting Squid Cache version 3.0.STABLE5 for i386-unknown-freebsd7.0...
2008/05/11 14:48:12| Process ID 2142
2008/05/11 14:48:12| With 7168 file descriptors available
2008/05/11 14:48:12| Performing DNS Tests...
FATAL: ipcache_init: DNS name lookup tests failed.
Squid Cache (Version 3.0.STABLE5): Terminated abnormally.
CPU Usage: 0.019 seconds = 0.019 user + 0.000 sys
Maximum Resident Size: 5004 KB
Page faults with physical i/o: 0
2008/05/11 14:48:18| Starting Squid Cache version 3.0.STABLE5 for i386-unknown-freebsd7.0...
2008/05/11 14:48:18| Process ID 2144
2008/05/11 14:48:18| With 7168 file descriptors available
2008/05/11 14:48:18| Performing DNS Tests...
FATAL: ipcache_init: DNS name lookup tests failed.
Squid Cache (Version 3.0.STABLE5): Terminated abnormally.
CPU Usage: 0.019 seconds = 0.010 user + 0.010 sys
Maximum Resident Size: 5284 KB
Page faults with physical i/o: 0
2008/05/11 14:49:12| Starting Squid Cache version 3.0.STABLE5 for i386-unknown-freebsd7.0...
2008/05/11 14:49:12| Process ID 2146
2008/05/11 14:49:12| With 7168 file descriptors available
2008/05/11 14:49:12| Performing DNS Tests...
FATAL: ipcache_init: DNS name lookup tests failed.
Squid Cache (Version 3.0.STABLE5): Terminated abnormally.
CPU Usage: 0.019 seconds = 0.000 user + 0.019 sys
Maximum Resident Size: 4672 KB
Page faults with physical i/o: 0
2008/05/11 14:49:15| Starting Squid Cache version 3.0.STABLE5 for i386-unknown-freebsd7.0...
2008/05/11 14:49:15| Process ID 2148
2008/05/11 14:49:15| With 7168 file descriptors available
2008/05/11 14:49:15| Performing DNS Tests...
FATAL: ipcache_init: DNS name lookup tests failed.
Squid Cache (Version 3.0.STABLE5): Terminated abnormally.
CPU Usage: 0.019 seconds = 0.000 user + 0.019 sys
Maximum Resident Size: 3964 KB
Page faults with physical i/o: 0
2008/05/11 14:49:21| Starting Squid Cache version 3.0.STABLE5 for i386-unknown-freebsd7.0...
2008/05/11 14:49:21| Process ID 2150
2008/05/11 14:49:21| With 7168 file descriptors available
2008/05/11 14:49:21| Performing DNS Tests...
FATAL: ipcache_init: DNS name lookup tests failed.
Squid Cache (Version 3.0.STABLE5): Terminated abnormally.
CPU Usage: 0.019 seconds = 0.010 user + 0.010 sys
Maximum Resident Size: 4048 KB
Page faults with physical i/o: 0
2008/05/11 14:50:15| Starting Squid Cache version 3.0.STABLE5 for i386-unknown-freebsd7.0...
2008/05/11 14:50:15| Process ID 2155
2008/05/11 14:50:15| With 7168 file descriptors available
2008/05/11 14:50:15| Performing DNS Tests...
FATAL: ipcache_init: DNS name lookup tests failed.
Squid Cache (Version 3.0.STABLE5): Terminated abnormally.
CPU Usage: 0.019 seconds = 0.019 user + 0.000 sys
Maximum Resident Size: 5472 KB
Page faults with physical i/o: 0
2008/05/11 14:50:18| Starting Squid Cache version 3.0.STABLE5 for i386-unknown-freebsd7.0...
2008/05/11 14:50:18| Process ID 2157
2008/05/11 14:50:18| With 7168 file descriptors available
2008/05/11 14:50:18| Performing DNS Tests...
FATAL: ipcache_init: DNS name lookup tests failed.
Squid Cache (Version 3.0.STABLE5): Terminated abnormally.
CPU Usage: 0.019 seconds = 0.010 user + 0.010 sys
Maximum Resident Size: 5380 KB
Page faults with physical i/o: 0
2008/05/11 14:50:24| Starting Squid Cache version 3.0.STABLE5 for i386-unknown-freebsd7.0...
2008/05/11 14:50:24| Process ID 2159
2008/05/11 14:50:24| With 7168 file descriptors available
2008/05/11 14:50:24| Performing DNS Tests...
Squid Cache (Version 3.0.STABLE5): Terminated abnormally.
CPU Usage: 0.019 seconds = 0.014 user + 0.005 sys
Maximum Resident Size: 5472 KB
Page faults with physical i/o: 0
2008/05/11 14:52:30| Starting Squid Cache version 3.0.STABLE5 for i386-unknown-freebsd7.0...
2008/05/11 14:52:30| Process ID 2174
2008/05/11 14:52:30| With 7168 file descriptors available
2008/05/11 14:52:30| Performing DNS Tests...
FATAL: ipcache_init: DNS name lookup tests failed.
Squid Cache (Version 3.0.STABLE5): Terminated abnormally.
CPU Usage: 0.019 seconds = 0.000 user + 0.019 sys
Maximum Resident Size: 4408 KB
Page faults with physical i/o: 0
2008/05/11 14:53:24| Starting Squid Cache version 3.0.STABLE5 for i386-unknown-freebsd7.0...
2008/05/11 14:53:24| Process ID 2176
2008/05/11 14:53:24| With 7168 file descriptors available
2008/05/11 14:53:24| Performing DNS Tests...
FATAL: ipcache_init: DNS name lookup tests failed.
Squid Cache (Version 3.0.STABLE5): Terminated abnormally.
CPU Usage: 0.019 seconds = 0.019 user + 0.000 sys
Maximum Resident Size: 5380 KB
Page faults with physical i/o: 0
2008/05/11 14:53:27| Starting Squid Cache version 3.0.STABLE5 for i386-unknown-freebsd7.0...
2008/05/11 14:53:27| Process ID 2178
2008/05/11 14:53:27| With 7168 file descriptors available
2008/05/11 14:53:27| Performing DNS Tests...
FATAL: ipcache_init: DNS name lookup tests failed.
Squid Cache (Version 3.0.STABLE5): Terminated abnormally.
CPU Usage: 0.019 seconds = 0.019 user + 0.000 sys
Maximum Resident Size: 5276 KB
Page faults with physical i/o: 0
2008/05/11 14:53:33| Starting Squid Cache version 3.0.STABLE5 for i386-unknown-freebsd7.0...
2008/05/11 14:53:33| Process ID 2180
2008/05/11 14:53:33| With 7168 file descriptors available
2008/05/11 14:53:33| Performing DNS Tests...
2008/05/11 14:54:10| Starting Squid Cache version 3.0.STABLE5 for i386-unknown-freebsd7.0...
2008/05/11 14:54:10| Process ID 2182
2008/05/11 14:54:10| With 7168 file descriptors available
2008/05/11 14:54:10| DNS Socket created at 0.0.0.0, port 52328, FD 4
2008/05/11 14:54:10| Adding nameserver 212.46.48.7 from /etc/resolv.conf
2008/05/11 14:54:11| Unlinkd pipe opened on FD 9
2008/05/11 14:54:11| Swap maxSize 102400 KB, estimated 7876 objects
2008/05/11 14:54:11| Target number of buckets: 393
2008/05/11 14:54:11| Using 8192 Store buckets
2008/05/11 14:54:11| Max Mem size: 8192 KB
2008/05/11 14:54:11| Max Swap size: 102400 KB
2008/05/11 14:54:11| Version 1 of swap file with LFS support detected...
2008/05/11 14:54:11| Rebuilding storage in /usr/local/squid/var/cache (DIRTY)
2008/05/11 14:54:11| Using Least Load store dir selection
2008/05/11 14:54:11| Set Current Directory to /usr/local/squid/var/cache
2008/05/11 14:54:12| Loaded Icons.
2008/05/11 14:54:12| Accepting HTTP connections at 0.0.0.0, port 3128, FD 11.
2008/05/11 14:54:12| Accepting ICP messages at 0.0.0.0, port 3130, FD 12.
2008/05/11 14:54:12| HTCP Disabled.
2008/05/11 14:54:12| Ready to serve requests.
2008/05/11 14:54:12| Done reading /usr/local/squid/var/cache swaplog (0 entries)
2008/05/11 14:54:12| Finished rebuilding storage from disk.
2008/05/11 14:54:12| 0 Entries scanned
2008/05/11 14:54:12| 0 Invalid entries.
2008/05/11 14:54:12| 0 With invalid flags.
2008/05/11 14:54:12| 0 Objects loaded.
2008/05/11 14:54:12| 0 Objects expired.
2008/05/11 14:54:12| 0 Objects cancelled.
2008/05/11 14:54:12| 0 Duplicate URLs purged.
2008/05/11 14:54:12| 0 Swapfile clashes avoided.
2008/05/11 14:54:12| Took 0.25 seconds ( 0.00 objects/sec).
2008/05/11 14:54:12| Beginning Validation Procedure
2008/05/11 14:54:12| Completed Validation Procedure
2008/05/11 14:54:12| Validated 25 Entries
2008/05/11 14:54:12| store_swap_size = 0
2008/05/11 14:54:12| storeLateRelease: released 0 objects
FATAL: ipcache_init: DNS name lookup tests failed.
Squid Cache (Version 3.0.STABLE5): Terminated abnormally.
CPU Usage: 0.019 seconds = 0.010 user + 0.010 sys
Maximum Resident Size: 3960 KB
Page faults with physical i/o: 0
2008/05/11 14:54:27| Squid is already running! Process ID 2182
FATAL: ipcache_init: DNS name lookup tests failed.
Squid Cache (Version 3.0.STABLE5): Terminated abnormally.
CPU Usage: 0.019 seconds = 0.010 user + 0.010 sys
Maximum Resident Size: 4992 KB
Page faults with physical i/o: 0
2008/05/11 14:54:30| Squid is already running! Process ID 2182
2008/05/11 14:54:30| Squid is already running! Process ID 2182
2008/05/11 14:54:33| Squid is already running! Process ID 2182
2008/05/11 14:54:33| Squid is already running! Process ID 2182
FATAL: ipcache_init: DNS name lookup tests failed.
Squid Cache (Version 3.0.STABLE5): Terminated abnormally.
CPU Usage: 0.019 seconds = 0.010 user + 0.010 sys
Maximum Resident Size: 4048 KB
Page faults with physical i/o: 0
2008/05/11 14:54:36| Squid is already running! Process ID 2182
2008/05/11 14:54:36| Squid is already running! Process ID 2182
2008/05/11 14:54:36| Squid is already running! Process ID 2182
2008/05/11 14:54:39| Squid is already running! Process ID 2182
2008/05/11 14:54:39| Squid is already running! Process ID 2182
2008/05/11 14:54:39| Squid is already running! Process ID 2182
2008/05/11 14:54:42| Squid is already running! Process ID 2182
2008/05/11 14:54:42| Squid is already running! Process ID 2182
2008/05/11 14:54:45| Squid is already running! Process ID 2182
2008/05/11 14:54:48| Squid is already running! Process ID 2182
2008/05/11 14:57:41| Preparing for shutdown after 0 requests
2008/05/11 14:57:41| Waiting 0 seconds for active connections to finish
2008/05/11 14:57:41| FD 11 Closing HTTP connection
2008/05/11 14:57:42| Shutting down...
2008/05/11 14:57:42| FD 12 Closing ICP connection
2008/05/11 14:57:42| Closing unlinkd pipe on FD 9
2008/05/11 14:57:42| storeDirWriteCleanLogs: Starting...
2008/05/11 14:57:42| Finished. Wrote 0 entries.
2008/05/11 14:57:42| Took 0.00 seconds ( 0.00 entries/sec).
CPU Usage: 1.168 seconds = 0.440 user + 0.728 sys
Maximum Resident Size: 9588 KB
Page faults with physical i/o: 1
2008/05/11 14:57:42| Squid Cache (Version 3.0.STABLE5): Exiting normally.

in squid.conf
i have added
visible_hostname mylinux
http_access allow all
icp_access allow all
cache_dir ufs /usr/local/squid/var/cache/ 100 16 256

thanks

acid_kewpie 05-11-2008 08:21 AM

Did you read the log files then? Have you resesrched that FATAL line? seems like your DNSisn't working.

obzerver 05-12-2008 04:11 AM

It's working now with little tuning in the squid.conf file and adding chmod +777 to /var/logs

Now a quick question for the Squid Guru

How I can I add user authentication for the proxy


Anyone who connects to the proxy should get a username and password for verification..

how can I enable this on squid.

thanks

acid_kewpie 05-12-2008 04:51 AM

well that's the time when you need to refer to standard documentation. Google for "squid authentication" and you'll get plenty of information.

obzerver 05-12-2008 06:07 AM

I checked the standard documentation,

it says tp locate ncsa_auth
find / -name ncsa_auth
gives me nothing.

there is nothing in the /usr/local/squid/bin or /usr/local/squid/etc or /usr/local/squid/libexec

where can I find the ncsa_auth ? and how can I download it for FREEBSD

I have squid version 3

thanks


All times are GMT -5. The time now is 02:32 AM.