Primeiro, instalaria o squid em default e veria o seu funcionamento;
Segundo, iria implantando o redirecionamento de forma direta, na mão sem script;
Terceiro, checaria o DNS, pois ja tomei um pau miseravel por causa dele em squid+iptables
no mais, é pra funcionar
Int211
2006/9/26, zeca <[EMAIL PROTECTED]>:
Bom, dia Grupo. pesquisando na internet sobre squid li umas matérias e ate mesmo no grupo e não consigo resolver esse problema
minha situação e a seguinte tenho o slackware 9.1 e o 10.1 no dois acontece a mesma coisa
não roda squid em transparência.
mesmo configurado os parâmetros e o iptables redirect na porta 80;
aparece a pagina de erro
O seguinte erro foi encontrado:
URL inválida
Alguns aspectos de requisições URL são incorretos. Possíveis causas:
Protocolo de acesso incorreto ou faltando (deve ser `http://` ou similar)
Faltou o hostname
Hostname com caracter inválido; não são permitidos underscores.
o config.bash meu esta assim
./configure \
--prefix=/usr \
--exec-prefix=/usr \
--enable-underscores \
--sysconfdir=/etc/squid \
--sharedstatedir=/var/lib/squid \
--localstatedir=/var \
--datadir=/usr/share/squid \
--enable-dependency-tracking \
--enable-xmalloc-statistics \
--enable-carp \
--with-pthreads \
--with-aio \
--with-dl \
--enable-storeio="ufs diskd" \
--enable-removal-policies="heap lru" \
--enable-icmp \
--enable-delay-pools \
--enable-useragent-log \
--enable-referer-log \
--enable-kill-parent-hack \
--enable-snmp \
--enable-cachemgr-hostname=localhost \
--enable-arp-acl \
--enable-htcp \
--enable-ssl \
--enable-forw-via-db \
--enable-cache-digests \
--enable-default-err-language="Portuguese" \
--enable-poll \
--disable-http-violations \
--enable-linux-netfilter \
--with-large-files \
--enable-large-cache-files \
--with-build-environment=POSIX_V6_ILP32_OFFBIG \
--enable-truncate \
--enable-auth="basic digest ntlm" \
--enable-ntlm-fail-open \
--enable-stacktraces \
--enable-x-accelerator-vary
meu squid conf esta assim
http_port 192.168.1.3 3128
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
cache_mem 512 MB
cache_swap_low 90
cache_swap_high 95
maximum_object_size 40960 KB
cache_replacement_policy lru
cache_dir ufs /usr/var/cache 5000 16 256
cache_access_log /usr/var/logs/access.log
cache_log /usr/var/logs/cache.log
cache_store_log /usr/var/logs/store.log
mime_table /etc/squid/mime.conf
log_mime_hdrs on
pid_filename /usr/var/logs/squid.pid
ftp_passive on
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
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 to_localhost dst 127.0.0.0/8
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 Safe_ports port 9090 # brma admi
acl Safe_ports port 10001 # brma login
acl Safe_ports port 3389 # Terminal service
acl Safe_ports port 3390 # Terminal service
acl Safe_ports port 1863 # msn
acl CONNECT method CONNECT
acl manager proto cache objetc
acl rede_local src 192.168.1.0/255.255.255.0
acl porn url_regex "/etc/squid/porn"
acl noporn url_regex "/etc/squid/noporn"
http_access deny CONNECT !SSL_ports
http_access allow noporn
http_access deny porn
http_access allow manager localhost
http_access allow rede_local
http_access deny all
http_reply_access allow all
icp_access allow all
visible_hostname scorpiao.com.br
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_single_host on
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
forwarded_for on
error_directory /usr/share/squid/errors/Portuguese
coredump_dir /usr/var/cache
e o firewall esta desta forma:
#!/bin/sh
#Carregando modulos
modprobe ip_conntrack
modprobe ip_conntrack_ftp
modprobe ip_conntrack_irc
modprobe ip_nat_irc
modprobe ip_tables
modprobe ipt_state
modprobe iptable_nat
modprobe ip_nat_ftp
modprobe ipt_limit
modprobe ipt_LOG
modprobe ipt_REJECT
modprobe ipt_MASQUERADE
modprobe ipt_mac
###/etc/rc.d/rc.bind start
##iptables-restore /etc/valido
IPT=iptables
PROGRAMA=/etc/firewall
NET_IFACE=ppp0
LAN_IFACE=eth0
MACLIST=/etc/maclist
echo 1 > /proc/sys/net/ipv4/ip_forward
case $1 in
start)
$IPT -X
$IPT -F
$IPT -t nat -F
$IPT -t nat -X
$IPT -t filter -P FORWARD DROP
$IPT-restore /etc/valido
for i in `cat $MACLIST`; do
STATUS=`echo $i | cut -d ';' -f 1`
IPSOURCE=`echo $i | cut -d ';' -f 3`
MACSOURCE=`echo $i | cut -d ';' -f 2`
#Se status = a então eu libera a conexao
if [ $STATUS = "a" ]; then
$IPT -t filter -A FORWARD -d 0/0 -s $IPSOURCE -m mac --mac-source $MACSOURCE -j ACCEPT
$IPT -t filter -A FORWARD -d $IPSOURCE -s 0/0 -j ACCEPT
$IPT -t filter -A INPUT -s $IPSOURCE -d 0/0 -m mac --mac-source $MACSOURCE -j ACCEPT
$IPT -t filter -A OUTPUT -s $IPSOURCE -d 0/0 -j ACCEPT
#$IPT -t nat -A PREROUTING -p tcp -i $NET_IFACE --dport 21 -j DNAT --to 192.168.1.1:21
#$IPT -t nat -A PREROUTING -p tcp -i $NET_IFACE --dport 5800 -j DNAT --to 192.168.1.1:5800
#$IPT -t nat -A PREROUTING -p tcp -i $NET_IFACE --dport 5900 -j DNAT --to 192.168.1.1:5900
#$IPT -t filter -A POSTROUTING -s 192.168.1.1 -o $NET_IFACE -j MASQUERADE
$IPT -t nat -A PREROUTING -s $IPSOURCE -m mac --mac-source $MACSOURCE -p tcp --dport 80 -j REDIRECT --to-port 3128
$IPT -t nat -A POSTROUTING -s $IPSOURCE -o $NET_IFACE -j MASQUERADE
# Se for = b então bloqueia o MAC
else
$IPT -t filter -A FORWARD -m mac --mac-source $MACSOURCE -j DROP
$IPT -t filter -A INPUT -m mac --mac-source $MACSOURCE -j DROP
$IPT -t filter -A OUTPUT -m mac --mac-source $MACSOURCE -j DROP
fi
done
tem alguma ideia para me ajudar
Agradecido
Jose Carlos Teixeira Da Silva
Tecnologia da Informação
Usina Santa Isabel S/A
[EMAIL PROTECTED]
Fone (17) 3543-9100 / Ramal 9127
--
Celso Luiz Domingues
Coord. de TI
(71) 9957-3698
(71) 3621-6787 __._,_.___
Enviar mensagem: [email protected]
Assinar: [EMAIL PROTECTED]
Cancelar assinatura: [EMAIL PROTECTED]
Proprietário da lista: [EMAIL PROTECTED]
| Yahoo! Grupos, um serviço oferecido por: | |
|
Links do Yahoo! Grupos
- Para visitar o site do seu grupo na web, acesse:
http://br.groups.yahoo.com/group/squid-br/
- Para sair deste grupo, envie um e-mail para:
[EMAIL PROTECTED]
- O uso que você faz do Yahoo! Grupos está sujeito aos Termos do Serviço do Yahoo!.
__,_._,___
