PROXY TRANSPARENTE VIRTUAL PC [RESOLVIDO]

1. PROXY TRANSPARENTE VIRTUAL PC [RESOLVIDO]

Alexander Gustavo Parella
alexander.gustav

(usa Debian)

Enviado em 30/07/2014 - 19:53h

BOA NOTE GALERA DO VOL.

VENHO PEDIR A AJUDA DE VOCCÊS, TENHO O SERDIDOR DEBIAN SQUEEZE INSTALADO NO VIRTUAL PC E UMA ESTAÇÃO WINDOWS TABÉM INSTALADO NO VIRTUAL PC.

ETH1- PEGA IP AUTOMATICO DA ITERNET(DHCP)192.168.1.105
ETH2- DEFINI COMO ESTATICO 192.168.2.10

NO VIRTUAL PC CONFIGUREI 2 ADAPTADORES DE REDE
1 COMO NAT ETH1
2 COMO LOCAL ETH2

***********INTERFACE DE REDE *********

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth1
iface eth1 inet dhcp

auto eth2
iface eth0 inet static
address 192.168.2.10
netmask 255.255.255.0
broadcast 192.168.2.255
gateway 192.168.2.10


************** DCHP.CONF ************

shared-network eth2

{

# Este e o servidor autoritario, caso haja outro na rede

authoritative;

# Tempo padrao de emprestimo de ip

default-lease-time 28800;

# Tempo maximo para emprestimo de ip

max-lease-time 43200;

# Configuracao do gateway padrao

option routers 192.168.2.10;

# Configuracao do DNS

option domain-name-servers 192.168.2.10,201.6.2.89,201.6.2.179;

option domain-name "alexandergustavo.com";

subnet 192.168.2.0 netmask 255.255.255.0

{

# Faixas de ip disponivel

range 192.168.2.10 192.168.2.20;


}

}

************** SQUID.CONF **********************


http_port 3128 transparent

visible_hostname Alexander


cache_mem 64 MB

maximum_object_size_in_memory 256 KB

maximum_object_size 1024 MB

minimum_object_size 0 KB

cache_swap_low 90

cache_swap_high 95

cache_dir ufs /var/spool/squid 3000 16 256

cache_access_log /var/spool/squid/access.log

error_directory /usr/share/squid/errors/Portuguese

cache_mgr alexander.gustavo@terra.com.br

refresh_pattern ^ftp: 15 20% 2280

refresh_pattern ^gopher: 15 0% 2280

refresh_pattern . 15 20% 2280



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 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 901 #swat

acl purge method PURGE

acl CONNECT method CONNECT



http_access allow 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



acl web_bloquear url_regex -i "/etc/squid/web_bloquear"
http_access deny web_bloquear

acl bloque_downloads url_regex -i "/etc/squid/bloque_downloads"
http_access deny bloque_downloads

acl palavras url_regex "/etc/squid/palavras"
http_access deny palavras

acl redelocal src 192.168.1.1/255.255.255.255

http_access allow localhost

http_access allow redelocal

http_access allow all





******************* FIREWAAL.SH ********************


echo " Alterando Politica Padrao .................. [ OK ]"

modprobe iptable_nat

echo 1 > /proc/sys/net/ipv4/ip_forward


iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
iptables -t nat -A PREROUTING -i eth2 -p tcp --dport 80 -j DNAT --to 192.168.2.10 3128




ALGUÉM PODE ME AJUDAR POR FAVOR A ESTAÇÃO COM XP NÃO ENCHERGA O SERVIDOR DHCP DO LINUX DEBIAN.

AGUARDO UMA RESPOSTA DE VOÇÊS!!
ABÇ!!


DESCULPA AS LETRAS MAIUSCULAS !!!


  






Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts