[Lugge] Fw: problemi con squid

  • From: Roberto A.F. <robang@xxxxxxxxx>
  • To: LUGGE <lugge@xxxxxxxxxxxxx>
  • Date: Fri, 6 Jun 2003 13:57:57 +0200

Ciao,

 per favore per le questioni tecniche scrivi a lugge@xxxxxxxxx

Begin forwarded message:

Date: Fri,  6 Jun 2003 13:13:43 +0200
From: fdurante <fdurante@xxxxxxxxx>
To: info <info@xxxxxxxxx>
Subject: problemi con squid


Buongiorno a tutti
non riesco a leggere ed inviare posta elettronica in internet dai client
windows connessi ad un server Red Hat Linux 8.0 con installato Squid ed
il firewall iptables, non riesco neppure a pingare gli host su internet
né con il nome, che peraltro viene risolto in indirizzo IP, né
direttamente con l_IP address. Tutto il traffico http è regolarmente
attivato e funzionante, tutte le pagine web vengono regolarmente
visualizzate. Vi allego la configurazione del file squid.conf e la
configurazione del firewall.
Come devo fare?
Grazie per la collaborazione!!

Questo è il mini firewall utilizzato ed inserito in /etc/rc.d/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

#!/bin/sh
iptables="/sbin/iptables"
modprobe ipt_LOG
modprobe ip_conntrack
modprobe ip_conntrack_ftp
modprobe ipt_MASQUERADE
modprobe ipt_multiport

# blocco i ping verso la mia macchina
#echo '1' > /proc/sys/net/ipv4/icmp_echo_ignore_all
#echo '1' > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts

#attivo forwarding
echo '1' > /proc/sys/net/ipv4/ip_forward

# attivo protezione contro attacchi Spoofing
echo '1' > /proc/sys/net/ipv4/icmp_ignore_bogus_error_responses
echo '1' > /proc/sys/net/ipv4/tcp_syncookies
echo '1' > /proc/sys/net/ipv4/conf/all/rp_filter

# logga in /var/log/messages i pacchetti malformati e scartati
# automaticamente
echo '1' > /proc/sys/net/ipv4/conf/all/log_martians
echo '0' > /proc/sys/net/ipv4/conf/all/accept_source_route
echo '0' > /proc/sys/net/ipv4/conf/all/accept_redirects

# configurazione politica di default per la tabella filter
iptables -t filter -P INPUT DROP
iptables -t filter -P OUTPUT ACCEPT
iptables -t filter -P FORWARD DROP

# configurazione politica di default per la tabella nat
iptables -t nat -P PREROUTING ACCEPT
iptables -t nat -P POSTROUTING ACCEPT
iptables -t nat -P OUTPUT ACCEPT

# configurazione politica di default per la tabella mangle
iptables -t mangle -P PREROUTING ACCEPT
iptables -t mangle -P OUTPUT ACCEPT

#Protezione dal syn flood
iptables -A FORWARD -p tcp --syn -m limit -j ACCEPT

#Port scanner sospetti
iptables -A FORWARD -p tcp --tcp-flags SYN,ACK,FIN,RST RST -m limit -j
ACCEPT

#Ping della morte
iptables -A INPUT -s 192.168.1.0/24 -p icmp -i eth1 -j ACCEPT
iptables -A FORWARD -p icmp --icmp-type echo request -m limit -j ACCEPT

#Rifiuta connessioni da Multi
iptables -A INPUT -s x.x.x.x/8 -p tcp -i eth0 -j DROP


Configurazione di Squid fondamentale:

http_port 3128
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl SSL_ports port 443 563
acl Safe_ports port 80          # http
acl Safe_ports port 21          # ftp
acl Safe_ports port 443 563     # https, snews
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
acl localnet src 192.168.1.0/24
acl localhost src 127.0.0.1/255.255.255.255
acl Safe_ports port 25 80 110 443 210 119 70 20 21 1025-65535
acl CONNECT method CONNECT
acl all src 0.0.0.0/0.0.0.0
http_access allow localnet
http_access allow localhost
http_access allow Safe_ports
http_access deny !Safe_ports
http_access deny CONNECT
http_access deny all
maximum_object_size 3000 KB
store_avg_object_size 50 KB
acl magic_words1 url_regex -i 192.168
acl magic_words2 url_regex -i ftp .exe .mp3 .vqf .tar.gz .gz .rpm .zip
.rar .avi .mpeg .mpe .mpg .qt .ram .rm .iso .raw .wav .mov
delay_pools 2
delay_class 1 2
delay_parameters 1 -1/-1 -1/-1
delay_access 1 allow magic_words1
delay_class 2 2




-- 
   ,__    ,_     ,___   .-------=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-.
   ||_)   ||\    ||_   /      Proud Member & Master of the LUGGE   |
   || \   ||¯\   ||¯     linuxgrp: http://www.lugge.net            |
   ¯¯  ¯° ¯¯  ¯° ¯¯  °   homepage: http://digilander.iol.it/robang |
\  Roberto A. Foglietta  reg num : #219348 by the Linux Counter    |
 `---------------------=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-'
========---------- 
  
 Prima di scrivere in m-list per favore leggi il regolamento 
 http://www.lugge.net/soci/index.php?link=manifesto.htm#list 
 
 Archivio delle e-mail postate in lista 
 //www.freelists.org/archives/lugge/ 
 
 Modifica dell'account su freelists 
 //www.freelists.org/cgi-bin/lsg2.cgi  
 
----------======== 
 
 Orari di apertura della sede e come arrivarci: 
 http://www.lugge.net/soci/index.php?link=sede.htm 
  
 
 
  

Other related posts:

  • » [Lugge] Fw: problemi con squid