luciano_ford
(usa Ubuntu)
Enviado em 20/05/2011 - 20:04h
Proxy transparent não funciona, por favor me ajudem.
GNU nano 2.0.7 Arquivo: rc.local
#!/bin/sh
#rc.local
modprobe ip_tables
modprobe iptable_nat
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 3128
REDIRECT --to-port 3128
iptables -t nat -A PREROUTING -s 192.168.0.0/255.255.255.0 -p tcp --dport 80 -j REDIRECT --to-port 3128
iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 0/0 -o eth0 -j MASQUERADE
route add -net 192.168.0.0 netmask 255.255.255.0 dev eth0
iptables -A INPUT -p tcp --destination-port 22 -j ACCEPT
iptables -A INPUT -p tcp --destination-port 1021 -j ACCEPT
iptables -A INPUT -p tcp --destination-port 1080 -j ACCEPT
iptables -A INPUT -p tcp --destination-port 3128 -j ACCEPT
iptables -A INPUT -p tcp --destination-port 10000 -j ACCEPT
iptables -A INPUT -p tcp --destination-port 5900 -j ACCEPT
iptables -A INPUT -p tcp --destination-port 80 -j ACCEPT
iptables -A INPUT -p tcp --syn -s 192.168.0.0/255.255.255.0 - j ACCEPT
iptables -A INPUT -p tcp --syn -j DROP
_______________________________________________________________________________
http_port 3128 transparent
visible_hostname Srvinternet
cache_mem 32 MB
maximum_object_size_in_memory 1024 KB
maximum_object_size 512 MB
minimum_object_size 0 KB
cache_swap_low 60
cache_swap_high 70
cache_dir aufs /var/spool/squid 400 16 256
cache_access_log /var/log/squid/access.log
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
acl AVG url_regex -i update.avg update1.avg update2.avg
http_access allow manager localhost
http_access deny manager
http_access deny purge
http_access allow AVG
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
acl redelocal src 192.168.0.100/24
acl redelocal2 src 192.168.1.101/24
http_access allow localhost
http_access allow redelocal
http_access allow redelocal2
http_access deny all