ehs171
(usa Ubuntu)
Enviado em 18/11/2009 - 10:15h
Boa tarde pessoal Consegui resolver o problema instalando o bind, e efetuando as cópias de seus arquivos de exemplox para /etc e /etc/bind
e editando o arquivo /etc/named.conf, com o conteudo abaixo:
// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
// structure of BIND configuration files in Debian, *BEFORE* you customize
// this configuration file.
//
// If you are just adding zones, please do that in /etc/bind/named.conf.local
include "/etc/bind/named.conf.options";
// prime the server with knowledge of the root servers
zone "." {
type hint;
file "/etc/bind/db.root";
};
// be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912
zone "localhost" {
type master;
file "/etc/bind/db.local";
};
zone "127.in-addr.arpa" {
type master;
file "/etc/bind/db.127";
};
zone "0.in-addr.arpa" {
type master;
file "/etc/bind/db.0";
};
zone "255.in-addr.arpa" {
type master;
file "/etc/bind/db.255";
};
include "/etc/bind/named.conf.local";
e incluindo essas regras de iptables:
#!/bin/bash
# Inicio do Firewall
# Limpa as tabelas do firewall
iptables -F
iptables -t nat -F
iptables -t mangle -F
rede_interna="192.168.0.0/24"
echo "1" > /proc/sys/net/ipv4/ip_forward
echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_all
# Carrega modulos do iptables
/sbin/modprobe iptable_nat
/sbin/modprobe ip_tables
/sbin/modprobe ipt_state
/sbin/modprobe ip_conntrack
/sbin/modprobe ipt_multiport
/sbin/modprobe iptable_mangle
iptables -I PREROUTING -t nat -p tcp -s $rede_interna --dport 80 -j REDIRECT --to-port 3128
iptables -t nat -I POSTROUTING -s $rede_interna -j MASQUERADE
Agradeco a todos que tentaram de alguma maneira me ajudar valew.