RouterBoard Mikrotik 751G-2HnD firmware 2.39 RouterOS 5.18.
Minecraft online game server Gamai.Ru.
100 Megabits upload/download channel.
Minecraft uses ports 25565 TCP/UDP.
Last router D-Link DIR-300 had this protection rules in configuration:
iptables -A INPUT -p tcp -m tcp --dport 25565 --tcp-flags FIN,SYN,RST,ACK SYN -m connlimit --connlimit-above 5 --connlimit-mask 32 -j DROP
iptables -A INPUT-p udp --dport 25565 -m connlimit --iplimit-above 15 -j REJECT
Please help convert this rules (or more effective) to Mikrotik. I have read official manual but dont’t want to risk. Mikrotik 751G-2HnD is my first Mikrotik router.
Thanks to all helpers.
I can give remote access to router.
These rules protect your ROUTER from many connections per second. There are some other ways to protect the router, but also your original rules did not protect your Minecraft server, only the router. If you want to prevent also multiple connections to Minecraft server, add the same set of rules again, but this time change from input to forward
These rules only protect against DOS (denial of service, multiple connections at once). There are many other rules you could add, depending on what you wish to be protected against.
Can you tell me anything about the previous attacks, I would be surprised if the cpu on the router can handle a large ddos attack,
I dont know personaly with mikrotik, i’ve just seen some tuff routers go splat in the past.
I would like to know wath is the NAT rule(s) I must do. I tried to add a rule : chain : dstnat, protocol : 6 (tcp), dst port : 25565, in interface : ether 1, action : dstnat, to address : my local pc address, to port : 25565. It did not works. I can’t connect to my server using my wan ip and the 25565 port. I’m little bit noob too and I would like some help please. Thanks.