I have Rb1100AH core router (pppoe concentrator) and enabled “Allow remote requests” in DNS…
router have static public IP adddress, customers dynamic public IP.
Is there reasonable cause to block DNS requests from outside world and if it is what is most effective solution for that?
I suppose firewall filter, is there any sample code for 100% block that on core router, and customers MT’s as well?
Blocking DNS requests that are not explicitly allowed is a good practice. It will keep your router’s DNS cache from filling up with unexpected queries and it will preserve your bandwidth for your customers instead of public entities.
Assuming your concentrator sits fully between your customers and the internet…
To block all external access to your concentrator DNS relay coming from ether1 add the following to the firewall (adjust ether1 as appropriate to your upstream ether port):
Then, to protect your customer MTs which may be publicly accessible and also running DHCP relay add the following to the concentrator (again adjust ether1 as appropriate to your upstream ether port):
The above will not prevent your customers from using any external publicly accessible DNS server outside your network. Unless you are prohibiting your customer s from access to certain sites and need to control DNS responses, there is no reason to block those tech-savvy customers from choosing their own upstream DNS servers. If you do want to maintain dictatorship control over DNS queries that your customers make, you would need the following rule added to capture and redirect all customer DNS queries to the local concentrator, regardless of DNS server settings on the client side:
Because the attacker doesn’t know that you have made such rules. Once it gets you stopped responding he will stop trying to abuse you. None new will be repeating it because they will just make a test on you and then they will search some other opened dns server.
Check it tomorrow. At least the dns server utilisation should be low immediately. Last two rules just prevent the inner devices to talk with other outer dns servers but they are not effective as they are below the general accepting rule for outbound traffic. It depends on you whether you want allow it or not.
I applied the above command but all my clients were unable to resolve thereafter, it only worked when i excluded the public name servers included my ip>dns setting. I am using my mikrotik as DNS server for my clients, is this a normal behavior? because i am not seeing the filter catching anything yet.
I want to block access to mikrotik DNS from outside, however once i apply the rule indicated above my local users (behind mikrotik) are unable to browse (i.e they are not able to resolve a name but can ping outside). So what am I doing wrong?
Those rules assume that ether1 is WAN. If your LAN clients got blocked by them, then it looks like you have things connected to different ports and you need to replace “ether1” by whatever your WAN interface is.
yes - before the first two rules of the input chain
You should probably replace the entire input chain with the following:
/ip firewall filter
add chain=input connection-state=established,related action=accept
add chain=input in-interface=LAN action=accept
add chain=input protocol=icmp action=accept
add chain=input action=drop
If you have multiple LAN segements, it might be easier to specify “in-interface=!WAN” for the second rule - and of course LAN and WAN should be replaced with the actual names of your LAN/WAN interface (whichever version of rule 2 you use).
Sorry - but what does this mean? WAN means the Internet interface (the one with the public IP address on it)
So - if you’re connecting to the Internet with pppoe, then the pppoe-out interface is the WAN interface (and not the physical port it runs through)
If you have only one WAN connection, it’s probably best to use “in-interface=!pppoe1-out” on that rule (or whatever the name of your pppoe connection is - not the actual interface)
Think of the logic: I want to accept anything that’s not coming from the internet - so any in-interface other than the WAN interface is acceptable, therefore the rule should accept connections on any interface that is not the WAN interface.