Community discussions

MikroTik App
 
network99
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 90
Joined: Wed Nov 22, 2017 8:47 pm

how to limit ssh and telnet connection

Wed Nov 22, 2017 8:57 pm

I am in need of the Rule :

My users do not have connect to servers via telnet and ssh more than 5 connections in 1 minute !

that's mean :

192.168.88.2 ssh--> 53.75.51.x = allow
192.168.88.2 ssh--> 43.25.12.x = allow
192.168.88.2 ssh--> 38.12.88.x = allow
192.168.88.2 ssh--> 13.35.21.x = allow
192.168.88.2 ssh--> 73.15.11.x = allow
192.168.88.2 ssh--> 54.33.30.x = Deny !
192.168.88.2 ssh--> 44.23.10.x = Deny !
.
.
.

only 5 connections in 60 Second !
 
network99
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 90
Joined: Wed Nov 22, 2017 8:47 pm

Re: how to limit ssh and telnet connection

Fri Nov 24, 2017 4:59 pm

help me
 
User avatar
AlainCasault
Trainer
Trainer
Posts: 632
Joined: Fri Apr 30, 2010 3:25 pm
Location: Prévost, QC, Canada
Contact:

Re: how to limit ssh and telnet connection

Fri Nov 24, 2017 7:51 pm

help me
I'm afraid your need is unclear.


Sent from Tapatalk
 
stoser
Member Candidate
Member Candidate
Posts: 123
Joined: Sun Aug 21, 2016 12:04 am

Re: how to limit ssh and telnet connection

Fri Nov 24, 2017 9:15 pm

I think that you want to limit the amount of new SSL OR Telnet connections to a maximum of 5 new sessions every 60 seconds. Is this what you are asking?
 
User avatar
cdiedrich
Forum Veteran
Forum Veteran
Posts: 997
Joined: Thu Feb 13, 2014 2:03 pm
Location: Basel, Switzerland // Bremen, Germany
Contact:

Re: how to limit ssh and telnet connection

Fri Nov 24, 2017 11:23 pm

/ip firewall filter
add action=accept chain=forward connection-state=new dst-port=22,23 limit=5/1m,5:packet protocol=tcp src-address=192.168.88.2
-Chris
 
network99
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 90
Joined: Wed Nov 22, 2017 8:47 pm

Re: how to limit ssh and telnet connection

Tue Nov 28, 2017 7:43 pm

stoser wrote:
I think that you want to limit the amount of new SSL OR Telnet connections to a maximum of 5 new sessions every 60 seconds. Is this what you are asking?


Well done :)

thats right !
 
network99
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 90
Joined: Wed Nov 22, 2017 8:47 pm

Re: how to limit ssh and telnet connection

Tue Nov 28, 2017 7:46 pm

stoser wrote:
I think that you want to limit the amount of new SSL OR Telnet connections to a maximum of 5 new sessions every 60 seconds. Is this what you are asking?


Well done :)
that's right


cdiedrich wrote:
/ip firewall filter
add action=accept chain=forward connection-state=new dst-port=22,23 limit=5/1m,5:packet protocol=tcp src-address=192.168.88.2

-Chris


i try it
thanks and best regards

Who is online

Users browsing this forum: No registered users and 178 guests