kil-linux
(usa Ubuntu)
Enviado em 20/07/2014 - 00:07h
boa noite turma, estou com a seguinte duvida, estou tentando fazer o acesso as cameras de segurança da empresa ( acesso externo ), sendo que consigo acessar pelo celular atraves das portas 34567 drv1 e 37778 dvr2, mas pelo navegar do note não atraves das portas 8080 e 8081, a conexção nem chega no firewall pelo navegador, segue as regras de acesso.
#!/bin/bash
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
#Carregando os Modulo
#########################################
modprobe ip_tables
modprobe iptable_nat
modprobe iptable_filter
modprobe iptable_mangle
#########################################
##Liberando Portas na rede Interna
#########################################
iptables -A INPUT -p tcp --dport 3128 -i eth1 -j ACCEPT #Proxy
iptables -A INPUT -p tcp --dport 80 -i eth1 -j ACCEPT #HTTP
iptables -A INPUT -p tcp --dport 21 -i eth1 -j ACCEPT #FTP
iptables -A INPUT -p tcp --dport 53 -i eth1 -j ACCEPT #DNS
iptables -A INPUT -p udp --dport 53 -i eth -j ACCEPT #DNS
iptables -A INPUT -p tcp --dport 25 -i eth -j ACCEPT #SMTP
iptables -A INPUT -p tcp --dport 110 -i eth1 -j ACCEPT #SSL
iptables -A INPUT -p udp --dport 110 -i eth1 -j ACCEPT #SSL
iptables -A INPUT -p udp --dport 22 -i eth1 -j ACCEPT #ssh
# DVR 1 SALA HARUKI
##########
iptables -A FORWARD -p tcp --sport 8080 -j ACCEPT
iptables -A FORWARD -p tcp --dport 8080 -j ACCEPT
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 8080 -j DNAT --to-destination 192.168.254.100:8080
iptables -t nat -A PREROUTING -i eth0 -p udp --dport 8080 -j DNAT --to-destination 192.168.254.100:8080
#
iptables -A FORWARD -p tcp --sport 34567 -j ACCEPT
iptables -A FORWARD -p tcp --dport 34567 -j ACCEPT
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 34567 -j DNAT --to-destination 192.168.254.100:34567
iptables -t nat -A PREROUTING -i eth0 -p udp --dport 34567 -j DNAT --to-destination 192.168.254.100:34567
########## DVR 2 SALA HARUKI
iptables -A FORWARD -p tcp --sport 8081 -j ACCEPT
iptables -A FORWARD -p tcp --dport 8081 -j ACCEPT
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 8081 -j DNAT --to-destination 192.168.254.101:8081
iptables -t nat -A PREROUTING -i eth0 -p udp --dport 8081 -j DNAT --to-destination 192.168.254.101:8081
#
iptables -A FORWARD -p tcp --sport 37778 -j ACCEPT
iptables -A FORWARD -p tcp --dport 37778 -j ACCEPT
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 37778 -j DNAT --to-destination 192.168.254.101:37778
iptables -t nat -A PREROUTING -i eth0 -p udp --dport 37778 -j DNAT --to-destination 192.168.254.101:37778
mas uma duvida: existe um limite de redirecionamento para fazer no iptables, ou posso fazer para várias maquinas.
conto com a ajuda de vcs.
fico no aguardo.