Community discussions

MikroTik App
 
justa
just joined
Topic Author
Posts: 8
Joined: Tue Aug 10, 2010 9:48 pm

How to block an IP address

Wed Sep 15, 2010 1:20 pm

Hello,

It is while an IP is trying to access my Mikrotik but it fails and gives the following error:

l2tp,ppp,info <l2tp-0>: terminating... - peer refused to authenticate


this is the IP that annoys me: 86.57.120.156

I want to block this IP so that can I get rid of it, please help me how to block this IP and get rid of permanently.

Thanks,
justa
 
fewi
Forum Guru
Forum Guru
Posts: 7734
Joined: Tue Aug 11, 2009 3:19 am

Re: How to block an IP address

Wed Sep 15, 2010 3:54 pm

/ip firewall address-lists
add name=block-this address=86.57.120.156
/ip firewall filter
add chain=input src-address-list=block-this action=drop
Then add whoever you want to block to that address list.
 
justa
just joined
Topic Author
Posts: 8
Joined: Tue Aug 10, 2010 9:48 pm

Re: How to block an IP address

Wed Sep 15, 2010 10:42 pm

/ip firewall address-lists
add name=block-this address=86.57.120.156
/ip firewall filter
add chain=input src-address-list=block-this action=drop
Then add whoever you want to block to that address list.
 
justa
just joined
Topic Author
Posts: 8
Joined: Tue Aug 10, 2010 9:48 pm

Re: How to block an IP address

Wed Sep 15, 2010 10:46 pm

I followed your instruciton but it didnt work, I did as follows:

1 chain=input action=drop src-address-list=86.57.120.156

Am I doing something wrong?
 
fewi
Forum Guru
Forum Guru
Posts: 7734
Joined: Tue Aug 11, 2009 3:19 am

Re: How to block an IP address

Wed Sep 15, 2010 10:54 pm

/ip firewall address-lists
add name=block-this address=86.57.120.156
This creates an address-list named "block-this" that has one item on it: the IP address 86.57.120.156
/ip firewall filter
add chain=input src-address-list=block-this action=drop
This drops all traffic from addresses that are items on the "block-this" address list.

If you paste that in as is, you're blocking that IP address. The advantage of using an address list is that if you ever want to block a second, third, or more IP addresses, you just add them to the address list instead of having firewall rules that block just one single IP address.

http://wiki.mikrotik.com/wiki/Manual:IP ... dress_list
http://wiki.mikrotik.com/wiki/Manual:IP/Firewall/Filter

With your edit the rule you applied says "drop all traffic from IP addresses that are items on an address list named '86.57.120.156'". No such address list exists. If you wanted to have a firewall that directly refers to the IP address rather than using an address list:
/ip firewall input
add chain=input action=drop src-address=86.57.120.156
I prefer the address list approach because it scales better for the future.

Who is online

Users browsing this forum: Bing [Bot], drukpa, Kindis, mbethers and 107 guests