xlinux
(usa Ubuntu)
Enviado em 27/09/2013 - 17:57h
boa tarde a todos,
Estou com a seguinte situação instalei um servidor Squid/Firewall, com duas placas de rede, eth0 recebendo internet do modem e eth1 que servira a rede.. mas percebo que não consigo distribuir a net da eth0 não está compartilhando a net com a eth1 como poderia proceder ???
obrigado.
já tenho configurado o seguintes serviços
Squid
http_port 3128 transparent
visible_hostname atenas
error_directory /usr/share/squid/errors/Portuguese
#--Tamanho do cache da RAM usado pelo squid
#cache_dir ufs /var/cache/squid 300 16 256
cache_access_log /var/log/squid/access.log
cache_swap_low 85
cache_swap_high 90
cache_mem 8 MB
maximum_object_size 4096 KB
maximum_object_size_in_memory 128 KB
#CONFIGURAÇÃO MÍNIMA##
acl manager proto cache_object
acl localnet src 127.0.0.1/255.255.255.255
acl to_localnet dst 127.0.0.0/8
acl all src 0.0.0.0/0.0.0.0
acl SSL_ports port 443 # https
acl SSL_ports port 563 # snews
acl SSL_ports port 873 # rsync
acl Safe_ports port 80 81 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 1443 1494 11090 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 1433 # sql
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 631 #
[*****]
acl Safe_ports port 5432
acl Safe_ports port 873 # rsync
acl Safe_ports port 901 # SWAT
acl purge method PURGE
acl CONNECT method CONNECT
##ACLS
acl sitesbloqueados url_regex -i "/etc/squid/bloqueados/bloqueados.txt"
#acl hora_manha time MTWHF 07:00-11:30
#acl hora_tarde time MTWHF 14:00-19:00
#acl hosts_macaddress arp "/etc/squid3/"
acl redelocal src 192.168.1.0/24
##Controle de acesso
http_access deny sitesbloqueados
http_access allow localnet
http_access allow localnet
http_access allow all
# Email do ADM Cache Squid
#cache_mgr webmaster usuario@dominio.com.br
Firewall
#!/bin/bash
iptables -F
iptables -X
iptables -t nat -F
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
echo 0 > /proc/sys/net/ipv4/conf/all/log_martians
echo 1 > /proc/sys/net/ipv4/ip_forward
echo 1 > /proc/sys/net/ipv4/tcp_syncookies
echo 1 > /proc/sys/net/ipv4/ip_dynaddr
modprobe iptable_nat
modprobe ip_conntrack
modprobe ip_conntrack_ftp
modprobe ip_tables
iptables -t nat -A PREROUTING -p tcp -s 192.168.1.0/24 --dport 80 -j REDIRECT --to-ports 3128
iptables -A FORWARD -t filter -j ACCEPT
iptables -A FORWARD -t filter -j ACCEPT -m state --state ESTABLISHED,RELATED
iptables -A FORWARD -s 0/0 -d 0/0 -j ACCEPT
iptables -t nat -A POSTROUTING -s 0/0 -d 0/0 -o eth+ -j MASQUERADE
chmod +x /etc/init.d/firewall
/etc/init.d/firewall.sh
DCHP SERVER
ddns-update-style none;
default-lease-time 600;
max-lease-time 7200;
authoritative;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.2 192.168.1.254;
option routers 192.168.1.2;
option domain-name-servers 8.8.8.8,8.8.4.4;
option broadcast-address 192.168.1.255;
}
Já fiz de tudo não sei onde estou errando!!!
Poderiam me ajudar por favor????