Community discussions

MikroTik App
 
lz1dsb
Member Candidate
Member Candidate
Topic Author
Posts: 226
Joined: Wed Aug 07, 2013 11:48 am

How filter output in /ip firewall connection print

Tue Aug 26, 2014 2:56 pm

I know that there's a way to filter the print output of a command and I use this regularly in the /ip route print output.
But why it doesn't work on /ip firewall nat?
For example when I try to filter out only the connections from a particular source address - it does not work, I've got empty output. I use
/ip firewall connection print where src-address=x.x.x.x
I've just got an empty output like:
Flags: S - seen reply, A - assured
# PROTOCOL SRC-ADDRESS DST-ADDRESS TCP-STATE TIMEOUT

Am I missing something?
 
User avatar
Kickoleg
Member Candidate
Member Candidate
Posts: 129
Joined: Tue Mar 11, 2014 3:13 pm
Location: Yverdon-les-Bains, Suisse

Re: How filter output in /ip firewall connection print

Tue Aug 26, 2014 6:09 pm

How you can use this : /ip route print output ??????
 
MrYan
Member Candidate
Member Candidate
Posts: 160
Joined: Sat Feb 27, 2010 6:13 pm

Re: How filter output in /ip firewall connection print

Tue Aug 26, 2014 6:11 pm

I know that there's a way to filter the print output of a command and I use this regularly in the /ip route print output.
But why it doesn't work on /ip firewall nat?
For example when I try to filter out only the connections from a particular source address - it does not work, I've got empty output. I use
/ip firewall connection print where src-address=x.x.x.x
I've just got an empty output like:
Flags: S - seen reply, A - assured
# PROTOCOL SRC-ADDRESS DST-ADDRESS TCP-STATE TIMEOUT

Am I missing something?
/ip firewall connection print where src-address ~"x.x.x.x:" should work.


Matt.
 
lz1dsb
Member Candidate
Member Candidate
Topic Author
Posts: 226
Joined: Wed Aug 07, 2013 11:48 am

Re: How filter output in /ip firewall connection print

Tue Aug 26, 2014 6:38 pm

I know that there's a way to filter the print output of a command and I use this regularly in the /ip route print output.
But why it doesn't work on /ip firewall nat?
For example when I try to filter out only the connections from a particular source address - it does not work, I've got empty output. I use
/ip firewall connection print where src-address=x.x.x.x
I've just got an empty output like:
Flags: S - seen reply, A - assured
# PROTOCOL SRC-ADDRESS DST-ADDRESS TCP-STATE TIMEOUT

Am I missing something?
/ip firewall connection print where src-address ~"x.x.x.x:" should work.


Matt.
Thank you Matt! Kudos for that.
Where can I find more info about the matching options? I'm also struggling with the ip route print output, as I have a full IP routing table and sometimes I need to filter based on AS Path attribute. I learned how I can do that filtering with dst-address and gateway, but still I need to filter even in greater details.
Also... filtering based on few matching patterns - is that possible? Can I also have different logical operators between the matching patterns?
 
User avatar
chechito
Forum Guru
Forum Guru
Posts: 3005
Joined: Sun Aug 24, 2014 3:14 am
Location: Bogota Colombia
Contact:

Re: How filter output in /ip firewall connection print

Fri Dec 08, 2017 11:44 pm

thx for the tip, very usefull
 
beamzer
just joined
Posts: 2
Joined: Sat Jan 21, 2017 9:54 pm

Re: How filter output in /ip firewall connection print

Sun Jul 22, 2018 12:02 pm

....
Where can I find more info about the matching options? I'm also struggling with the ip route print output, as I have a full IP routing table and sometimes I need to filter based on AS Path attribute. I learned how I can do that filtering with dst-address and gateway, but still I need to filter even in greater details.
Also... filtering based on few matching patterns - is that possible? Can I also have different logical operators between the matching patterns?
check out:
https://wiki.mikrotik.com/wiki/Manual:S ... _Operators

Ewald...

Who is online

Users browsing this forum: bananaboy1101, GoogleOther [Bot], raiser, teojurado and 85 guests