Problem z migracją z leciwej maszyny (squid + e2guardian + silentbob)
: 24 września 2015, 14:35
Szkoła specjalna, projekt hobbystyczny 
Serwer pracuje na starej mandarynce.
Stara konfiguracja squid 2.6 + silentbob firewall (https://github.com/thomasfrivold/SilentBob) + dansguardian
Nowa maszyna stoi na debianie jessie
Squid 3.4
silentbob firewall
e2guardian (fork dansguardiana)
Problem jest taki, że konfiguracja śmiga na starym squidzie, na nowym natomiast działa tylko ruch po https, dodatkowo w logach pojawiają się dziwne błędy.
Siedzę już tydzień nad tym problemem i pomysły zaczynają mi się kończyć. Oczywiście google nie za bardzo chce mi pomóc. Wygląda to na błędną konfigurację nowego squida w którym to opcja transparent została zastąpiona opcją intercept, która jest moim zdaniem słabo udokumentowana. Nie znalazłem nigdzie przykładów jej wykorzystania - być może robię coś źle, ale już próbowałem wszystkich możliwych opcji i ciągle ściana ;/
Konfiguracja squida:
konfiguracja silentbob:
logi squid:
Nie wiem jeszcze jakie pliki będą potrzebne - może ktoś już konfigurował wcześniej squida 3.4 i miał podobny problem.
ps. nawet bez podłączenia e2guardiana nie działa.

Serwer pracuje na starej mandarynce.
Stara konfiguracja squid 2.6 + silentbob firewall (https://github.com/thomasfrivold/SilentBob) + dansguardian
Nowa maszyna stoi na debianie jessie
Squid 3.4
silentbob firewall
e2guardian (fork dansguardiana)
Problem jest taki, że konfiguracja śmiga na starym squidzie, na nowym natomiast działa tylko ruch po https, dodatkowo w logach pojawiają się dziwne błędy.
Siedzę już tydzień nad tym problemem i pomysły zaczynają mi się kończyć. Oczywiście google nie za bardzo chce mi pomóc. Wygląda to na błędną konfigurację nowego squida w którym to opcja transparent została zastąpiona opcją intercept, która jest moim zdaniem słabo udokumentowana. Nie znalazłem nigdzie przykładów jej wykorzystania - być może robię coś źle, ale już próbowałem wszystkich możliwych opcji i ciągle ściana ;/
Konfiguracja squida:
Kod: Zaznacz cały
# WELCOME TO SQUID 3.4.8
acl localnet src 10.0.0.0/8 # pierwsza sieć
acl localnet src 192.168.1.0/24 # pierwsza sieć
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
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost manager
http_access deny manager
http_access allow localnet
http_access allow localhost
http_access deny all
http_port 10.0.0.1:3128 intercept
cache_mem 2048 MB
maximum_object_size 4 MB
cache_dir ufs /var/spool/squid3 8192 16 256
cache_swap_low 85
cache_swap_high 95
coredump_dir /var/spool/squid3
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
dns_nameservers 194.204.159.1 194.204.152.34
Kod: Zaznacz cały
#!/bin/sh
######################################################################
# #
# This file was generated by 'firewall-config.pl' tool. #
# You can edit it by hands or use the script configuration. #
# Lines begining with '#' are regarded as comments. #
# #
######################################################################
######################################################################
# #
# firewall.config 1.0.6 by Jay #
# #
# Copyright 2002 Jerome Nokin #
# #
#This program is free software; you can redistribute it and/or modify#
#it under the terms of the GNU General Public License as published by#
#the Free Software Foundation; either version 2 of the License, or #
#(at your option) any later version. #
# #
#This program is distributed in the hope that it will be useful, #
#but WITHOUT ANY WARRANTY; without even the implied warranty of #
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
#GNU General Public License for more details. #
# #
#You should have received a copy of the GNU General Public License #
#along with this program; if not, write to the Free Software #
#Foundation, Inc., 59 Temple Place, Suite 330, Boston, #
#MA 02111-1307 USA #
# #
######################################################################
#####################################################################
# INTERFACES #
#####################################################################
### LAN Interfaces
# May be more than one (ex: (eth0 eth1))
# Please leave interfaces between () and no ""
# Interfaces must be up for ip dection
INT_IFACE=(eth1 eth2)
### External Interface
# May be more than one (ex: "eth2 eth3")
# Interfaces must be up for ip dection
EXT_IFACE="eth0"
#####################################################################
# TRAFFIC #
#####################################################################
### Your Friends
# DHCP_SERVER is the DHCP of your IPS, leave blank if don't know it
# or if you don't use DHCP.
# (you can find it in your "pump" log)
# DNS is the DNS of your ISP (separated with spaces)
DNS="194.204.159.1 194.204.152.34"
DHCP_SERVER="10.0.0.1"
### Allow connections from the World ..
# Give the list of TCP/UDP ports that you want to allow
# on your box (and for which interface).
# Syntax: "<iface1>;port1,port2,port3 <iface2>;<port1>,<port2>"
#
# Example: "ppp0;22,80 ppp1;25,110"
TCP_EXT_IN="eth0;443,22"
UDP_EXT_IN=""
### Allow connections from the LAN ..
# Leave TCP_INT_IN="*" for allow all TCP connections from
# youur LAN (idem for UDP), if not :
#
# Give the list of TCP/UDP ports that you want to allow on your
# box (and for which interface). '*' mean all ports
#
# Syntax: "<iface1>;<port1>,<port2>,<port3> <iface2>;<port1>,<port2>"
#
# Example: "eth0;22,80,8080 eth1;*"
#
# Remeber that allowing ssh connections is always a good idea
# when you're testing this feature ... ;)
TCP_INT_IN="*"
UDP_INT_IN="*"
### TCP & UDP Forward
# ( separated with spaces,
# ex: "eth0>20100:21100>192.168.0.4 eth1>21>192.168.0.6" )
# syntax:
# iface[,iface]>dport[:dport]>dest-ip[:dport]
#
#
# example:
# - redirect port 21 from eth0 and eth1 to 192.168.0.3
# "eth0,eth1>21>192.168.0.3"
#
# - redirect port 2121 from ppp0 to 192.168.0.3 on port 21
# "ppp0>2121>192.168.0.3:21"
TCP_FORWARD=""
UDP_FORWARD=""
#####################################################################
# POST / PRE Scripts #
#####################################################################
### POST START script (run after the 'start')
# Add a list of scripts separated by a ;
# ps: 'restart' = 'stop' + 'start'
POST_START=""
### PRE START script (run before the 'start')
PRE_START=""
### POST STOP script (run after the 'stop')
POST_STOP=""
### PRE STOP script (run before the 'stop')
PRE_STOP=""
#####################################################################
# OPTIONS #
#####################################################################
### Do you have ADSL/Cable/IDSN/... ?
# Enable this option if you have a dynamic ip.
# Your established connections will not be lost
# during a reconnection .
DYN_IP="0"
### Share Internet over your LAN ?
NAT="1"
### This option is necessary if you want to use IRC on your LAN
IRC="0"
### Your Linux box is a DHCP server for the LAN ?
USE_DHCP_SERVER="1"
### Transparents Proxy
# Write the proxies ports of your LAN
PROXY_HTTP="8080"
PROXY_FTP=""
### Can we be pinged by the world ?
# remember that the LAN can Always ping the server
PING_FOR_ALL="0"
### Hosts allowed to ping the linux box (only if PING_FOR_ALL = "0")
ALLOWED_PING=""
### Enable TCP control
TCP_CONTROL="1"
### Enable ICMP Control
ICMP_CONTROL="0"
### Give wich ICMP you want to drop (separate with spaces)
# Please enter the real name of the icmp type
# ex: network-unreachable, host-unreachable, ...
# (see 'iptables -p icmp --help' for the list)
ICMP_TO_DENY=""
### Enable Spoofing control (bad ips)
SPOOFING_CONTROL="1"
### Set firewall in verbose mode ?
alias ECHO="#echo"
### Logging Options
LOGLEVEL="info"
LOG_DROPPED="1"
LOG_MARTIANS="0"
LOG_SYNFLOOD="1"
LOG_PINGFLOOD="1"
LOG_SPOOFED="1"
LOG_ECHO_REPLY_TO_OUTSIDE="1"
LOG_INVALID="1"
### ULOG
# If you don't want to write all dropped packets to your syslog files,
# you can use ULOGD. Give only the 'nlgroup' value of your ulogd.conf.
# Leave blank if you don't want to use ULOGD.
LOG_ULOG_NLGROUP=""
#####################################################################
# Hosts Blocking List #
#####################################################################
# IP and MAC control #
# Reject spyware, doubleclick and co. #
# Give the target of a (or more) ip file #
# #
# (SEE README & SPYWARES!) #
#####################################################################
####### Directory where input and output files are located
# default /var/lib/firewall-jay/
DENY_DIR="/var/lib/firewall-jay"
####### ULOG
# If you don't want to write all dropped packets to your syslog files,
# you can use ULOGD. Give only the 'nlgroup' value of your ulogd.conf.
# Leave blank if you don't want to use ULOGD.
DENY_ULOG_NLGROUP=""
####### Incoming traffic 'from' IPs
# Enable (1) / Disable (0)
DENY_IP_IN="1"
# Filename of ip files (in DENY_DIR directory)
# You can enter more than one file, leave a space between them.
DENY_IP_IN_FILES="block-ip-in.user"
# Log activity
DENY_IP_IN_LOG="1"
####### Outgoing traffic 'to' IPs
DENY_IP_OUT="1"
# Filename of ip files (in DENY_DIR directory)
# You can enter more than one file, leave a space between them.
DENY_IP_OUT_FILES="block-ip-out.user"
# Log activity
DENY_IP_OUT_LOG="1"
####### Incoming traffic 'from' MACs
# Enable (1) / Disable (0)
DENY_MAC_IN="0"
# Filename of mac files (in DENY_DIR directory)
# You can enter more than one file, leave a space between them.
DENY_MAC_IN_FILES=""
# Log activity
DENY_MAC_IN_LOG="0"
#####################################################################
# Type Of Service (TOS) #
# Set better performance to your bandwidth #
#####################################################################
# Enable (1) / Disable (0)
TOS="0"
# Give services which require minimum delay like
# interactives services (ssh , telnet, ...)
TCP_MIN_DELAY=""
UDP_MIN_DELAY=""
# Give services which require maximum throughput (ftp-data, ...)
TCP_MAX_THROUGHPUT=""
UDP_MAX_THROUGHPUT=""
#####################################################################
# VPN - VTUND #
#####################################################################
### Give the devices used for tunneling
# (separated with spaces, ex: "tun0 tun1")
TUN_IFACE=""
### Give the subnet allowed in your LAN
# (separated with spaces, ex:"192.168.2.0/24 192.168.4.0/24")
TUN_SUBNET=""
### Give the ports allowed for TUN_SUBNET
# (separated with spaces)
# "*" give access to all ports
TUN_TCP=""
TUN_UDP=""
#####################################################################
# VPN - PPTP #
# #
# --- Only PPTP server on localhost work for this time ---- #
# #
# Your are able to set up a pptp server on this #
# localhost, or on a LAN behind this firewall #
#####################################################################
# PPTP server on LOCALHOST
##########################
# Enable (1) / Disable (0)
PPTP_LOCALHOST="0"
### Port of Pptp server (default 1723)
PPTP_LOCALHOST_PORT="1723"
### Incoming connections from clients are on which interface(s) ?
PPTP_LOCALHOST_IFACES=""
### Give the subnet of your VPN (ex: 192.168.10.0/24)
PPTP_LOCALHOST_SUBNET_VPN=""
### Which subnets except your new Virtual Network can use
# the VPN connection (ex: the local subnet of your client)
PPTP_LOCALHOST_SUBNET_ALLOWED=""
### Do you want to allow the access to your LAN from the VPN ?
PPTP_LOCALHOST_ACCESS_LAN="0"
### Do you want to allow the access to your Internet connection from the VPN ?
PPTP_LOCALHOST_ACCESS_INET="0"
# PPTP server on LAN
# NOT IMPLEMENTED YET
#####################
# Enable (1) / Disable (0)
PPTP_LAN="0"
### Ip of Ipsec server (ex: 192.168.2.2)
PPTP_LAN_IP=""
### Port of Pptp server (default 1723)
PPTP_LAN_PORT="1723"
#####################################################################
# VPN - IPSEC #
# #
# Your are able to set up a ipsec server on this localhost, #
# or on a LAN behind this firewall #
#####################################################################
# IPSEC server on LOCALHOST
# NOT IMPLEMENTED YET
###########################
# Enable (1) / Disable (0)
IPSEC_LOCALHOST="0"
IPSEC_LOCALHOST_IFACES=""
### Port of Ipsec server (default 500)
IPSEC_LOCALHOST_PORT="500"
IPSEC_LOCALHOST_SUBNET_VPN=""
# IPSEC server on LAN
# NOT IMPLEMENTED YET
######################
# Enable (1) / Disable (0)
IPSEC_LAN="0"
### Ip of Ipsec server (ex: 192.168.2.2)
IPSEC_LAN_IP=""
### Port of Ipsec server (default 500)
IPSEC_LAN_PORT="500"
#####################################################################
# NETFILTER & IPROUTE #
#####################################################################
# If you want to mark packets for playing #
# with iproute2, give port/ip to be marked #
# #
# MARK_TCP="port1>mark1 port2>mark2 ..." #
# ex. MARK_TCP="110>1 30000:30100>2" #
# #
# MARK_IP -> mark packets comming "from" IP #
# MARK_TCP -> mark packets destined "to" tcp port #
# MARK_UDP -> mark packets destined "to" udp port #
#####################################################################
# Enable (1) / Disable (0)
MARK="0"
MARK_IP=""
MARK_TCP=""
MARK_UDP=""
#####################################################################
# CUSTOM RULES FILE #
#####################################################################
# Give the path to the custom rules file #
# The file will be started like a script in #
# the beginning of the firewall #
# #
# Default : /var/lib/firewall-jay/firewall-custom.rules #
#####################################################################
# 1 (enable) / 0 (disable)
CUSTOM_RULES="0"
# Path to custom file
CUSTOM_RULES_FILE="/var/lib/firewall-jay/firewall-custom.rules"
Kod: Zaznacz cały
ERROR: No forward-proxy port configured
Nie wiem jeszcze jakie pliki będą potrzebne - może ktoś już konfigurował wcześniej squida 3.4 i miał podobny problem.
ps. nawet bez podłączenia e2guardiana nie działa.