Squid is already preconfigured in SUSE Linux,
you can start it right after the installation. To ensure a smooth start-up,
the network should be configured in a way that at least one name
server and the Internet can be reached. Problems can arise if a dial-up
connection is used with a
dynamic DNS configuration. In this case, at least the name server
should be entered, because Squid does not
start if it does not detect a DNS server in
To start Squid, enter
start at the command line
root. In the initial start-up,
the directory structure of the cache must first be defined in
/var/cache/squid. This is done automatically by the
/etc/init.d/squid and can take a few
seconds or even minutes. If
done appears to the right in
green, Squid has been successfully loaded. To
test the functionality of Squid on the local system,
localhost as the proxy and
the port in the browser.
To allow users from the local system and other systems to access Squid and
the Internet, change the
entry in the configuration files
http_access allow all. However, in
doing so, consider that Squid is made completely
accessible to anyone by this action. Therefore, define ACLs that control
access to the proxy. More information about this is available in
Section 29.4.2, “Options for Access Controls”.
After modifying the configuration file
Squid must reload the configuration file.
Do this with
completely restart Squid with
can be used to check if the proxy is running. The command
Squid to shut down. This can take a while,
because Squid waits up to half a minute
shutdown_lifetime option in
/etc/squid/squid.conf) before dropping the connections
to the clients and writing its data to the disk.
If Squid dies after a short period of time even
though it was started successfully, check whether there is a faulty name
server entry or whether the
/etc/resolv.conf file is
missing. Squid logs the cause of a start-up
failure in the file
Squid should be loaded automatically when the
system boots, use the YaST runlevel editor to activate
Squid for the desired runlevels.
See Section 2.5.11, “System Services (Runlevel)” (↑Start-Up).
An uninstall of Squid does not remove the cache
hierarchy or the log files. To remove these, delete the
/var/cache/squid directory manually.
Setting up a local DNS server makes sense even if it does not manage its own domain. It then simply acts as a caching-only name server and is also able to resolve DNS requests via the root name servers without requiring any special configuration (see Section 20.3, “Starting the Name Server BIND”). How this can be done depends on whether you chose dynamic DNS during the configuration of the Internet connection.
Normally, with dynamic DNS, the DNS server is set by the provider during
the establishment of the Internet connection and the local file
/etc/resolv.conf is adjusted automatically. This
behavior is controlled in the file
/etc/sysconfig/network/config with the
MODIFY_RESOLV_CONF_DYNAMICALLY, which is
"yes". Set this variable
"no" with the YaST
sysconfig editor (see Section 8.3.1, “Changing the System Configuration Using the YaST sysconfig
enter the local DNS server in the file
/etc/resolv.conf with the IP address
localhost. This way Squid can always
find the local name server when it starts.
To make the provider's name server accessible, enter it
in the configuration file
forwarders along with its IP address. With
dynamic DNS, this can be achieved automatically during connection
establishment by setting the sysconfig variable
With static DNS, no automatic DNS adjustments take place while
connection, so there is no need to change any
sysconfig variables. You must, however, enter the local DNS
server in the file
/etc/resolv.conf as described above.
Additionally, the providers static name server must be entered manually
in the file
forwarders along with its IP address.
|DNS and Firewall|
If you have a firewall running, make sure DNS requests can pass it.