Simple Firewall To Mikrotik Router

firewall
The fire wall or fire wall is a software system that allows network traffic that is considered safe to get through and prevent network traffic that are considered unsafe. Generally, a wall of fire applied in a dedicated machine, which runs on a gateway (gateway) between the local network to the Internet network.

Wall-fire is used to restrict or control access to anyone who has access to a private network from outsiders. Nowadays, the term firewall into a common term that refers to a system that manages the communication between two different kinds of tissue. Given today many companies that have access to the Internet and also of course the network incorporated in it, then the protection of the company’s digital devices from attacks by hackers, Permata-eye, or other data thieves, become a reality.

The following is a scrip for mikrotik router :

/ip firewall filter
add action=drop chain=input comment=”drop ftp brute forcers” disabled=no dst-port=21,22,23 protocol=tcp src-address-list=ftp_blacklist
add action=accept chain=output content=”530 Login incorrect” disabled=no dst-limit=1/1m,9,dst-address/1m protocol=tcp
add action=add-dst-to-address-list address-list=ftp_blacklist address-list-timeout=3h chain=output content=”530 Login incorrect” disabled=no protocol=tcp
add action=drop chain=input comment=”drop ssh brute forcers” disabled=no dst-port=21,22,23 protocol=tcp src-address-list=ssh_blacklist
add action=add-src-to-address-list address-list=ssh_blacklist address-list-timeout=1w3d chain=input connection-state=new disabled=no dst-port=21,22,23 protocol=tcp src-address-list=ssh_stage3
add action=add-src-to-address-list address-list=ssh_stage3 address-list-timeout=1m chain=input connection-state=new disabled=no dst-port=21,22,23 protocol=tcp src-address-list=ssh_stage2
add action=add-src-to-address-list address-list=ssh_stage2 address-list-timeout=1m chain=input connection-state=new disabled=no dst-port=21,22,23 protocol=tcp src-address-list=ssh_stage1
add action=add-src-to-address-list address-list=ssh_stage1 address-list-timeout=1m chain=input connection-state=new disabled=no dst-port=21,22,23 protocol=tcp
add action=drop chain=forward comment=”drop ssh brute downstream” disabled=no dst-port=21,22,23 protocol=tcp src-address-list=ssh_blacklist

That’s a little tutorial mikrotik protect routers from attacks by hackers, thanks greeting us sigernetwork.