Hi,
Secondly since we are on topic. I want to know is it possible to log every connection attempt of users to anywhere on the internet in MikroTik? Regardless of whether it was failed/successful connection attempt? If it is possible then how can I do it?
Yes, it is possible.
You can configure firewall rules that log connections of the state "new".
You also can configure firewall rules that log conections that get dropped.
So you log the successful and the dropped connection attempts to the router's log. As there will be many log entries, it may be useful for you to use syslog to let your router log this messages to a syslog server in your network.
Regarding the stateful firewall, I am not sure why it is needed. Can you explain how is it unprotected device without a stateful firewall and what harm can be done to others on the internet? Sorry, but I am new into this, so will appreciate if you can explain it.
You already gave an example for this:
I have a MikroTik router on a Public IP acting as a DNS server as well. Now I am noticing the DNS server is being abused by people on the internet, as it is handling DNS requests for them as well.
This is a very bad thing, because someone can spoof his source address making your router's DNS answer the request to someone who has not requested anything. This is called "source address spoofing" which can be used to perform DOS / DDOS attacks. For the victim it will look like your IP is the attacker. It is not exactly you attacking the victim, but you made this possible for an attacker. It's like leaving the key plugged in your car and someone using it for a robbery.
Without firewall rules, anybody can access the management services of the router (api, winbox, www, ssh) and trying to bruteforce the accounts. Once someone gets access, he can use your device to source traffic from it, steal data from it, sniff traffic and so on. Even if you use strong passwords / ssh key, the attacker wastes (your) bandwidth and cpu cycles - this is also a harm.
This is only the obvious stuff, there might be other things that could be exploited over the network, and nobody knows about it (like a bug in an accessible network service.) With a properly configured firewall, you do not fix the bug, but you make it very unlikely that someone will be able to exploit that.
This type of thinking is not limited to firewall configs, IMHO it is a basic principle in IT. It does not cost you any money and just 10 minutes of yout time, so there is no excuse to not do it.
Conclusion: It is highly recommended to secure your device at least with some input rules (drop invalid, accept related, accept established, accept new from the desired sources and to the desired services, drop all the rest) to only allow access from the desired sources / interfaces. It will not affect the routing performance of the device but will you make sleep calmly.
Ape