More oddness:
If I trace a flow using logging in the prerouting or post routing chain I see something like this:
Where 1.1.1.1 is the public client, 2.2.2.2 is the public facing address on the routeros host, and 3.3.3.3 is the private address I’m doing port address translation to:
Mar 30 12:26:32 prerouting: in:pub out:(none), proto TCP (ACK), 1.1.1.1:61424->2.2.2.2:443, NAT 1.1.1.1:61424->(2.2.2.2:443->3.3.3.3:443), len 40
Mar 30 12:26:32 postrouting: in:(none) out:priv, proto TCP (ACK), 1.1.1.1:61424->3.3.3.3:443, NAT 1.1.1.1:61424->(2.2.2.2:443->3.3.3.3:443), len 40
Mar 30 12:26:37 prerouting: in:pub out:(none), proto TCP (ACK), 1.1.1.1:61424->2.2.2.2:443, NAT 1.1.1.1:61424->(2.2.2.2:443->3.3.3.3:443), len 52
Mar 30 12:26:37 postrouting: in:(none) out:priv, proto TCP (ACK), 1.1.1.1:61424->3.3.3.3:443, NAT 1.1.1.1:61424->(2.2.2.2:443->3.3.3.3:443), len 52
Mar 30 12:27:15 prerouting: in:pub out:(none), proto TCP (ACK,FIN), 1.1.1.1:61424->2.2.2.2:443, len 40
Mar 30 12:27:15 input: in:pub out:(none), proto TCP (ACK,FIN), 1.1.1.1:61424->2.2.2.2:443, len 40
Mar 30 12:27:15 input: in:pub out:(none), proto TCP (ACK,FIN), 1.1.1.1:61424->2.2.2.2:443, len 40
Mar 30 12:27:16 prerouting: in:pub out:(none), proto TCP (ACK,FIN), 1.1.1.1:61424->2.2.2.2:443, len 40
Mar 30 12:27:16 input: in:pub out:(none), proto TCP (ACK,FIN), 1.1.1.1:61424->2.2.2.2:443, len 40
As you can see for a while we translated the packet just fine, and they hit the forward table, then suddenly we don’t translate anymore and the traffic hits the INPUT chain. Looks like the session is over because they are all flagged FIN, but my dst-nat rule doesn’t care about state:
/ip firewall nat
add action=dst-nat chain=dstnat dst-address=2.2.2.2 dst-port=443 protocol=tcp to-addresses=3.3.3.3
I’m wondering how this affecting my services… Any ideas?