coleta
(usa Ubuntu)
Enviado em 01/02/2018 - 10:53h
executando o teste:
iptables -F
iptables -F -t filter
iptables -F -t nat
iptables -F -t mangle
iptables -X
iptables -X -t filter
iptables -X -t nat
iptables -X -t mangle
iptables -Z
iptables -Z -t filter
iptables -Z -t nat
iptables -Z -t mangle
iptables -t filter -P INPUT ACCEPT
iptables -t filter -P OUTPUT ACCEPT
iptables -t filter -P FORWARD ACCEPT
iptables -t nat -P PREROUTING ACCEPT
iptables -t nat -P OUTPUT ACCEPT
iptables -t nat -P POSTROUTING ACCEPT
iptables -t mangle -P PREROUTING ACCEPT
iptables -t mangle -P OUTPUT ACCEPT
iptables -t nat -A PREROUTING -i ppp0 -p tcp --dport 54666 -j DNAT --to 192.168.1.200:22 #computador sistema estoque
iptables -t nat -A PREROUTING -i ppp0 -p tcp --dport 22 -j DNAT --to 192.168.1.182:22 #meu computador
iptables -t nat -A PREROUTING -i ppp0 -p tcp --dport 80 -j DNAT --to 192.168.1.202 #camera
#comando: iptables -L -n -t filter
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
#comando:iptables -L -n -t nat
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
DNAT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:54666 to:192.168.1.200:22
DNAT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 to:192.168.1.182:22
DNAT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 to:192.168.1.202
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
#agora conectei um notebook em outro link que temos da net virtua com o nmap
#nmap <ip-externo > -p 54666
54666/tcp open unknown
#nmap <ip-externo > -p 80
80/tcp filtered unknown
Sera o switch, posso testar com um pc apenas ou trocar o swich