-
Benatto obrigado pela sua atenção, veja so
Ao iniciar o linux o serviço abaixo sobe também.
echo "Bloqueio do MSN Messenger para Toda Rede"
/sbin/iptables -A PREROUTING -t nat -s 192.168.0.0/24 -p tcp --dport 1863 -j DROP
/sbin/iptables -A PREROUTING -t nat -s 192.168.0.0/24 -p tcp --dport 7001 -j DROP
/sbin/iptables -A PREROUTING -t nat -s 192.168.0.0/24 -p tcp --dport 1857 -j DROP
/sbin/iptables -A PREROUTING -t nat -s 192.168.0.0/24 -p tcp --dport 554 -j DROP
/sbin/iptables -A PREROUTING -t nat -s 192.168.0.0/24 -p udp --dport 554 -j DROP
/sbin/iptables -A PREROUTING -t nat -s 192.168.0.0/24 -p udp --dport 4662 -j DROP
#iptables -t nat -I PREROUTING -p 47 -j DNAT --to 192.168.0.253
#iptables -t nat -I PREROUTING -p tcp --dport 1723 -j DNAT --to 192.168.0.253
#iptables -t nat -I PREROUTING -p udp --dport 1723 -j DNAT --to 192.168.0.253
# Redirecionamento Microsiga
iptables -t nat -A PREROUTING -s 0.0.0.0/0 -p tcp --dport 1909 -j DNAT --to-destination 192.168.0.11
iptables -A FORWARD -s 0.0.0.0/0 -p tcp --dport 1909 -d 192.168.0.11 -j ACCEPT
iptables -A FORWARD -d 0.0.0.0/0 -p tcp --sport 1909 -s 192.168.0.11 -j ACCEPT
iptables -t nat -A PREROUTING -s 0.0.0.0/0 -p tcp --dport 1024 -j DNAT --to-destination 192.168.0.10
iptables -A FORWARD -s 0.0.0.0/0 -p tcp --dport 1024 -d 192.168.0.10 -j ACCEPT
iptables -A FORWARD -d 0.0.0.0/0 -p tcp --sport 1024 -s 192.168.0.10 -j ACCEPT
iptables -t nat -A PREROUTING -p tcp --dport 3389 -j DNAT --to-destination 192.168.0.11
iptables -A FORWARD -p tcp --dport 3389 -d 192.168.0.11 -j ACCEPT
iptables -A FORWARD -p tcp --sport 3389 -s 192.168.0.11 -j ACCEPT
iptables -t nat -A PREROUTING -s 0.0.0.0/0 -p tcp --dport 2024 -j DNAT --to-destination 192.168.0.11
iptables -A FORWARD -s 0.0.0.0/0 -p tcp --dport 2024 -d 192.168.0.11 -j ACCEPT
iptables -A FORWARD -d 0.0.0.0/0 -p tcp --sport 2024 -s 192.168.0.11 -j ACCEPT
# Redirecionar 1433 para maquina final 10
iptables -t nat -A PREROUTING -d xxx.xx.xxx.xx -p tcp --dport 1433 -j DNAT --to 192.168.0.10:1433
iptables -t nat -A POSTROUTING -d 192.168.0.10 -p tcp --dport 1433 -j SNAT --to xxx.xx.xxx.xx
# Redirecionar 2024 para maquina final 11
iptables -t nat -A PREROUTING -d xxx.xx.xxx.xx -p udp --dport 2024 -j DNAT --to 192.168.0.11:2024
iptables -t nat -A POSTROUTING -d 192.168.0.11 -p udp --dport 2024 -j SNAT --to xxx.xx.xxx.xx
iptables -I INPUT -p tcp --dport 22 -j ACCEPT
iptables -I OUTPUT -p tcp --sport 22 -j ACCEPT
E se eu com o linux ja ativo dar um service firewall restart este serviço abaixo sobe mais os de cimas não.
# Redirecionamento FTP (criado hoje)
iptables -t nat -A PREROUTING -s 0.0.0.0/0 -p tcp --dport 21 -j DNAT --to-destination 192.168.0.253
iptables -A FORWARD -s 0.0.0.0/0 -p tcp --dport 21 -d 192.168.0.253 -j ACCEPT
iptables -A FORWARD -d 0.0.0.0/0 -p tcp --sport 21 -s 192.168.0.253 -j ACCEPT
# Redirecinar FTP para maquina final 253(Criado hoje)
iptables -t nat -A PREROUTING -d xxx.xx.xxx.xx -p udp --dport 21 -j DNAT --to 192.168.0.21:21
iptables -t nat -A POSTROUTING -d 192.168.0.253 -p udp --dport 21 -j SNAT --to xxx.xx.xxx.xx
Veja bem não sei se é o mais correto da forma que algumas pessoas prefere este squid ja estava pronto eu estou acrescentando o ftp
Peço ajuda de vcs mais experiente com este assunto.
Abraço a todos.
-
Perigoso,
Obrigado pelas correções na verdade dei apenas exemplos de regras para que ele primeiro tivesse noção de organização, mas ja que você fez uma critica construtiva fiz as devidas alterações.
Abração