# They bruteforce me, how to blacklist ?

**URL:** <https://forum.mikrotik.com/t/they-bruteforce-me-how-to-blacklist/153389>\
**Category:** Beginner Basics\
**Created:** [November 16, 2021, 11:30am UTC](https://forum.mikrotik.com/t/they-bruteforce-me-how-to-blacklist/153389 "2021-11-16T11:30:46Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![YordanY1](https://forum.mikrotik.com/letter_avatar/yordany1/32/6_449c533f586939b6e5f246632a46421f.png) [@YordanY1](https://forum.mikrotik.com/u/YordanY1)\
**Post date:** [November 16, 2021, 11:30am UTC](https://forum.mikrotik.com/t/they-bruteforce-me-how-to-blacklist/153389/1 "2021-11-16T11:30:46Z")

</div>

Hello.  
I am having PPTP tunnel for my users, but seems like I got a lot of brute forces recently.  
How to add an IP to a blacklist after let say 3 sequential tries ?

---

<div class="post-metadata">

**Author:** ![Jotne](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/jotne/32/56097_2.png) [@Jotne](https://forum.mikrotik.com/u/Jotne)\
**Post date:** [November 16, 2021, 11:40am UTC](https://forum.mikrotik.com/t/they-bruteforce-me-how-to-blacklist/153389/2 "2021-11-16T11:40:16Z")

</div>

PPTP should be avoided. Not secure at all.  
Setup IPSec L2TP

Here is a script for IPSec L2TP  
[http://forum.mikrotik.com/t/black-list-for-failed-login-to-ipsec-vpn/130090/4](http://forum.mikrotik.com/t/black-list-for-failed-login-to-ipsec-vpn/130090/4)

---

<div class="post-metadata">

**Author:** ![YordanY1](https://forum.mikrotik.com/letter_avatar/yordany1/32/6_449c533f586939b6e5f246632a46421f.png) [@YordanY1](https://forum.mikrotik.com/u/YordanY1)\
**Post date:** [November 16, 2021, 3:30pm UTC](https://forum.mikrotik.com/t/they-bruteforce-me-how-to-blacklist/153389/3 "2021-11-16T15:30:20Z")

</div>

I wish to go with PPTP since it’s already used thing, and switching among the external users will be quite messy work.  
Is there a way to log and block the users which trying to enter with incorrect credentials ?  
or  
ignore logins which is outside some sort of whitelist if possible ?

---

<div class="post-metadata">

**Author:** ![holvoetn](https://forum.mikrotik.com/letter_avatar/holvoetn/32/6_449c533f586939b6e5f246632a46421f.png) [@holvoetn](https://forum.mikrotik.com/u/holvoetn)\
**Post date:** [November 16, 2021, 3:46pm UTC](https://forum.mikrotik.com/t/they-bruteforce-me-how-to-blacklist/153389/4 "2021-11-16T15:46:55Z")

</div>

Quick search, see this post for reference.  
[http://forum.mikrotik.com/t/implementing-a-blacklist/130806/1](http://forum.mikrotik.com/t/implementing-a-blacklist/130806/1)

Add the IP port being used for PPTP (TCP/1723 ?).  
Successful logins might also appear on that level 1 list but as long as they are successful, they should never hit level 2.  
Otherwise play with the timeouts etc.  
Be sure to test properly and make SURE you have a local escape path using another port so you do not lock yourself out when setting this up.

But I agree with jotne not to use PPTP anymore…  
We’re not using clay tablets anymore either, do we ?  
Look at it from another angle… why do you think you’re getting bruteforced using that port ? Because PPTP is “relatively” easy to crack, that’s why they try. Sooner or later someone will hit the magic section and then you’re so out of luck …

No need to change all at once. You can also do it gradually.

But sooner or later you will have to. Better now. Inconvenience is rarely a good reason to postpone.  
My view.

---

<div class="post-metadata">

**Author:** ![YordanY1](https://forum.mikrotik.com/letter_avatar/yordany1/32/6_449c533f586939b6e5f246632a46421f.png) [@YordanY1](https://forum.mikrotik.com/u/YordanY1)\
**Post date:** [November 16, 2021, 5:45pm UTC](https://forum.mikrotik.com/t/they-bruteforce-me-how-to-blacklist/153389/5 "2021-11-16T17:45:40Z")

</div>

Hmm.. how to change it gradually ?  
You mean that the two types of tunneling to co-exists for some time ? Wouldn’t be there any kind of issue ?

---

<div class="post-metadata">

**Author:** ![Jotne](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/jotne/32/56097_2.png) [@Jotne](https://forum.mikrotik.com/u/Jotne)\
**Post date:** [November 16, 2021, 9:57pm UTC](https://forum.mikrotik.com/t/they-bruteforce-me-how-to-blacklist/153389/6 "2021-11-16T21:57:09Z")

</div>

No problem to have different tunnel types.  
Setup IPSec/L2TP alongside with PPTP.  
Then move 1 by 1 over to the new secure solution.

---

<div class="post-metadata">

**Author:** ![joegoldman](https://forum.mikrotik.com/letter_avatar/joegoldman/32/6_449c533f586939b6e5f246632a46421f.png) [@joegoldman](https://forum.mikrotik.com/u/joegoldman)\
**Post date:** [November 17, 2021, 7:46am UTC](https://forum.mikrotik.com/t/they-bruteforce-me-how-to-blacklist/153389/7 "2021-11-17T07:46:48Z")

</div>

To answer the more real question - as the same problem exists for l2tp (my logs fill up all the time people trying to connect)

You can definitely put a whitelist on using an address-list for accepted clients, then only allow connections on TCP/1723 from src-address-list of that whitelist.

Or what I like to do is a bruteforce filter using the same concept as the [ssh one](https://wiki.mikrotik.com/wiki/Bruteforce_login_prevention) just changing the dst-port, or a newer way using connection rate limit option.
