Community discussions

MikroTik App
 
network99
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 53
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: 53
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: 631
Joined: Fri Apr 30, 2010 3:25 pm
Location: Laval, 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
___________________________
Alain Casault, Eng.
If I helped you, let me know!
 
stoser
Member Candidate
Member Candidate
Posts: 120
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: 985
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
Christopher Diedrich
MTCNA, MTCUME, MTCWE
Basel, Switzerland
Bremen, Germany

There are 10 types of people: Those who understand binary and those who don't.
There are two types of people: Those who can extrapolate from incomplete data
 
network99
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 53
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: 53
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: aesmith, antant, ashoka, Bing [Bot], cyon, flameproof, sindy, Znevna and 175 guests