OPNsense Forum

Archive => 18.1 Legacy Series => Topic started by: Perun on February 24, 2018, 04:13:43 pm

Title: UGLY Bug? Squid cant be killed, host cant be rebooted
Post by: Perun on February 24, 2018, 04:13:43 pm
Hi

I have a problem with squid on 18.1.2_2
If I try to stop it I get these errors (see attachement).

then I cant kill squid process (not either with kill -9):

Code: [Select]
50587  -  D      26:09.05 (squid-1) -f /usr/local/etc/squid/squid.conf (squid)

only reboot helps, but I need to do power off/on because it hangs at shutdown with squid :(

Can someone confirm that it is a bug? Or do I have something wrong in my config?

Code: [Select]
#
# Automatic generated configuration for Squid.
# Do not edit this file manually.
#


# Setup transparent mode listeners on loopback interfaces
http_port 127.0.0.1:3128 intercept ssl-bump cert=/var/squid/ssl/ca.pem dynamic_cert_mem_cache_size=10MB generate-host-certificates=on
http_port [::1]:3128 intercept ssl-bump cert=/var/squid/ssl/ca.pem dynamic_cert_mem_cache_size=10MB generate-host-certificates=on
https_port 127.0.0.1:3129 intercept ssl-bump cert=/var/squid/ssl/ca.pem dynamic_cert_mem_cache_size=10MB generate-host-certificates=on
https_port [::1]:3129 intercept ssl-bump cert=/var/squid/ssl/ca.pem dynamic_cert_mem_cache_size=10MB generate-host-certificates=on

# Setup regular listeners configuration
http_port 192.168.50.3:3128  ssl-bump cert=/var/squid/ssl/ca.pem dynamic_cert_mem_cache_size=10MB generate-host-certificates=on
http_port 192.168.50.2:3128  ssl-bump cert=/var/squid/ssl/ca.pem dynamic_cert_mem_cache_size=10MB generate-host-certificates=on

# setup ssl re-cert
sslcrtd_program /usr/local/libexec/squid/ssl_crtd -s /var/squid/ssl_crtd -M 12MB
sslcrtd_children 10

sslproxy_cipher HIGH:MEDIUM:!RC4:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS
sslproxy_options NO_TLSv1

# setup ssl bump acl's
acl bump_step1 at_step SslBump1
acl bump_step2 at_step SslBump2
acl bump_step3 at_step SslBump3
acl bump_nobumpsites ssl::server_name "/usr/local/etc/squid/nobumpsites.acl"

# configure bump
ssl_bump peek bump_step1 all
ssl_bump peek bump_step1 all
ssl_bump peek bump_step2 bump_nobumpsites
ssl_bump splice bump_step3 bump_nobumpsites
ssl_bump stare bump_step2
ssl_bump bump bump_step3

sslproxy_cert_error deny all

acl ftp proto FTP
http_access allow ftp


# Setup ftp proxy

# Rules allowing access from your local networks.
# Generated list of (internal) IP networks from where browsing
# should be allowed. (Allow interface subnets).
acl localnet src 192.168.50.0/24 # Possible internal network (interfaces v4)
# Default allow for local-link and private networks
acl localnet src fc00::/7       # RFC 4193 local private network range
acl localnet src fe80::/10      # RFC 4291 link-local (directly plugged) machines

# ACL lists

# ACL - Allow Subnets - User defined (subnets)
acl subnets src 192.168.50.0/24
acl subnets src 192.168.150.0/24
acl subnets src 192.168.55.0/24
acl subnets src 10.0.8.0/24
acl subnets src 127.0.0.1

# ACL - Remote fetched Blacklist (remoteblacklist)

# ACL - Block browser/user-agent - User defined (browser)

# ACL - SSL ports, default are configured in config.xml
# Configured SSL ports (if defaults are not listed, then they have been removed from the configuration!):
acl SSL_ports port 443 # https
acl SSL_ports port 444 # https

# Default Safe ports are now defined in config.xml
# Configured Safe ports (if defaults are not listed, then they have been removed from the configuration!):
# ACL - Safe_ports
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

# ICAP SETTINGS
# enable icap
icap_enable on
icap_default_options_ttl 60

# send user information to the icap server
adaptation_send_client_ip on
adaptation_send_username off
icap_client_username_encode off
icap_client_username_header X-Username

# preview
icap_preview_enable on
icap_preview_size 1024

# add the servers
icap_service response_mod respmod_precache icap://[::1]:1344/avscan
icap_service request_mod reqmod_precache icap://[::1]:1344/avscan


# Pre-auth plugins
include /usr/local/etc/squid/pre-auth/*.conf

# Authentication Settings








# Deny requests to certain unsafe ports
adaptation_access response_mod deny !Safe_ports
adaptation_access request_mod deny !Safe_ports
http_access deny !Safe_ports
# Deny CONNECT to other than secure SSL ports
adaptation_access response_mod deny CONNECT !SSL_ports
adaptation_access request_mod deny CONNECT !SSL_ports
http_access deny CONNECT !SSL_ports

# Only allow cachemgr access from localhost
adaptation_access response_mod allow localhost manager
adaptation_access request_mod allow localhost manager
adaptation_access response_mod deny manager
adaptation_access request_mod deny manager
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
adaptation_access response_mod deny to_localhost
adaptation_access request_mod deny to_localhost
http_access deny to_localhost


# Auth plugins
include /usr/local/etc/squid/auth/*.conf

#
# Access Permission configuration:
#
# Deny request from unauthorized clients

#
# ACL - localnet - default these include ranges from selected interfaces (Allow local subnets)
adaptation_access response_mod allow localnet
adaptation_access request_mod allow localnet
http_access allow localnet

# ACL - localhost
adaptation_access response_mod allow localhost
adaptation_access request_mod allow localhost
http_access allow localhost

# ACL list (Allow) subnets
adaptation_access response_mod allow subnets
adaptation_access request_mod allow subnets
http_access allow subnets

# Deny all other access to this proxy
adaptation_access response_mod deny all
adaptation_access request_mod deny all
http_access deny all
# Post-auth plugins
include /usr/local/etc/squid/post-auth/*.conf

# Caching settings
cache_mem 256 MB
cache_dir ufs /var/squid/cache 100 16 256

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

#
# 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

# Squid Options
# dns_v4_first reverses the order of preference to make Squid contact dual-stack websites over IPv4 first
dns_v4_first on

access_log syslog:local4.info
# Disable cache store log
cache_store_log none
# URI hanlding with Whitespaces (default=strip)
uri_whitespace strip
# X-Forwarded header handling (default=on)
forwarded_for on
# Disable squid logfile rotate to use system defaults
logfile_rotate 0
# Define visible hostname
visible_hostname cerber.chao5.int
# Define visible email
cache_mgr root@chao5.int

Greetz
Title: Re: UGLY Bug? Squid cant be killed, host cant be rebooted
Post by: franco on February 27, 2018, 08:36:48 pm
Will this not work?

# service squid stop

(takes a long time usually)
Title: Re: UGLY Bug? Squid cant be killed, host cant be rebooted
Post by: Perun on March 04, 2018, 08:04:19 pm
no
Title: Re: UGLY Bug? Squid cant be killed, host cant be rebooted
Post by: franco on March 05, 2018, 08:26:39 am
Bummer.