julianderson
(usa Debian)
Enviado em 11/09/2010 - 09:44h
ola pessoal da vol
meu nome e julianderson e sou novo no mundo linux
Estou com um probleminha no meu linux espero ter ajuda, obrigado..
Esta semana eu instalei e configurei o debian so apenas com essas seguintes configuracoes;
Placa de rede
#IP roteador Principal
192.168.1.1
###placa de redes ##
#the loopback network interface
auto lo
iface lo inet loopback
#configuracao de placa de rede externa
auto eth0
allow-hotplug eth0
iface eth0 inet static
address 192.168.1.114
netmask 255.255.255.0
network 192.168.1.0
gateway 192.168.1.255
broadcast 192.168.1.255
#### configuracao placa de rede Interna ####
auto eth1
allow-hotplug eth1
iface eth1 inet static
address 192.168.0.1
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
###### SCRIPT configuracao FIREWALL ####
#!/bin/bash
IF_EXTERNA=eth0
IF_INTERNA=eth1
NETADDR=192.168.0.0/24
flush_rules() {
#### LIBERAR ENCAMINHAMENTO #######
echo 0 > /proc/sys/net/ipv4/ip_forward
#### LIMPANDO AS REGRAS ####
iptables -F
iptables -t nat -F
iptables -t mangle -F
}
add_rules() {
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o $IF_EXTERNA -j MASQUERADE
iptables -t nat -A PREROUTING -i $IF_INTERNA -p tcp --dport 80 -j REDIRECT --to-port 3128
}
case "$1" in
start)
add_rules
;;
stop)
flush_rules
;;
restart)
flush_rules
echo ""
add_rules
;;
status)
iptables -L -n
echo ""
iptables -t nat -L -n
echo ""
iptables -t mangle -L -n
;;
*)
echo $"USAR: $0 { start | stop | restart | status }"
;;
esac
exit $?
# CONFIGURACAO SQUID ##
#-----------------------------------------------------------------------------
# >> Configuracoes gerais <<
#-----------------------------------------------------------------------------
# >> Porta padrao <<
http_port 3128 transparent
# >> Nome do servidor <<
pole-proxy
#-----------------------------------------------------------------------------
hierarchy_stoplist cgi-bin?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
cache_mem 128 MB
maximum_object_size_in_memory 100 KB
maximum_object_size 6144 KB
minimum_object_size 0 KB
ipcache_size 1024
ipcache_low 90
ipcache_high 95
cache_replacement_policy lru
memory_replacement_policy lru
logformat squid %ts.%03tu %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt
access_log /var/log/squid/access.log squid
cache_swap_low 90
cache_swap_high 95
cache_dir ufs /var/spool/squid 3000 16 256
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_swap_log /var/spool/squid/swap.log
cache_mgr email@dominio.com.br
error_directory /usr/share/squid/errors/Portuguese
coredump_dir /var/spool/squid
refresh_pattern ^ftp: 15 20% 2280
refresh_pattern ^gopher: 15 0% 2280
refresh_pattern . 15 20% 2280
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
# >> Inicio das ACLs <<
#-----------------------------------------------------------------------------
acl all src 192.168.0.0/255.255.255.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl SSL_ports port 443 563 # snews
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 407 # msn
acl Safe_ports port 25 # smtp
acl Safe_ports port 110 # pop
acl purge method PURGE
acl CONNECT method CONNECT
#-----------------------------------------------------------------------------
http_access aloow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSl_ports
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
# << Ativando as ACls PERSONALIZADAS >>
http_access allow localhost
http_access allow all
Bem pessoal essas sao as minhas configuracaoes, so foram feitos so essas configuracao depois de ter instalado o debian
o grande problema e que a rede local nao conectar a internet
PESSOAL O QUE SERAR E O QUE DEVE SER FEITO PARA RESOLVER O MEU PROBLEMINHA
LEmbrando que agradeco muito ajuda de todos abraco.....