Skip to content
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

Is a kea.conf the only way to scan a network? #25

Open
jacobsalmela opened this issue Mar 31, 2022 · 3 comments
Open

Is a kea.conf the only way to scan a network? #25

jacobsalmela opened this issue Mar 31, 2022 · 3 comments

Comments

@jacobsalmela
Copy link

It seems like the options allow for ad-hoc scanning, but I haven't been able to get it to do so.

Are there any other places for documentation on setting up dora?

@nnuss
Copy link
Contributor

nnuss commented Apr 1, 2022

Ad-hoc scanning is, presently, only supported over subnets configured in kea.

This is due to:

  1. scanner.LoadSubnets(...) always reading the kea config
  2. subnets must be pre-populated in order match a (first) passed subnet argument when it isn't "all". And this only occurs when source == "kea" a few lines above.

It's possible to make a dora.yaml reference a skeletal kea config (kea-ad-hoc.conf) to allow, for example,dora scan 10.9.8.0/24 --config my-dora.yaml

$ fgrep kea_config /path/to/my-dora.yaml
  kea_config: /path/to/kea-ad-hoc.conf

$ cat /path/to/kea-ad-hoc.conf
{
  "Dhcp4": {
    "subnet4": [
      { 
        "subnet": "10.9.8.0/24",
        "option-data": [
          {
            "name": "domain-name",
            "data": "site.example.com
          }
        ]
      }
    ]     
  }       
}           

@jacobsalmela
Copy link
Author

Thank you. I will try this.

@jacobsalmela
Copy link
Author

It could be environmental, but I can't get it to return anything. Nor anything when I run collect.

Is this accurate:

#run the dora server
./dora --config dora-simple.yaml server
# scan the network
./dora --config dora-simple.yaml scan 10.254.1.0/16
# collect the data
./dora --config dora-simple.yaml collect

I also cloned the repo and tried to run it locally, but it fails with:

host:~/dora # go run main.go --config dora-simple.yaml scan 10.254.1.0/16
# github.com/bmc-toolbox/dora/web
web/server.go:67:3: undefined: routing.Gin

If I build it and run it, it doesn't complain.

I'm attempting to debug it. It seems to accept my network range to scan, but then just returns an empty slice for the return subnets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants