Community discussions

MikroTik App
 
User avatar
shadowskippie
Member Candidate
Member Candidate
Topic Author
Posts: 213
Joined: Tue Dec 21, 2010 6:20 pm

limiting connections

Thu May 24, 2012 9:34 am

I need a little help here
I want to implement this firewall rule
add chain=forward action=accept connection-state=new protocol=tcp connection-limit=!30,32 comment="Allow up to 30 connections" disabled=no
add chain=forward action=log connection-state=new protocol=tcp log-prefix="" comment="To see who is being dropped, we log first" disabled=no
but i don't want it to affect my backbone links, only the links coming in through my AP, the issue is i have my client connect to the tower via PPPoE and somehow i need the rule to only affect those PPP interfaces and nothing else

Edit:

Okay, i've tried this but i haven't fully activate it yet.
2 chain=forward action=accept protocol=tcp in-interface=backbone1

3 chain=forward action=accept protocol=tcp out-interface=backbone1

4 chain=forward action=accept protocol=tcp in-interface=backbone2

5 chain=forward action=accept protocol=tcp out-interface=backbone2

6 X ;;; Allow up to 30 connections
chain=forward action=accept connection-state=new protocol=tcp
connection-limit=!30,32
as far as i understand the backbone links will hit their respective rules and then stop but all the other links will go past those until they hit the connection rule and stop there.

Am i correct in this thinking
 
Devil
Member Candidate
Member Candidate
Posts: 170
Joined: Thu Jul 21, 2011 9:13 am

Re: limiting connections

Sat May 26, 2012 3:33 pm

Yes. with that configuration, only those tcp connections that their input or output interfaces are not backbone1 or backbone2, will reach rule number 6.
This will work assuming your pppoe users, are not connecting to the internet through backbone links.

Who is online

Users browsing this forum: jaclaz, oscar789, rozenkreuser, theseal and 23 guests