-
-
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
(name not found) #815
Comments
Hi @stanelie , NetAlertX is running in a container, so some additional steps might be needed to get the name discovery working. Please check the following docs: https://github.com/jokob-sk/NetAlertX/blob/main/docs/REVERSE_DNS.md If the issue is specifically related to Windows devices, try enabling |
I am unable to find the docker-compose.yml file on the system where I installed the NetAlertX docker container. Where is this file located? |
I found this helpful bug report with instructions on how to use the docker-compose-yml file for people unfamiliar with it, like me. However, I am running into an issue : I am using the line provided in the documentation : Thoughts? |
I fixed it using a distinct resolv.conf that I put in the config directory, instead of having the docker-compose.yml file point to my /etc/resolv.conf file, as per the documentation. My setup didn't like it. My current line in docker-compose.yml is |
Update :
I will come back here with results concerning the name resolution now that I have a correctly configured resolv.conf file. |
Well, |
Hi there, Can you please confirm that you have enabled the NBTSCAN and NSLOOKUP plugins? If yes, can you please enable debug and post your log? |
Both plugins are enabled. Which log do you require? Also, how do I send it to you? I'd rather not post the whole thing here, some info in there is sensitive. |
Hi @stanelie , Thanks for the logs! You can also send them to netalertx@gmail.com in future. It seems none of the name recognition plugins seem to return any results. Can you try to ssh into the container and run the following command? To ssh into a container run this command on the host (
This is how the result should look like: jokob@Synology-NAS:$ sudo docker exec -it netalertx /bin/bash
Password:
Synology-NAS:/# nslookup 192.168.1.58
58.1.168.192.in-addr.arpa name = ubuntu.localdomain.
Synology-NAS:/#
This is how the result should look like: Synology-NAS:/# nbtscan 192.168.1.121
Doing NBT name scan for addresses from 192.168.1.121
IP address NetBIOS Name Server User MAC address
------------------------------------------------------------------------------
192.168.1.121 DESKTOP-DIHOG0E <server> <unknown> <mac>
Synology-NAS:/# If results are empty then something might prevent these scans to be executed from teh container. Can you re-post your docker-compose file? Could you also please share your |
Hello.
I am getting answers from the local 127.0.0.53 address, not from the address I configured in my resolv.conf file.
Here is my resolv.conf :
What else can I do to make the container obey the resolv.conf file? |
Hey @stanelie , According to ChatGPT you can try the following: services:
netalertx:
container_name: netalertx
image: "jokobsk/netalertx:latest"
restart: unless-stopped
volumes:
- /home/netalertx/config:/app/config
- /home/netalertx/db:/app/db
- /home/netalertx/log:/app/front/log
- /home/netalertx/config/resolv.conf:/etc/resolv.conf
environment:
- TZ=America/Montreal
- PORT=80
network_mode: host
dns:
- 10.8.0.1
- 10.8.0.17 FYI you can remove this part as the container is running on host so port mapping is not required (maybe it could cause issues, but unlikely):
|
nslookup now works within the container. I will wait a bit to see if I get better results from the scans. Why is nbtscan not returning anything either? |
nbtscan only works on windows hosts - again, I'd recommend you to try step 3 from here in the container to confirm the command is working in the container environment in your setup: |
Sorry, I missed that 3rd step. |
Could you please post the result and the latest app.log?
…On Tue, 1 Oct 2024, 23:20 stanelie, ***@***.***> wrote:
Sorry, I missed that 3rd step.
nbtscan run from within the container does return the correct hostnames.
—
Reply to this email directly, view it on GitHub
<#815 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AW5URDCZCKWWKSWSXUVZOI3ZZKOQXAVCNFSM6AAAAABPDDX25SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBVHAYTENZZGM>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
File sent to your email address. Thanks! |
Hi @stanelie , Thanks for the file. The log file shows that the names are indeed not resolved. Can you please post the terminal log of when you perform the nbtscan in the container? Tehre might be afomatting issue preventing the parsing of the results. |
Hi.
|
Thanks for that, I checked the IPs in the previously provided app.log and these IPs are not in the log, which means that these hosts are probably already recognized and their names logged: 0 results for:
0 results for:
Can you give me other examples of running the nbtscan command in the container, where a result is returned, but NetAlertX has no name assigned to the device? Or, can you give me an example of an IP that had the name resolved in PiAlert but not in NetAlertX? If you find such an Synology-NAS:/# dig +short -x 192.168.1.121
DESKTOP-DIHOG0E.localdomain.
Synology-NAS:/# nbtscan 192.168.1.121
Doing NBT name scan for addresses from 192.168.1.121
IP address NetBIOS Name Server User MAC address
------------------------------------------------------------------------------
192.168.1.121 DESKTOP-DIHOG0E <server> <unknown> 2c:f0:5d:9e:73:2c
Synology-NAS:/# nslookup 192.168.1.121
121.1.168.192.in-addr.arpa name = DESKTOP-DIHOG0E.localdomain. You can also try increasing the Pholus plugin timeout ( 19:09:02 [Plugins] Convert to Base64: False
19:09:02 [Plugins] Timeout: 300
19:09:02 [Plugin utils] Pre-Resolved CMD: python3/app/front/plugins/pholus_scan/script.pyuserSubnets={subnets}timeoutSec={timeout}
19:09:02 [Plugins] Executing: python3 /app/front/plugins/pholus_scan/script.py userSubnets={subnets} timeoutSec={timeout}
19:09:02 [Plugins] Resolved : ['python3', '/app/front/plugins/pholus_scan/script.py', "userSubnets=b'MTAuOC4wLjAvMjMgLS1pbnRlcmZhY2U9ZW5zMTYw'", 'timeoutSec=300']
19:09:03 [MAIN] Setting up ...
19:09:03 [conf.tz] Setting up ...
19:09:03
<-🔴 Restart occurred here, but no exception logged
19:09:03 The backend restarted (started). If this is unexpected check https://bit.ly/NetAlertX_debug for troubleshooting tips.
19:09:03
19:09:03 Permissions check (All should be True)
19:09:03 ------------------------------------------------
|
I think it works now, I deleted a windows device and it got re-detected as a new device, and the hostname was filled correctly. I will re-test with a non-windows device. |
I got one. This machine 10.8.1.251 has a correct hostname ("Chunking-Express-3") in pi.alert, but is in NetAlertX
|
Here is another one, correctly recognized on pi.alert as MacBook-Air-de-Virginie :
NetAlertX shows the NetBIOS name instead of the actual hostname. |
Hello, I can't explain how NetAlertX works here, but I can make a statement about the way Pi.Alert works. The name resolution takes place in 3 steps. If one step leads to a result, the other steps are omitted. 1st step mDNS |
mDNS is provided by the Bonjour protocol on Apple devices, correct? Since it comes first before Netbios, it explains why pi.alert gets the correct hostname and NetAlertX does not. Does NetAlertX scan for mDNS hostnames? |
@leiweibau thanks a lot for the help! @stanelie - can you try enabling the |
Hum. |
I deleted a mac from NetAlertX and it was re-discovered, but it still shows the NetBIOS name instead of the real hostname, with nmapdev enabled. |
hey @stanelie , can you try to pull the latest |
I switched the line to What is the correct way to switch to the netalertx-dev image? |
Ah! I am unfamiliar with Docker, sorry about that. |
You are doing great! There is some learning associated with docker, but it opens up a lot of possibilities 🙂 Let me know how the name discovery goes. Enable the plugin in LOADED_PLUGINS and adjust the settings where needed. |
Hello. |
@stanelie - thanks for the update and testing! :) |
released -> closing |
Possibly a user error, but I am running both pi.alert and NetAlertX on the same network to evaluate both, and I find I like the features of NetAlertX better, but the name recognition of pi.alert is better.
For example, a Windows device gets it's proper name in pi.alert, but I get (name not found) in NetAlertX, with the default scanning engine ON and Pholus.
What am I doing wrong?
The text was updated successfully, but these errors were encountered: