Squid is already preconfigured in SUSE LINUX, so
you can start it right after the installation. To ensure a smooth start-up,
the network should be configured in such 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 cases such as this, at least the name server
should be clearly 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. For the initial start-up,
the directory structure must first be defined in
/var/squid/cache. This is done by the start script
/etc/init.d/squid automatically 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 all users to access Squid and, through
it, the Internet, change the entry in the configuration file
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 33.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.7.7, “System Services (Runlevel)”.
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 24.2, “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 achieved by way of the sysconfig variable
MODIFY_RESOLV_CONF_DYNAMICALLY, which is
YES. Set this variable
NO with the YaST
sysconfig editor (see Section 7.8, “The YaST sysconfig Editor”). Then
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.