You are not logged in.

#1 2015-12-05 11:37:33

amaro
Member
From: xfce
Registered: 2014-05-09
Posts: 367

[SOLVED] Can't make squid to start at boot

Hey, guys!

Decided to replace privoxy with squid. Installed everything following the wiki but can't make to start at boot. Did the troubleshooting https://wiki.archlinux.org/index.php/Sq … after_boot but still in order to make it work have to

systemctl stop squid
systemctl start squid

Plus adding intercept or transparent gives something like: Proxy server refused connection.
Here is the squid.conf

#
# Recommended minimum configuration:
#

# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
acl localnet src 10.0.0.0/8	# RFC1918 possible internal network
acl localnet src 172.16.0.0/12	# RFC1918 possible internal network
acl localnet src 192.168.0.0/16	# RFC1918 possible internal network
acl localnet src fc00::/7       # RFC 4193 local private network range
acl localnet src fe80::/10      # RFC 4291 link-local (directly plugged) machines

acl SSL_ports port 443
acl Safe_ports port 80		# http
acl Safe_ports port 21		# ftp
acl Safe_ports port 443		# https
acl Safe_ports port 70		# gopher
acl Safe_ports port 210		# wais
acl Safe_ports port 1025-65535	# unregistered ports
acl Safe_ports port 280		# http-mgmt
acl Safe_ports port 488		# gss-http
acl Safe_ports port 591		# filemaker
acl Safe_ports port 777		# multiling http
acl CONNECT method CONNECT

#
# Recommended minimum Access Permission configuration:
#
# Deny requests to certain unsafe ports
http_access deny !Safe_ports

# Deny CONNECT to other than secure SSL ports
http_access deny CONNECT !SSL_ports

# Only allow cachemgr access from localhost
http_access allow localhost manager
http_access deny manager

# We strongly recommend the following be uncommented to protect innocent
# web applications running on the proxy server who think the only
# one who can access services on "localhost" is a local user
http_access deny to_localhost

#
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#

# Example rule allowing access from your local networks.
# Adapt localnet in the ACL section to list your (internal) IP networks
# from where browsing should be allowed
http_access allow localnet
http_access allow localhost

# And finally deny all other access to this proxy
http_access deny all

# Squid normally listens to port 3128
http_port 3128 #transparent #intercept 


# Uncomment and adjust the following to add a disk cache directory.
cache_dir ufs /var/cache/squid 100 16 256

# Leave coredumps in the first cache dir
coredump_dir /var/cache/squid

#
# Add any of your own refresh_pattern entries above these.
#
refresh_pattern ^ftp:		1440	20%	10080
refresh_pattern ^gopher:	1440	0%	1440
refresh_pattern -i (/cgi-bin/|\?) 0	0%	0
refresh_pattern .		0	20%	4320

cache_mem 64 MB

p.s. /var/log/squid/cache.log is empty.

Last edited by amaro (2015-12-05 13:29:30)

Offline

#2 2015-12-05 11:52:15

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED] Can't make squid to start at boot


Jin, Jîyan, Azadî

Offline

#3 2015-12-05 11:56:32

amaro
Member
From: xfce
Registered: 2014-05-09
Posts: 367

Re: [SOLVED] Can't make squid to start at boot

Yes, I have.

Offline

#4 2015-12-05 12:28:01

c0mm0ner
Member
Registered: 2015-11-09
Posts: 93

Re: [SOLVED] Can't make squid to start at boot

p.s. /var/log/squid/cache.log is empty.

Did you look into the journal as well?

Offline

#5 2015-12-05 12:56:26

amaro
Member
From: xfce
Registered: 2014-05-09
Posts: 367

Re: [SOLVED] Can't make squid to start at boot

If you mean this I haven't

journalctl -b | grep "squid"
Dec 05 14:41:41 evohp systemd[1]: Started Weekly rotation of squid log files.
Dec 05 14:42:00 evohp systemd[1]: squid.service: PID file /run/squid.pid not readable (yet?) after start: No such file or directory
Dec 05 14:42:03 evohp systemd[1]: squid.service: Supervising process 448 which is not our child. We'll most likely not notice when it exits.
Dec 05 14:42:00 evohp squid[446]: Squid Parent: will start 1 kids
Dec 05 14:42:00 evohp squid[446]: Squid Parent: (squid-1) process 448 started
Dec 05 14:42:00 evohp squid[448]: Set Current Directory to /var/cache/squid
Dec 05 14:42:00 evohp squid[448]: Starting Squid Cache version 3.5.12 for x86_64-pc-linux-gnu...
Dec 05 14:42:00 evohp squid[448]: Service Name: squid
Dec 05 14:42:00 evohp squid[448]: Process ID 448
Dec 05 14:42:00 evohp squid[448]: Process Roles: worker
Dec 05 14:42:00 evohp squid[448]: With 1024 file descriptors available
Dec 05 14:42:00 evohp squid[448]: Initializing IP Cache...
Dec 05 14:42:01 evohp squid[448]: DNS Socket created at [::], FD 8
Dec 05 14:42:01 evohp squid[448]: DNS Socket created at 0.0.0.0, FD 9
Dec 05 14:42:01 evohp squid[448]: Warning: Could not find any nameservers. Trying to use localhost
Dec 05 14:42:01 evohp squid[448]: Please check your /etc/resolv.conf file
Dec 05 14:42:01 evohp squid[448]: or use the 'dns_nameservers' option in squid.conf.
Dec 05 14:42:01 evohp squid[448]: Logfile: opening log daemon:/var/log/squid/access.log
Dec 05 14:42:01 evohp squid[448]: Logfile Daemon: opening log /var/log/squid/access.log
Dec 05 14:42:01 evohp squid[448]: Unlinkd pipe opened on FD 15
Dec 05 14:42:01 evohp squid[448]: Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
Dec 05 14:42:01 evohp squid[448]: Store logging disabled
Dec 05 14:42:01 evohp squid[448]: Swap maxSize 102400 + 65536 KB, estimated 12918 objects
Dec 05 14:42:01 evohp squid[448]: Target number of buckets: 645
Dec 05 14:42:01 evohp squid[448]: Using 8192 Store buckets
Dec 05 14:42:01 evohp squid[448]: Max Mem  size: 65536 KB
Dec 05 14:42:01 evohp squid[448]: Max Swap size: 102400 KB
Dec 05 14:42:02 evohp squid[448]: Rebuilding storage in /var/cache/squid (dirty log)
Dec 05 14:42:02 evohp squid[448]: Using Least Load store dir selection
Dec 05 14:42:02 evohp squid[448]: Set Current Directory to /var/cache/squid
Dec 05 14:42:03 evohp squid[448]: Finished loading MIME types and icons.
Dec 05 14:42:03 evohp squid[448]: HTCP Disabled.
Dec 05 14:42:03 evohp squid[448]: Squid plugin modules loaded: 0
Dec 05 14:42:03 evohp squid[448]: Adaptation support is off.
Dec 05 14:42:03 evohp squid[448]: Accepting HTTP Socket connections at local=[::]:3128 remote=[::] FD 18 flags=9
Dec 05 14:42:03 evohp squid[448]: Done reading /var/cache/squid swaplog (617 entries)
Dec 05 14:42:03 evohp squid[448]: Finished rebuilding storage from disk.
Dec 05 14:42:03 evohp squid[448]:       617 Entries scanned
Dec 05 14:42:03 evohp squid[448]:         0 Invalid entries.
Dec 05 14:42:03 evohp squid[448]:         0 With invalid flags.
Dec 05 14:42:03 evohp squid[448]:       617 Objects loaded.
Dec 05 14:42:03 evohp squid[448]:         0 Objects expired.
Dec 05 14:42:03 evohp squid[448]:         0 Objects cancelled.
Dec 05 14:42:03 evohp squid[448]:         0 Duplicate URLs purged.
Dec 05 14:42:03 evohp squid[448]:         0 Swapfile clashes avoided.
Dec 05 14:42:03 evohp squid[448]:   Took 0.49 seconds (1261.51 objects/sec).
Dec 05 14:42:03 evohp squid[448]: Beginning Validation Procedure
Dec 05 14:42:03 evohp squid[448]:   Completed Validation Procedure
Dec 05 14:42:03 evohp squid[448]:   Validated 617 Entries
Dec 05 14:42:03 evohp squid[448]:   store_swap_size = 9532.00 KB
Dec 05 14:42:03 evohp squid[448]: storeLateRelease: released 0 objects

It says to use the 'dns_nameservers' option in squid.conf. I copied the nameservers from resolv.conf. I'll reboot to see if it's working.

Offline

#6 2015-12-05 13:06:49

amaro
Member
From: xfce
Registered: 2014-05-09
Posts: 367

Re: [SOLVED] Can't make squid to start at boot

Got it working at boot! Thanks, c0mm0ner!

Transparent and intercept still doesn't work.

Offline

#7 2015-12-05 13:28:07

amaro
Member
From: xfce
Registered: 2014-05-09
Posts: 367

Re: [SOLVED] Can't make squid to start at boot

Everything is working. This is the explanation from the wiki:
Note: If you are using a content filtering solution, you should put the port for it, not the Squid port, and you need to remove the intercept option in the http_port line.
DansGuardian uses port 3128 that's why no intercept is needed. I overlooked it.

Last edited by amaro (2015-12-05 13:28:55)

Offline

Board footer

Powered by FluxBB