-
-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configuring SNMP on pfsense #718
Comments
Hi @iptvcld , You can already adjust the scan window to be e.g. every minute via Settings. If taht's insufficient, you can try is to create a custom plugin to continuously scan in a separate thread and the results would be then processed in given intervals. This way you would never miss a device. Disconnections may still be missed (if a device disconnects and reconnects, let's say within a minute), but I think discovering of new devices is more important. If you are happy to help out, I can try incorporating continuous scanning, why you try to create a pfsense plugin, if you have some time. Here is a walkthrough of creating a custom plugin: |
Actually - I just realized SNMP is supported on pfsense, so you can try the SNMP plugin if it already works. If yes, and the 1 minute interval is still too long, I can try to incorporate continuous background scanning. Let me know how you go. |
Thanks for the reply. I can try snmp but I think continuously scanning may get in the way of pfsense internal scans that occur. But I am not sure what pfsense sends for snmp dhcp responses because let’s say I have the scan at 5 mins can this tool check past connections and then just alert on any new connects. I don’t need instant but just something that tells me some device connected and it may be not be online but I have a record of it |
This then depends on what information is available via SNMP. If past entries are, then yes 👍 |
And will this tool know how to read the Mac and IP and format the notification? |
yes :) |
I just enabled SNMP on pfsense and then enabled the option on netalertX and updated the iP to my router - but no devices are being found 22:09:22 [2024-07-01 22:09:22-04:00] START Run: SNMPDSC 22:09:22 [SNMPDSC] Entries found: 0 |
Hi! I think this is not an issue with NetAlertX, but with the command or agent configuration. This is what I got out of ChatGPT: The "No Such Object available on this agent at this OID" error in SNMP usually means that the specific OID (Object Identifier) you are querying does not exist or is not available on the SNMP agent you are querying. Here are a few steps to troubleshoot this issue:
Here is an example of querying an SNMP agent with snmpget: sh snmpget -v2c -c public 192.168.1.1 .1.3.6.1.2.1.1.1.0 Replace public with your community string, 192.168.1.1 with the IP address of your SNMP agent, and .1.3.6.1.2.1.1.1.0 with your target OID. |
Here is the chat history if you'd like to follow up: https://chatgpt.com/share/4f43da10-f66e-40f8-a10d-50b245b9f12d |
Thanks; i have enabled it pfsense correct and on netalertX - i have enabled SNMP, updated the IP for the walk and ran the scan - but nothing. Maybe something to do with auth to pfsense, there are no fields for the username and password |
you can also ssh into the container or any terminal and try if your command works - I regrettably don't have pfsense running, but try to troubleshoot with that chatgpt instance and if you get the command running in the terminal, you should be able to use it in netalertx |
ok, i will have a chat with GPT - this is the result using terminal |
as per the docs, the expected output should look something like this for NAX to ingest it properly: Expected output (ingestion) in format:
|
ok so this snmpwalk -v2c -c public 192.168.2.80 1.3.6.1.2.1.4.22.1.2 returned IP-MIB::ipNetToMediaPhysAddress.15.192.168.2.2 = STRING: 48:b0:2d:32:a4:4a i added this command into the SNMP scan in netalert but after the run, no devices get added |
Taht's not a format NAX understands, as mentioned earlier, the only supported format for SNMP outputs is this one:
PLease use the appropriate parameters to format your output according to the docs: sh snmpwalk -v2c -c public -OXsq 192.168.1.1 .1.3.6.1.2.1.3.1.1.2
|
When i run that command seems like does not work on pfsense, so net alert needs this exact layout? |
pfsense shoulw work if you supply the correct command. Here is a past issue where another user uses the same plugin with pfsense: #258 |
ahh soo odd.. snmpwalk -v 2c -c public -OXsq 192.168.2.1 .1.3.6.1.2.1.4.22.1.2 |
The key part you have to figure out is the OID. I don't think you have the correct OID Understand the OID Structure:
Break Down the OID .1.3.6.1.2.1.4.22.1:
Consult SNMP MIB Documentation:
Please check this article for details: https://www.comparitech.com/net-admin/snmpwalk-examples-windows-linux/ |
I made the SNMP plugin accept also Please have a look at the Make sure you refresh your browser cache - and click the 🔄 refresh button in the top right corner. It would be great if you could test this (backup everything first or use a new container) on your end by switching to the above image and letting me know if the issue was resolved/the new feature is working. Thanks in advance, |
Wow you’re amazing! I had to leave town for work and will be back tomorrow evening to test this out. Can’t wait! Thank you. |
Hey @jokob-sk just changed docker to -dev and added
via console this is my output (Sample)
|
Thanks for checking. I just pushed a fix to the -dev image. It should be available in about 15 minutes. Please check if the issue was fixed. |
Works like a charm! Thank you, I can see the snmpwalk listing all the connections and then the lookup grabs the names of the devices (for most). I added a new device to my network and ran the snmp scan again, it picked up the new device! When do you think this will be promoted to Prod? I will then start working on my setup and get telegram going as well! Thanks again.. |
thanks for checking @iptvcld ! I might publish the prod image this weekend or next week. 🤞 |
Thanks again, looking forward to it.. |
Releasing -> closing |
Is there an existing issue for this?
Am I willing to test this? 🧪
netlertx-dev
image when requested within 48h and report bugs to help deliver a great user experience for everyone and not to break existing installations.Can I help implement this? 👩💻👨💻
Is your feature request related to a problem? Please describe
If a device connects and then disconnects then we won’t be alerted of the scan does not occur
Describe the solution you'd like
Real time scan maybe look at dhcp logs of pfsense
Describe alternatives you've considered
Warpath
Anything else?
No
The text was updated successfully, but these errors were encountered: