I moved my main router from another OS to MIkrotik this weekend, and had to revert back today. The reason was the may MT handles Firewall Filters and NAT.
I am a WISP and my network is Natted. All the IP addresses behind the main router are private. I use dst-nat to connect the Mail server to the outside world. The outside world sees the outside IP address of my main router as my email server address. And, to keep off of the Spam lists (http://www.spamhaus.org), I have a couple of firewall settings that limit outgoing SMTP traffic to only my mail server. That way users infected with viruses will not be spewing SMTP traffic onto the internet (which wouild be seen from the outside as coming from my main router/Mail Server).
However, when I switched over to MT, the firewall filters would not work. I would setup the following firewall statements and it would not limit the outgoing SMTP traffic:
#This command allows outgoing SMTP traffic from my mail server
/ip firewall filter add chain=forward src=address=10.10.100.201 dst-port=25 protocol=tcp out-interface=wan action=allow
#This command drops outgoing SMTP traffic from everywhere else
/ip firewall filter add chain=forward dst-port=25 protocol=tcp out-interface=wan action=drop
When I would disable the first entry, mail would still go out from my mail server. Also, in the process, I got added to the Spam list. I am sure it was because the MT software was not filtering out other computer’s SMTP traffic.
The deny entry seemed to work if I did not specify the interface, but that stops incoming SMTP traffic, which I don’t want.
I worked on this for hours, and then ran across the following note in the manual:
Page 395, under “Property Description” subtopic under the “NAT” topic, it says: “Because the NAT rules are applied first, it is important to hold this in mind when setting up firewall rules, since the original packets might be already modified by the NAT.”
I tried other things like Mange statements tied to firewall statements. But nothing seemed to be able to shutoff the traffic properly.
So, it appears that I cannot duplicate in MT what I am doing with the other OS. Am I missing something?