Enviado em 21/12/2012 - 10:23h
Caros,
# Limpando o Cache
service squid3 stop
rm -rf /var/cache/squid3/*
cd /var/cache/
chown proxy /var/cache/squid3
chgrp proxy /var/cache/squid3
squid3 -z
service squid3 start
##############################################
# Compatilhando a Internet
##############################################
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
modprobe iptable_nat
iptables -A POSTROUTING -t nat -s 192.168.254.0/24 -o eth0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -A INPUT -p icmp --icmp-type echo-request -j DROP
echo 1 > /proc/sys/net/ipv4/conf/default/rp_filter
iptables -A INPUT -m state --state INVALID -j DROP
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -i eth1 -j ACCEPT
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -p tcp --syn -j DROP
echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_all
iptables -A FORWARD -p tcp --dport 80 -j ACCEPT
iptables -A FORWARD -p tcp --dport 8080 -j ACCEPT
iptables -A FORWARD -p tcp --dport 3389 -j ACCEPT
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 8080 -j REDIRECT --to-port 3128
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 3389 -j REDIRECT --to-port 3128
################## Redirecionamento ########################
# Terminal Service
iptables -A FORWARD -i eth0 -d 192.168.254.10 -p tcp --dport 3389 -j ACCEPT
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 3389 -j DNAT --to 192.168.254.10
#iptables -A FORWARD -i eth0 -p tcp --dport 3389 -j ACCEPT
#iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 3389 -j DNAT --to-destination 192.168.254.10:3389
#iptables -A POSTROUTING -t nat -s 192.168.254.10 -o eth0 -j MASQUERADE
#echo nameserver 192.168.254.200 > /etc/resolv.conf
echo nameserver 8.8.8.8 > /etc/resolv.conf
echo nameserver 8.8.4.4 >> /etc/resolv.conf
echo nameserver 200.165.132.155 >> /etc/resolv.conf
exit 0
Servidor de Backup com Ubuntu Server 24.04 LTS, RAID e Duplicati (Dell PowerEdge T420)
Visualizar câmeras IP ONVIF no Linux sem necessidade de instalar aplicativos
Atualizar Debian Online de uma Versão para outra
Proteja seu Linux Mint com o Timeshift: Restaure o sistema mesmo que ele não inicie!
Instalando Google Chrome no Debian 13
Alguém pode me recomendar um editor de textos? [RESOLVIDO] (4)
Erro no boot pen drive 4gb (1)
Ajude-me a criar uma lista de jogos retrô! (5)
meus dois pen drives não são mais reconhecidos pelo meu PC apos tentar... (1)