Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [filter]

Usually related with text filtering of some kind, like logs. This may also refer to email filtering. Note that there are other tags that are more appropriate for network and spam filtering.

Filter by
Sorted by
Tagged with
21 votes
3 answers
4k views

What is the difference between 0.0.0.0/0 and 0.0.0.0/1?

In the history, I mostly used 0.0.0.0/0 for "match every IP address". Recently, I saw a 0.0.0.0/1 subnet filter. What is the difference between 0.0.0.0/0 and 0.0.0.0/1 and what's the ...
user avatar
  • 321
1 vote
2 answers
21 views

what ansible filter can I use on hostvars to extract string

"{{ hostvars['DUMMY_HOST']['iosengineID'] }}" value returns is this {'msg': [['80000009045B575A5032333331303055565D']], 'failed': False, 'changed': False} Which filter can I use extract ...
user avatar
  • 11
1 vote
1 answer
44 views

Could someone please explain the difference between these expressions

drop proto tcp and not (dst port 80) pass proto tcp and dst port 80 Is there a difference between them?
user avatar
0 votes
0 answers
83 views

CUPS "filter failed" with Kyocera FS-1325MFP

I have a laser printer (Kyocera FS-1325MFP). I want to use it with Cups and my Raspberry Pi. I get the error message ""filter failed"" when I try to print the test page. The ...
user avatar
0 votes
0 answers
73 views

Individual and global spam filter using Dovecot/rspamd

I'm runnig email server using Postfix, Dovecot, RoundCube and rspamd on Debian 11. Like everyone I have to deal with spam, but I got high demands for that. Currently my rspamd is checking every ...
user avatar
  • 1
2 votes
2 answers
75 views

rsync all pdfs except in certain directories?

I'm trying hard to understand the rsync filter system, and it's completely baffling me. I have the following "test" directory structure to try to make sense of it. With no filter options ...
user avatar
0 votes
1 answer
321 views

Create own filter for fail2ban fails

I'm playing around with fail2ban in kubernetes. For that I created a pod that creates fake log messages: 2021-08-04 18:33:13 Authentication failed 15.15.15.15 I created a custom filter, to test if ...
user avatar
  • 101
0 votes
3 answers
84 views

Tag External Emails from NEW external addresses

We work with a giant company that prepends an email tag to every externally originating (to them) email that goes something like: "Warning, this email originated outside your organization - don't ...
user avatar
0 votes
0 answers
48 views

Openldap / Filter & dn.regex

I would like to know if it is possible to configure openldap to use both filters and regex on the DN. {1}to dn.regex="ou=gBook,ou=(c[0-9]+),dc=test,dc=net$" by dn.regex="uid=([^,]+),ou=...
user avatar
1 vote
0 answers
50 views

LVM filter does not stop when rule matches?

I have a problem with a lvm filter configuration. I want to filter out certain devices/partitions from lvm scan. I can do it by making filter like so: filter = ["a|/dev/disk/by-partuuid/<uuid&...
user avatar
  • 121
1 vote
0 answers
81 views

How to replace multiple letters in an variable in Sieve?

I want to use my catch-all-email to put emails in their corresponding folders. So if I were to sign up for twitter I'd use twitter@example.com. Currently I have this script: if address :matches ["...
user avatar
0 votes
1 answer
58 views

Compare url link and url text in email body and reject as SPAM

Email body: ... <a href="url">text</a> ... Is it possible check if text is url in email body, then compare url and text and reject as SPAM if they differ?
user avatar
0 votes
1 answer
335 views

rsyslog single filter conditional syntax

I'm looking for a way to write a single rule with multiple match values, don't write those rows to logfile if the message contain first word or second word. This works but isn't DRY: if $msg contains &...
user avatar
1 vote
1 answer
494 views

Fail2ban how to configure custom fail regex filter

I am running fail2ban on Debian 9 and am trying to create a custom filter to ban an ip after 4 failed attempts. Can someone help to figure out what I need to put in filter.d and jail.conf in order ...
user avatar
0 votes
1 answer
211 views

Allow certain users to only send emails to specific domains

I have an email server with several domain and users. I need block certain users from sending emails, but allow them to email specific domains. Example: user@domain.com block all outgoing emails ...
user avatar
0 votes
1 answer
52 views

Postfix: processing incoming mail for virtual user

This discussion on Dovecot ML suggests to use for filtering mail for foo user foo: | /path/to/the/external/program in /etc/aliases. But aliases work only for local user. How to filter with script mail ...
user avatar
  • 282
0 votes
1 answer
445 views

Powershell Select-String on a File Adds Unwanted Metadata

I'm trying to filter out service accounts in a file containing user accounts, one per line: "svc.test" "test.user" "test.user2" Select-String adds unwanted metadata: C:\...
user avatar
0 votes
1 answer
34 views

Spam filtering based on average ascii score

I'm trying to come up with a new spam filter based on what has been coming through our filter lately. A lot of the messages have subject lines like: "Re: ᴢᴀɴᴛᴀᴄ 【ʜᴀs】 ʙᴇᴇɴ ʟɪɴᴋᴇᴅ 【ᴛo】 ᴄᴀɴᴄᴇʀ&...
user avatar
2 votes
0 answers
562 views

Using tc to delay packets to several ports

After reading several pages like this this and without having a really deep knowledge about the kernel Linux, I am able to filter up to 3 ports using just the three first leaves of the tree. tc qdisc ...
user avatar
2 votes
0 answers
380 views

TC Filter With BPF and NFTables Packet Marking

I made a TC BPF ingress program and I want it to process specific packets only marked by NFTables. Here's my NFTables table that marks the specific packets: table ip compressor_tc { chain ...
user avatar
0 votes
2 answers
1k views

How to write a complex filter in tomcat web.xml to accept partially a URL?

I am new to tomcat and I need to filter the URLs on a server to accept all clients for some URLs and accept only a specific IP for other URLs. In details, I want to accept ALL clients for for this ...
user avatar
0 votes
0 answers
111 views

how to apply TC htb class to each of IPs in an IP range separately?

I use HTB for TC and mark packets with iptables. First I mark a range of IPs (like 192.168.1.0/24). Now I want to apply a htb class to each of these IPs separately. If I add a class and a filter for ...
user avatar
0 votes
1 answer
103 views

How to filter by status information column in Thruk

I am using Thruk as a monitoring interface. At the top left corner of the page there is a button which opens a stack with filters of which hosts/services etc. you want to apply. You can easily add ...
user avatar
  • 266
0 votes
1 answer
3k views

Microsoft AD - Negative OU= LDAP filter

I am trying to produce a LDAP Filter for MS AD which filters users based on some OUs (in my case excluding a specific OU but also including does not work): (&(cn=Testuser1)(|(ou:dn:=Included1)(ou:...
user avatar
  • 835
1 vote
1 answer
362 views

Spamassasin rule to flag certain MX IPs

I've noticed a flood of spam that is related to the same range of IPs. All the spam email has different HTML text (which is english but meaningless) and a few embedded pictures (which I block) but ...
user avatar
  • 348
0 votes
1 answer
102 views

Filter ss process output without using grep

ss -p can give the process name, process id (PID) and the file descriptor associated with the connection. Example: ss -tuanp [...] tcp ESTAB 0 0 x.x.x.x:59594 x.x.x.x:993 users:(("...
user avatar
  • 285
0 votes
1 answer
1k views

Not logic in docker filter

I have a named container that may or may not be up and if it is up I want to be able to kill all the containers but that one by name. Basically what I want is: docker kill $(docker ps -aq --filter="...
user avatar
0 votes
0 answers
35 views

Why can't block specified string with iptables command?

I want to block any packages flow into my pc which contains the string porn. iptables -A INPUT -m string --algo bm --string "porn" -j DROP Open my firefox and iniput keyword porn in google search ...
user avatar
  • 317
0 votes
1 answer
99 views

tc filter ... ht HANDLE ... does not allow buckets of 8 bits

TC-u32 man page states that HANDLE is: HANDLE := { u12_hex_htid:[**u8_hex_hash:[u12_hex_nodeid]** | 0xu32_hex_value } so the size of the bucket should range from 0x00 to 0xff as it is a u8 value. ...
user avatar
  • 11
0 votes
1 answer
113 views

How to configure postfix/dovecot setup to reject certain mail for certain users/accounts

I'd like to be able to reject email from certain users or if it contains certain strings or if the title matches something for certain users. I'm in a multidomain enviroment. Is this possible? ...
user avatar
0 votes
1 answer
299 views

exim filter not working on long emails

I was trying to set a file extension based filter in exim. if $message_body contains "pdf.gz" or $message_body contains "pdf.arj" This filter does work on small mail, such as mail with only test ...
user avatar
0 votes
1 answer
175 views

Is it possible to redirect DNS quries to different URL/DNS like opendns

I have an unbound DNS Resolver in my office lab. I m using this service to block ads and unwanted domains. Is there any possibilities to redirect DNS quires to a specific URL/DNS that shows the site/...
user avatar
1 vote
1 answer
1k views

How to debug Mikrotik bridge filter forward rules not having any effect?

As part of diagnosing a different problem were trying to add a bridge filter rule that will stop all traffic from forwarding between two interfaces on a bridge. The router has two interfaces ether1 ...
user avatar
0 votes
1 answer
172 views

fail2ban filter matches no lines for xmlrpc attack

I'm trying to jail hosts that brute-force attack a web server, thereby creating (hundreds of) lines in /var/log/apache2/error.log of the form [Fri Feb 01 11:17:56.158739 2019] [:error] [pid 15870] [...
user avatar
0 votes
1 answer
409 views

exim filter regex discard rule

We are trying to discard all emails with a matching subject, example of subject: Subject: DOMAIN.COM Alert: NAME We have NOT received your payment We are trying to match any domain, Alert, and "We ...
user avatar
  • 77
0 votes
1 answer
780 views

Apply Network Filter to Ovirt Guest without Rebooting

I am trying to change the clean-traffic IP address for a oVirt Guest VM. It works as long as I reboot the VM. ( Changed from within the Guest Virtual Machine Network Settings ) But for a production ...
user avatar
0 votes
1 answer
425 views

Exim filter - Matching FROM and TO

I have been receiving a lot of mailer-daemon spam lately ... It's obvious the spammer is spoofing the to & from fields so that mailer-daemon kicks in and delivers the actual message to me. I ...
user avatar
  • 1
0 votes
1 answer
287 views

fail2ban filter for common apache exploits

Every day I see hackers/script kiddies looking for url's like: /webdav /site.tar /admin /htdocs.php etc. They sometimes hit my sites for several minutes looking for common exploits. Is there a ...
user avatar
  • 1,604
0 votes
1 answer
983 views

Get mac address based on ip in filter wireshark

i am a test engineer writing some test cases. I am trying to write a test which has to be performed in wireshark. However, my collegues aren't that "into wireshark" and i would like to keep it as ...
user avatar
  • 101
0 votes
1 answer
316 views

Exim filter TLD block is blocking more than just the TLD

Need to discard emails to and from ending in a specific TLD but having an issue, example of a filter: if first_delivery and ("$h_to:, $h_cc:" contains ".win$") or ("$h_from:" contains ".win$") then ...
user avatar
  • 77
2 votes
1 answer
743 views

tc/netem filter explenation

Iam new to tc and i find it mighty confusing, i was able to find and bit understand little command flow, to issue delay on specific IP, but i dont tink it works properly - delaying all traffic ...
user avatar
  • 93
0 votes
1 answer
261 views

Filter log for a location but allow passing request to proxy

I know how to filter logs for a location: # inside a http block log_format filter '0.0.0.0 - $remote_user [$time_local] "$request"' '$status $body_bytes_sent ' '"$...
user avatar
  • 447
1 vote
1 answer
280 views

Filtering dpkg logs in syslog-ng

I am new to syslog-ng, and I am setting a syslog-ng, where I am receiving logs of syslog, auth.log and dpkg.log. Although I was able to get the logs for syslog and auth.log, but I am unable to write ...
user avatar
  • 121
1 vote
1 answer
51 views

Fold burst of many emails into one?

We are running an SGE job scheduling system. Users can let SGE send out emails in case of jobs being cancelled. In the case of a user having large array jobs (say 100'000k entries) and killing all of ...
user avatar
  • 111
3 votes
1 answer
472 views

Toggle postfix on and off

There's probably an answer to this already, but I just can't figure out how to search for it correctly. Situation: We have a failover situation for two nodes, using keepalived, passing a floating IP ...
user avatar
2 votes
2 answers
681 views

Powershell script - Find LogOn attribute - How from specific OU?

This is the PowerShell script I use to find the LogOn attribute from users in Active Directory. Now rather than getting all users I want it to search only in a specific OU. The domain looks like this: ...
user avatar
  • 21
1 vote
0 answers
418 views

Correct filtering of raw devices which are multipath components out of LVM

I have a HP MSA P2000 FC with dual controllers, dual HP SAN switches and a couple of servers with QLogic "ISP2532-based" 8G dual-port cards. Everything is connected "each to each" way. The OS is ...
user avatar
0 votes
1 answer
138 views

Filter pcap by subsecond detail?

I'm trying to export a subset of a pcap file given a start and an end message, this start and end message identification is currently done using ngrep on the raw data(because we have no dissector for ...
user avatar
  • 113
1 vote
2 answers
12k views

Squid proxy_protocol_access with dstdomain acl

I'm configuring a squid proxy to work as a sort of a gateway for traffic egress. The environment in which this is deployed has a client that makes a request through a load balancer which then sends it ...
user avatar
0 votes
2 answers
1k views

unable to filter badly-formatted messages in syslog-ng

I am contacting you regarding an issue I have with syslog-NG. some of our devices (mainly HP switches and SANs) are sending syslog messages that do not respect the syslog RFC 5424 it seems. to give ...
user avatar
  • 474