> 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="/files/AUzSIxC9YkhkvTzvkyGB" alt=""><figcaption></figcaption></figure>
