Dear Splunk Support,
I am encountering an issue while configuring Splunk to filter logs based on specific ports (21, 22, 23, 3389) using props.conf and transforms.conf. Despite following the proper configuration steps, the filtering is not working as expected. Below are the details:
Splunk Version: [9.3.2]
Deployment Type: Heavy Forwarder
Log Source: /opt/log/indexsource/*
[source::your_specific_source]
TRANSFORMS-filter_ports = allow_ports, drop_other_ports
The expected behavior is that logs containing these ports should be routed to indexQueue, but they are not being filtered as expected.
All logs are still being indexed in the default index.
Checked for syntax errors and restarted Splunk, but the issue persists.
Verified Regex: Confirmed that the regex .* (21|22|23|3389) .* correctly matches log lines using regex testing tools.
Checked Splunk Logs: Looked for errors in $SPLUNK_HOME/var/log/splunk/splunkd.log but found no related warnings.
Restarted Splunk: Restarted the service after configuration changes using splunk restart.
Checked Events in Splunk: Ran searches to confirm that logs with these ports were still being indexed.
Could you please advise on:
Whether there are any syntax issues in my configuration?
If additional debugging steps are needed?
Alternative methods to ensure only logs containing ports 21, 22, 23, and 3389 are routed correctly?
Your assistance in resolving this issue would be greatly appreciated.
Best regards,
Namchin Baranzad
Information Security Analyst
M Bank
Email: namchin.b@m-bank.mn
We are not Splunk Support - we're users like you.
To properly troubleshoot an issue using regular expressions, we need to see some sample (sanitized) data. Currently, I'm concerned that events with "22" in the timestamp will be sent to nullQueue.
The preferred way to specify the index for data is to put the index name in inputs.conf. If the index name is absent from inputs.conf, data will go to the default index.
Hi @Namchin_Bar
I am suprised you are getting any data at all because drop_other_ports being second in the list will run AFTER the allow_ports and would set nullQueue for everything. You should set this first in the list and then 'allow_ports' second.
As it is, you're getting all the data which makes me think that neither are actually being applied.
Is your source:: value in props.conf definitely correct?
Can you confirm if you are running these settings on a Universal or Heavy forwarder?
Is the data coming from another Splunk forwarder? Is this UF/HF?
🌟 Did this answer help you? Please help by:
Your feedback encourages the volunteers in this community to continue contributing