Hi,
I just discovered that invalid packets do not get srcnated, and so am trying to prevent these from leaking out on the WAN interface.
I found the connection NAT state option, which sounded exactly like what I needed. However, it doesn’t seem to work as expected. Namely, there seems to be some confusion as to whether packets are srcnated.
I created the following rule to verify:
/ip firewall filter add action=log chain=forward connection-nat-state=!srcnat out-interface=sfp-sfpplus1
This is logging lots of packages that to me looks srcnated.
10:49:25 firewall,info forward: in:vlan50 out:sfp-sfpplus1, src-mac 00:0c:29:61:2d:94, proto TCP (ACK), 192.168.50.15:5655->90.227.129.61:60968, NAT (192.168.50.15:5655->10.35.1.15:5655)->90.227.129.61:60968, len 41
10:49:25 firewall,info forward: in:vlan50 out:sfp-sfpplus1, src-mac 00:0c:29:61:2d:94, proto TCP (ACK), 192.168.50.15:5655->83.251.176.86:50581, NAT (192.168.50.15:5655->10.35.1.15:5655)->83.251.176.86:50581, len 41
10:49:25 firewall,info forward: in:vlan50 out:sfp-sfpplus1, src-mac 00:0c:29:61:2d:94, proto TCP (ACK,PSH), 192.168.50.15:5655->90.228.161.103:49221, NAT (192.168.50.15:5655->10.35.1.15:5655)->90.228.161.103:49221, len 48
10:49:25 firewall,info forward: in:vlan50 out:sfp-sfpplus1, src-mac 00:0c:29:61:2d:94, proto TCP (ACK,PSH), 192.168.50.15:5655->90.228.161.103:49221, NAT (192.168.50.15:5655->10.35.1.15:5655)->90.228.161.103:49221, len 144
10:49:25 firewall,info forward: in:vlan50 out:sfp-sfpplus1, src-mac 00:0c:29:61:2d:94, proto TCP (ACK,PSH), 192.168.50.15:5655->213.64.175.58:51932, NAT (192.168.50.15:5655->10.35.1.15:5655)->213.64.175.58:51932, len 48
10:49:25 firewall,info forward: in:vlan50 out:sfp-sfpplus1, src-mac 00:0c:29:61:2d:94, proto TCP (ACK,PSH), 192.168.50.15:5655->62.20.18.50:2143, NAT (192.168.50.15:5655->10.35.1.15:5655)->62.20.18.50:2143, len 48
10:49:25 firewall,info forward: in:vlan50 out:sfp-sfpplus1, src-mac 00:0c:29:cc:33:bf, proto TCP (SYN,ACK), 192.168.50.47:8080->81.94.168.190:46620, NAT (192.168.50.47:8080->10.35.1.15:8080)->81.94.168.190:46620, len 60
10:49:25 firewall,info forward: in:vlan50 out:sfp-sfpplus1, src-mac 00:0c:29:cc:33:bf, proto TCP (ACK), 192.168.50.47:8080->81.94.168.190:46620, NAT (192.168.50.47:8080->10.35.1.15:8080)->81.94.168.190:46620, len 52
10:49:25 firewall,info forward: in:vlan50 out:sfp-sfpplus1, src-mac 00:0c:29:cc:33:bf, proto TCP (ACK,PSH), 192.168.50.47:8080->81.94.168.190:46620, NAT (192.168.50.47:8080->10.35.1.15:8080)->81.94.168.190:46620, len 69
What is going on here?
I saw something in the wiki about only being able to read the state from the first package, but it was not entirely clear when that applied.