shellrow / netscan

Cross-platform network scan library. Written in Rust.
MIT License
43 stars 7 forks source link

Netscan inside Docker #26

Open albertjimenez opened 2 months ago

albertjimenez commented 2 months ago

Intro

Hi there, this is the only library that it worked for me to do a system that performs a host discovery scanner and I am in the process of Dockerizing it. I sorted out the permissions and the scan works, the only thing is that I found that none of the Docker options are working towards scanning the host system through Docker, I may be asking too much but could you let me know if you tried with the library works or how to make it work in Docker?

Recreation steps

Notes

Thanks very much for this awesome project!

shellrow commented 2 months ago

First of all, thank you for your interest in my project, netscan! I’m glad to hear that it worked for your host discovery scanner system in your project.

Regarding your question, I haven’t tested netscan in a Docker environment yet. The environments I have tested so far are as follows:

If you are attempting to scan from within Docker, please try the following settings:

  1. Granting Permissions To properly execute the scan, try adding the CAP_NET_RAW and CAP_NET_ADMIN capabilities to the container
  2. Check Network Interfaces Verify that the host's network interfaces are accessible from within the Docker container, and adjust the interface specification if necessary.
  3. Packet Capture If possible, try performing a packet capture to verify whether the send/receive are functioning correctly on the specified network interface.

Currently, I am busy with work and personal commitments, but I plan to continue maintaining netscan, including updating dependencies in the near future.

If you notice anything else or have suggestions, please feel free to let me know.

albertjimenez commented 2 months ago

Thanks very much for the quick reply, I will be investigating and doing some research, if you bare with me for a few weeks, I'd like to have this issue open so I can add my findings and potentially create a proper PR to update the README.md if I get to a successful path. Thanks a million for this!