> For the complete documentation index, see [llms.txt](https://www.netexec.wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.netexec.wiki/smb-protocol/generate-hosts-file.md).

# Generate hosts file

If you are in a lab with no dns resolution you can use option `--generate-hosts-file` to generate a host file for you and avoid DNS problem when using LDAP or Kerberos protocols.

<figure><img src="https://361548579-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fb0qbsNvsXjRTsQcNipGM%2Fuploads%2Fgit-blob-656b19459159427969d901ecc0a85c8d9a4ea4a0%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
