Ciao a tutti.

Di solito mi era sufficiente leggere qualche voltra discussione 
sull'argomento, cercare qualche aiuto con google e fare qualche prova 
per piegare la configurazione di un programma alle mie voglie.

Poi mi è venuto lo schiribizzo di configurare un parental control su 
questo singolo host, connesso ad internet con Alice gate 2 e, dopo aver 
smanettato per piu' di una settimana, mi trovo di fronte ad una 
situazione ridicola.

Se imposto iceweasel (Modifica, Preferenze, avanzate, rete, connessione) 
con la configurazione manuale del proxy (localhost:8080) le pagine web 
sono intercettate da DG. Ma basta passare alla connessione diretta ad 
Internet per vanificare il tutto.

Mi è sembrato di capire che per impedire agli utenti il bypass del proxy 
si interviene sulle regole di iptables e di squid, ma ogni mio 
tentativo di convincerli a considerare sempre e solo gli utenti di  
localhost (non gli utenti in LAN) ha fallito miseramente.

Brancolo nel buio. Sapreste darmi lumi  o, almeno, indirizzarmi a 
qualche pagina web che affronta il caso con questi tre programmi?

Potrei provare con la triade firehol, tinyproxy e DG - come suggerito 
nell'articolo "Simple HOWTO for setting up DG on a single home PC 
running Ubuntu. By Olli Savolainen" - ma cosi' facendo darei un colpo 
alla mia testardaggine.

Per sollecitare la vostra curiosita' vi faccio leggere i risultati dei 
miei sforzi con shorewall e squid.

Cordialita'
Vittorio.

host:~# cat /etc/shorewall/interfaces
#ZONE   INTERFACE       BROADCAST       OPTIONS
net             eth0                    detect          
dhcp,tcpflags,logmartians,nosmurfs
#LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE

host:~# cat /etc/shorewall/zones
#ZONE   TYPE    OPTIONS IN              OUT
#                                       OPTIONS OPTIONS
fw      firewall
net     ipv4
#LAST LINE - ADD YOUR ENTRIES ABOVE THIS ONE - DO NOT REMOVE

host:~# cat /etc/shorewall/policy
#SOURCE         DEST    POLICY  LOG LEVEL       LIMIT:BURST
$FW                     net             DROP    info
net                     $FW             DROP    info
net                     all             DROP    info
# The FOLLOWING POLICY MUST BE LAST
all                     all             REJECT  info
#LAST LINE -- ADD YOUR ENTRIES ABOVE THIS LINE -- DO NOT REMOVE

host:~# cat /etc/shorewall/rules
#ACTION         SOURCE  DEST    PROTO   DEST    SOURCE  ORIGINAL        RATE    
        USER/   MARK
#                                                                       PORT    
PORT(S) DEST    LIMIT   GROUP

# ?
REDIRECT                net             3128    tcp             www
ACCEPT          $FW             net             tcp             www
REDIRECT                net             8080    tcp             www

# Drop Ping from the "bad" net zone.. and prevent your log from being 
flooded..
Ping/DROP       net             $FW

# Permit all ICMP traffic FROM the firewall TO the net zone
ACCEPT          $FW             net             icmp

# Permit single service outgoing FROM the firewall TO the net zone
DNS/ACCEPT              $FW             net
FTP/ACCEPT              $FW             net
IMAP/ACCEPT             $FW             net
IMAPS/ACCEPT            $FW             net
Ping/ACCEPT             $FW             net
POP3/ACCEPT             $FW             net
POP3S/ACCEPT    $FW             net
SMTP/ACCEPT             $FW             net
SMTPS/ACCEPT            $FW             net
SSH/ACCEPT              $FW             net
HTTPS/ACCEPT            $FW             net
Whois/ACCEPT            $FW             net

# Zeroconf seems hit on multicast DNS port
ACCEPT          $FW             net             tcp     5353
ACCEPT          $FW             net             udp     5353
#LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE

host:~# grep -v "^#" /etc/squid3/squid.conf | sed -e '/^$/d'
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
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 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 allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access deny all
http_port 127.0.0.1:3128 transparent
hierarchy_stoplist cgi-bin ?
access_log /var/log/squid3/access.log squid
refresh_pattern ^ftp:           1440    20%     10080
refresh_pattern ^gopher:        1440    0%      1440
refresh_pattern (cgi-bin|\?)    0       0%      0
refresh_pattern .               0       20%     4320
icp_port 0
htcp_port 0
coredump_dir /var/spool/squid3

Dimenticavo. Anche questo sembra essere importante

host:~# iptables -t nat -n -L
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination
net_dnat   all  --  0.0.0.0/0            0.0.0.0/0

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Chain net_dnat (1 references)
target     prot opt source               destination
REDIRECT   tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:80 
redir ports 3128
REDIRECT   tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:80 
redir ports 8080

host:~# netstat -ntl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         
State
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               
LISTEN
tcp        0      0 0.0.0.0:51275           0.0.0.0:*               
LISTEN
tcp        0      0 0.0.0.0:111             0.0.0.0:*               
LISTEN
tcp        0      0 127.0.0.1:8080          0.0.0.0:*               
LISTEN
tcp        0      0 127.0.0.1:631           0.0.0.0:*               
LISTEN
tcp        0      0 127.0.0.1:3128          0.0.0.0:*               
LISTEN
tcp        0      0 127.0.0.1:25            0.0.0.0:*               
LISTEN
tcp6       0      0 :::80                   :::*                    
LISTEN
tcp6       0      0 :::22                   :::*                    
LISTEN
tcp6       0      0 ::1:631                 :::*                    
LISTEN

host:~# netstat -nr
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt 
Iface
192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 
eth0
0.0.0.0         192.168.1.1     0.0.0.0         UG        0 0          0 
eth0


--
Per REVOCARE l'iscrizione alla lista, inviare un email a
[EMAIL PROTECTED] con oggetto "unsubscribe". Per
problemi inviare un email in INGLESE a [EMAIL PROTECTED]

To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Rispondere a