Community discussions

MikroTik App
 
User avatar
JazzMaster
Member Candidate
Member Candidate
Topic Author
Posts: 115
Joined: Wed Jan 16, 2019 7:18 pm
Location: Evansville, Indiana , USA

Hacker attacks on CCR

Thu Apr 23, 2020 10:23 pm

Is there any simple method to stop attacks from other countries? This applies to CCR
 
Zacharias
Forum Guru
Forum Guru
Posts: 3459
Joined: Tue Dec 12, 2017 12:58 am
Location: Greece

Re: Hacker attacks on CCR

Thu Apr 23, 2020 10:29 pm

Can you be more specific ?
Under what type of attack are you?
 
pateutz
Frequent Visitor
Frequent Visitor
Posts: 55
Joined: Wed Jan 11, 2012 5:55 pm

Re: Hacker attacks on CCR

Thu Apr 23, 2020 11:06 pm

Hello,

you can add the following lines into a script which will create and address-list will all the IP address from Bulgaria ( just an example ) and based on that you can create a firewall rule to drop the connections from those ip's.

/tool fetch url=http://www.iwik.org/ipcountry/mikrotik/BG
/import file-name=BG

all the best,

Daniel
 
User avatar
JazzMaster
Member Candidate
Member Candidate
Topic Author
Posts: 115
Joined: Wed Jan 16, 2019 7:18 pm
Location: Evansville, Indiana , USA

Re: Hacker attacks on CCR

Thu Apr 23, 2020 11:50 pm

Hello,

you can add the following lines into a script which will create and address-list will all the IP address from Bulgaria ( just an example ) and based on that you can create a firewall rule to drop the connections from those ip's.

/tool fetch url=http://www.iwik.org/ipcountry/mikrotik/BG
/import file-name=BG

all the best,

Daniel
What about other countries?
 
User avatar
jspool
Member
Member
Posts: 469
Joined: Sun Oct 04, 2009 4:06 am
Location: Oregon

Re: Hacker attacks on CCR

Fri Apr 24, 2020 1:09 am

Is there any simple method to stop attacks from other countries? This applies to CCR
If you only allow trusted networks access to the CCR services with firewall filter input rules you don't have to block by country. Blocking by country has very minimal impact.

disable unused services in /ip services and then restrict what networks can access the ones you use.
/ip firewall address-list
add address=x.x.x.x comment="Management IP" list=Management_Networks

/ip firewall filter
add action=accept chain=input comment="Allow trusted networks access to ssh & winbox" dst-port=22,8291 protocol=tcp src-address-list=Management_Networks
 
User avatar
JazzMaster
Member Candidate
Member Candidate
Topic Author
Posts: 115
Joined: Wed Jan 16, 2019 7:18 pm
Location: Evansville, Indiana , USA

Re: Hacker attacks on CCR

Fri Apr 24, 2020 5:35 pm

Is there any simple method to stop attacks from other countries? This applies to CCR
If you only allow trusted networks access to the CCR services with firewall filter input rules you don't have to block by country. Blocking by country has very minimal impact.

disable unused services in /ip services and then restrict what networks can access the ones you use.
/ip firewall address-list
add address=x.x.x.x comment="Management IP" list=Management_Networks

/ip firewall filter
add action=accept chain=input comment="Allow trusted networks access to ssh & winbox" dst-port=22,8291 protocol=tcp src-address-list=Management_Networks
Thanks to all that have answered. I think this solution will work for us better than blocking specific countries.
 
User avatar
jvanhambelgium
Forum Veteran
Forum Veteran
Posts: 991
Joined: Thu Jul 14, 2016 9:29 pm
Location: Belgium

Re: Hacker attacks on CCR  [SOLVED]

Fri Apr 24, 2020 6:21 pm

Hello,

you can add the following lines into a script which will create and address-list will all the IP address from Bulgaria ( just an example ) and based on that you can create a firewall rule to drop the connections from those ip's.

/tool fetch url=http://www.iwik.org/ipcountry/mikrotik/BG
/import file-name=BG

all the best,

Daniel
What about other countries?
Simply change the request ?

http://www.iwik.org/ipcountry/mikrotik/CN will give you China ranges ,
US will give US-range, BE , NL , .... etc. us the various country-codes as listed here :

http://www.iwik.org/ipcountry/
 
creatin
Member Candidate
Member Candidate
Posts: 108
Joined: Sat Nov 23, 2019 2:59 am

Re: Hacker attacks on CCR

Tue Apr 28, 2020 12:49 pm

I disabled all the services on MTiK except Winbox access.
Winbox port changed to a random one, disabled all guest accounts and created new ones for admins, let's say it's difficult to guess username since it contains alphanumerics :)
 
MetUys
newbie
Posts: 32
Joined: Mon Mar 17, 2014 1:19 pm

Re: Hacker attacks on CCR

Wed Apr 29, 2020 8:52 am

Also make sure you limit who can access winbox (ip address access list, not just the user accounts created), leaving it exposed is not recommend in case there are any exploits against it (which there was within recent years)
All these items mentioned above are mentioned many times throughout this forum.
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 3300
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

Re: Hacker attacks on CCR

Wed Apr 29, 2020 9:48 am

If you need to administer your Router from Outside, use VPN

But if that is not an option, take care if you open WinBox on the outside IP.

1. Use a good and very strong username/password
2. Make sure routerOS is updated to latest version
3. Use access list to limit who can admin the router from outside
4. Do not use default port 8291, use another.
5. Use port knocking (search forum on how to do it)
6. Send all you logs to an external server (see my signature on how to use Splunk with Mikrotik RouterOS
7. Do think once again if you really need the Winbox port open from the outside.

Who is online

Users browsing this forum: No registered users and 96 guests