I've setup dnat on port 5900 (vnc) to an internal pc.
Sometimes I can't connect to it (of course sometimes I can).
If I look at connections on winbox (firewall->connections)
I can see the connection with TCP State established when I'am connected.
The times I can't connect, I see the TCP State: syn-received.
As I understand this happens when the syn-ack packet has been sent from
internal ip to external..., but the external ip does not respond (second
stage of three-way handshaking) (see packet flow->connection timeout in
mikrotik documentation).
Is this correct?
If I capture the traffic on both internal and external interfaces, I can
see the Syn going to internal pc. (so dnat is ok)
But the Syn,ack is only captured on Lan segment, but not in public segment!
Althought in Firewall->conections I can see the syn-received state, this packet never goes
out to public interface. (and this is the cause the connection isn't established).
I'm lost because don't know where this packet is lost (and remember, only sometimes).
Im starting to think that Routeros does not "undo" Dnat very well.
Note: I don't have any rule in postrouting mangle.
In Nat, I accept the Dnat traffic before doing snat. (the connection is marked on prerouting).
Oh, this happens with others mikrotiks with other ports (udp 500) with multiple clients
(vista, Xp), on dynamic public ip's.