# "hostbit not found" error running suricata command

**URL:** <https://forum.suricata.io/t/hostbit-not-found-error-running-suricata-command/1830>\
**Category:** Help\
**Tags:** community\
**Created:** [October 19, 2021, 3:19pm UTC](https://forum.suricata.io/t/hostbit-not-found-error-running-suricata-command/1830 "2021-10-19T15:19:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Damisuricata](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@Damisuricata](https://forum.suricata.io/u/Damisuricata)\
**Post date:** [October 19, 2021, 3:19pm UTC](https://forum.suricata.io/t/hostbit-not-found-error-running-suricata-command/1830/1 "2021-10-19T15:19:31Z")

</div>

Hi community:  
I hope you all are fine.  
I am struggling trying to start with Suricata. I am running the command below and I have this error:

```auto
[root@centos-agent2 ~]# suricatasc -c "add-hostbit 1.2.3.4 blacklist 60"
{"message": "hostbit not found", "return": "NOK"}

```

Is this an error? What am I missing?  
Thanks a lot for your help!

---

<div class="post-metadata">

**Author:** ![vjulien](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/vjulien/32/4_2.png) [@vjulien](https://forum.suricata.io/u/vjulien)\
**Post date:** [October 20, 2021, 9:12am UTC](https://forum.suricata.io/t/hostbit-not-found-error-running-suricata-command/1830/2 "2021-10-20T09:12:59Z")

</div>

From looking at the code, it appears you can only reference a hostbit in the unix socket that is already in use by a rule. Do you have a rule that uses the `blacklist` hostbit?

---

<div class="post-metadata">

**Author:** ![Damisuricata](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@Damisuricata](https://forum.suricata.io/u/Damisuricata)\
**Post date:** [October 20, 2021, 3:07pm UTC](https://forum.suricata.io/t/hostbit-not-found-error-running-suricata-command/1830/3 "2021-10-20T15:07:20Z")

</div>

Hi @vjulien  
Thanks for your reply. I don’t have any custom rule. Do I need one to make this work?  
I ahve found this in the suricata.log:  
`19/10/2021 -- 17:51:00 - <Info> - No 'host-mode': suricata is in IDS mode, using default setting 'sniffer-only'`  
Is this working “mode” related ti the issue?  
Thanks again for your help.

---

<div class="post-metadata">

**Author:** ![vjulien](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/vjulien/32/4_2.png) [@vjulien](https://forum.suricata.io/u/vjulien)\
**Post date:** [October 22, 2021, 10:04am UTC](https://forum.suricata.io/t/hostbit-not-found-error-running-suricata-command/1830/4 "2021-10-22T10:04:54Z")

</div>

Yes you need a rule to do anything with the hostbit, its not magically doing something by itself.
