Online Book Reader

Home Category

Squid_ The Definitive Guide - Duane Wessels [185]

By Root 2078 0

Syntax

client_netmask IPv4-netmask

Default

client_netmask 255.255.255.255

Example

client_netmask 255.255.255.0

Related

cache_access_log, useragent_log, referer_log, log_fqdn

Name

ftp_user

Synopsis

This directive contains the password Squid sends when logging in to anonymous FTP servers. Convention dictates that anonymous FTP clients send the user's email address as the login password. Most anonymous FTP servers accept an abbreviated form with only a username followed by @ (e.g., joe_blow@). You probably won't need to change this directive unless you encounter a very picky FTP server.

Syntax

ftp_user email-address

Default

ftp_user Squid@

Example

ftp_user joe_blow@company.com

Related

ftp_list_width, ftp_passive

Name

ftp_list_width

Synopsis

This directive controls the width of the filename column in FTP directory listings that Squid generates. The default value is chosen so that the listings fit inside a typical browser window. This also means that long filenames may be truncated. If you'd like to see more characters in long filenames, increase this value.

Syntax

ftp_list_width character-count

Default

ftp_list_width 32

Example

ftp_list_width 64

Related

ftp_user

Name

ftp_passive

Synopsis

Squid normally uses FTP's so-called passive mode for file transfers. This means that the FTP server creates a TCP socket for data transfer and waits for the client to connect. Passive mode works much better through most Internet firewalls. The alternative is to have the FTP client (Squid in this case) create a TCP socket and wait for a connection from the server. Most likely, you'll never have problems with FTP passive mode. However, you can force nonpassive operation by turning off this directive.

Syntax

ftp_passive on|off

Default

ftp_passive on

Example

ftp_passive off

Related

ftp_user, ftp_list_width, ftp_sanitycheck

Name

ftp_sanitycheck

Synopsis

When using FTP passive mode (the default), the FTP server tells Squid the IP address and port number for each data connection. Squid normally checks the given values to make sure they match the server's IP address. In other words, an FTP server should always use its own IP address in the PASV reply message. If it doesn't, Squid complains to cache.log and attempts a data connection with the PORT command. Disable the ftp_sanitycheck directive if you want Squid to skip the IP address sanity check.

Syntax

ftp_sanitycheck on|off

Default

ftp_sanitycheck on

Example

ftp_sanitycheck off

Related

ftp_passive

Name

cache_dns_program

Synopsis

Recall that, by default, Squid uses an internal DNS client implementation. However, you also have the choice of using an external helper program to perform DNS lookups. This choice must be made when you run ./configure, with the --disable-internal-dns option.

If you elect to use the external DNS, this directive specifies the pathname to the dnsserver program. This is a misleading name in that the program isn't really a DNS server. It is more like a DNS proxy. The program reads hostnames (or IP addresses) from Squid, executes the necessary lookup, and writes IP addresses (or hostnames) back.

You probably won't need to use this directive, unless you move the Squid binaries after running make install or you're inclined to experiment with the external DNS program.

Syntax

cache_dns_program pathname

Default

cache_dns_program $prefix/libexec/dnsserver

Example

cache_dns_program /usr/local/squid/libexec/better_dnsserver

Related

dns_children

Name

dns_children

Synopsis

This directive is meaningful only with the —disable-internal-dns option.

The interface between Squid and the external DNS program is built around the gethostbyname( ) function. Squid writes a request to a dnsserver process, which performs the query. The gethostbyname( ) call blocks the process until the reply arrives. This is why Squid can't use the function internally.

Each dnsserver handles only one request at a time, so you need enough of them to handle the load

Return Main Page Previous Page Next Page

®Online Book Reader