Community discussions

MikroTik App
 
miroxy
just joined
Topic Author
Posts: 22
Joined: Tue Mar 22, 2005 12:02 am
Location: Serbia
Contact:

Remove all connections

Tue Jan 10, 2006 7:09 am

I have script to enable and disable p2p but connection is active. I tried something like this
:global a [/ip firewall  connection print count-only] \ :for i from 0 to $a do=[/ip firewall connection remove $i]
but got nothing
 
sten
Forum Veteran
Forum Veteran
Posts: 919
Joined: Tue Jun 01, 2004 12:10 pm

Re: Remove all connections

Tue Jan 10, 2006 12:00 pm

/ ip firewall connection {remove [find]}
or the slower but that doesnt fail when there are no connections
/ ip firewall connection {:foreach r in=[find] do={remove $r}}
 
miroxy
just joined
Topic Author
Posts: 22
Joined: Tue Mar 22, 2005 12:02 am
Location: Serbia
Contact:

Tue Jan 10, 2006 5:42 pm

there are connections nearly 6000 but ...
action failed (6)
... any idea? in winbox works fine just CTRL+A and remove but I need script for this job
 
sergeda
Frequent Visitor
Frequent Visitor
Posts: 78
Joined: Wed Sep 20, 2006 6:03 am

Re: Remove all connections

Thu Sep 25, 2008 1:47 pm

I have the same problem.
How to reset all connection in script. It seems must be simple task but I can't.
I tried / ip firewall connection {:foreach r in=[find tcp-state=established] do={remove $r}}
It simple does nothing. No errors, but no effect.
I tried / ip firewall connection {:put [find tcp-state=established]} to see if it works but it also produce nothing.
It seems that find doesn't find anything.
Can somebody help me with this?
 
sergeda
Frequent Visitor
Frequent Visitor
Posts: 78
Joined: Wed Sep 20, 2006 6:03 am

Re: Remove all connections

Fri Sep 26, 2008 9:30 am

I've found that removing connection failed not only from script. It also failed from winbox with error
ROS 3.14
Is this a bug?
You do not have the required permissions to view the files attached to this post.
 
sergeda
Frequent Visitor
Frequent Visitor
Posts: 78
Joined: Wed Sep 20, 2006 6:03 am

Re: Remove all connections

Sun Dec 14, 2008 12:03 pm

No one know?
The same thing on ROS 3.17.
I can't remove connection, the same error.
 
User avatar
balimore
Forum Veteran
Forum Veteran
Posts: 884
Joined: Mon Apr 10, 2006 3:38 am

Re: Remove all connections

Sun Dec 14, 2008 1:03 pm

----
hello frens,

yes, you can't remove when it connection still establised...:wink:
better you will set as you need on:
/ ip fire conn track
regards
Hasbullah.com
-----
 
sergeda
Frequent Visitor
Frequent Visitor
Posts: 78
Joined: Wed Sep 20, 2006 6:03 am

Re: Remove all connections

Mon Dec 15, 2008 9:35 am

Well.
I can't remove connection even if it is closed.
But I need to remove established connection to apply rule wich disables p2p.
I schedule disabling of p2p in firewall rule but established connections still dowloading.
How can help
/ ip fire conn track
in this situation?
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7044
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: Remove all connections

Mon Dec 15, 2008 9:42 am

disable/enable connection tracking.
 
sergeda
Frequent Visitor
Frequent Visitor
Posts: 78
Joined: Wed Sep 20, 2006 6:03 am

Re: Remove all connections

Mon Dec 15, 2008 9:52 am

disable/enable connection tracking
Wow, what a simple solution!
Thank you a lot.
 
User avatar
balimore
Forum Veteran
Forum Veteran
Posts: 884
Joined: Mon Apr 10, 2006 3:38 am

Re: Remove all connections

Mon Dec 15, 2008 12:41 pm

----
Hello again,

ye. . . . .that's old problem.
oh, i see that's problem p2p connection. i think 2 kinds will ignoring about it:

- by filter and action=drop or
- mangle it and put queue tree and will set to low speed by screen address

again, you can't remove established. offcourse but you can deacrease it speed.

regards . . . . . :wink:
Hasbullah.com
----
Well.
I can't remove connection even if it is closed.
But I need to remove established connection to apply rule wich disables p2p.
I schedule disabling of p2p in firewall rule but established connections still dowloading.
How can help
/ ip fire conn track
in this situation?

Who is online

Users browsing this forum: No registered users and 2 guests