daniloqc
(usa Outra)
Enviado em 29/06/2017 - 01:09h
Regras:
iptables -t nat -A PREROUTING -d 192.168.10.10 -p tcp --dport 8097 -j DNAT --to 192.168.10.25:8097
iptables -t nat -A POSTROUTING -d 192.168.10.25 -p tcp --dport 8097 -j SNAT --to 192.168.10.10:8097
tcpdump:
Funcionando:
00:55:17.911834 IP static.192.168.10.25.datacenter1.com.br.sac > static.192.168.10.10.datacenter1.com.br.sac: Flags [.], ack 141930403, win 513, options [nop,nop,TS val 276606627 ecr 319818049], length 0
00:55:17.911907 IP static.192.168.10.10.datacenter1.com.br.sac > 192.168.10.103.53661: Flags [.], ack 141930403, win 513, options [nop,nop,TS val 276606627 ecr 319818049], length 0
00:55:18.342648 IP static.192.168.10.25.datacenter1.com.br.sac > static.192.168.10.10.datacenter1.com.br.sac: Flags [P.], seq 0:317, ack 1, win 513, options [nop,nop,TS val 276606670 ecr 319818049], length 317
00:55:18.342748 IP static.192.168.10.10.datacenter1.com.br.sac > 192.168.10.103.53661: Flags [P.], seq 0:317, ack 1, win 513, options [nop,nop,TS val 276606670 ecr 319818049], length 317
00:55:18.513837 IP 192.168.10.103.53661 > static.192.168.10.10.datacenter1.com.br.sac: Flags [.], ack 317, win 4094, options [nop,nop,TS val 319818864 ecr 276606670], length 0
00:55:18.513892 IP static.192.168.10.10.datacenter1.com.br.sac > static.192.168.10.25.datacenter1.com.br.sac: Flags [.], ack 317, win 4094, options [nop,nop,TS val 319818864 ecr 276606670], length 0
00:55:20.623736 IP 192.168.10.103.53661 > static.192.168.10.10.datacenter1.com.br.sac: Flags [P.], seq 1:293, ack 317, win 4096, options [nop,nop,TS val 319820966 ecr 276606670], length 292
Finalizou com a conexão que estava funcioando:
00:55:20.785031 IP 192.168.10.103.53661 > static.192.168.10.10.datacenter1.com.br.sac: Flags [.], ack 634, win 4086, options [nop,nop,TS val 319821069 ecr 276606899], length 0
00:55:20.785083 IP static.192.168.10.10.datacenter1.com.br.sac > static.192.168.10.25.datacenter1.com.br.sac: Flags [.], ack 634, win 4086, options [nop,nop,TS val 319821069 ecr 276606899], length 0
00:55:23.761965 IP 192.168.10.103.53661 > static.192.168.10.10.datacenter1.com.br.sac: Flags [F.], seq 293, ack 634, win 4096, options [nop,nop,TS val 319824095 ecr 276606899], length 0
00:55:23.762052 IP static.192.168.10.10.datacenter1.com.br.sac > static.192.168.10.25.datacenter1.com.br.sac: Flags [F.], seq 293, ack 634, win 4096, options [nop,nop,TS val 319824095 ecr 276606899], length 0
00:55:23.762487 IP static.192.168.10.25.datacenter1.com.br.sac > static.192.168.10.10.datacenter1.com.br.sac: Flags [F.], seq 634, ack 294, win 511, options [nop,nop,TS val 276607212 ecr 319824095], length 0
00:55:23.762553 IP static.192.168.10.10.datacenter1.com.br.sac > 192.168.10.103.53661: Flags [F.], seq 634, ack 294, win 511, options [nop,nop,TS val 276607212 ecr 319824095], length 0
Tentando uma nova conexão:
276607212], length 0
00:55:40.724197 IP 192.168.10.103.53662 > static.192.168.10.10.datacenter1.com.br.sac: Flags [S], seq 2442517890, win 65535, options [mss 1380,nop,wscale 5,nop,nop,TS val 319841036 ecr 0,sackOK,eol], length 0
00:55:41.725083 IP 192.168.10.103.53662 > static.192.168.10.10.datacenter1.com.br.sac: Flags [S], seq 2442517890, win 65535, options [mss 1380,nop,wscale 5,nop,nop,TS val 319842037 ecr 0,sackOK,eol], length 0