# Suricata not recognising packets, but tshark does

**URL:** <https://forum.suricata.io/t/suricata-not-recognising-packets-but-tshark-does/320>\
**Category:** Help\
**Created:** [June 9, 2020, 12:32pm UTC](https://forum.suricata.io/t/suricata-not-recognising-packets-but-tshark-does/320 "2020-06-09T12:32:14Z")\
**Posts on this page:** 17\
**Page:** 3

<div class="post-metadata">

**Author:** ![The\_Radiant](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/the_radiant/32/145_2.png) [@The\_Radiant](https://forum.suricata.io/u/The_Radiant)\
**Post date:** [June 14, 2020, 6:53am UTC](https://forum.suricata.io/t/suricata-not-recognising-packets-but-tshark-does/320/42 "2020-06-14T06:53:54Z")

</div>

Sorry I am confused. Why do we need two gpg keys, how do you create the specific ones shown in your solution. When I try to run `dpkg -i libbpf4.19_4.19.118-2+deb10u1_armhf.deb` I get an error

```
sudo dpkg -i libbpf4.19_4.19.118-2+deb10u1_armhf.de
dpkg-deb: error: 'libbpf4.19_4.19.118-2+deb10u1_armhf.de' is not a Debian format archive

```

The extension of this file is `de` not `deb`

---

<div class="post-metadata">

**Author:** ![Jeff\_Lucovsky](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/jeff_lucovsky/32/11_2.png) [@Jeff\_Lucovsky](https://forum.suricata.io/u/Jeff_Lucovsky)\
**Post date:** [June 14, 2020, 7:36pm UTC](https://forum.suricata.io/t/suricata-not-recognising-packets-but-tshark-does/320/43 "2020-06-14T19:36:58Z")

</div>

You omitted the trailing `b`.  
Here’s the commands that Jason gave to download and install libbpf:

```auto
curl -OL http://security.debian.org/debian-security/pool/updates/main/l/linux/libbpf4.19_4.19.118-2+deb10u1_armhf.deb
dpkg -i libbpf4.19_4.19.118-2+deb10u1_armhf.deb

```

---

<div class="post-metadata">

**Author:** ![The\_Radiant](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/the_radiant/32/145_2.png) [@The\_Radiant](https://forum.suricata.io/u/The_Radiant)\
**Post date:** [June 15, 2020, 7:47am UTC](https://forum.suricata.io/t/suricata-not-recognising-packets-but-tshark-does/320/44 "2020-06-15T07:47:46Z")

</div>

Weird, i get this error `E: Invalid operation suricata`  
on this line `apt -t buster-backports suricata`. Should suricata already be installed before following those steps. If so, by doing the `sudo apt-ge`t method?

---

<div class="post-metadata">

**Author:** ![syoc](https://avatars.discourse-cdn.com/v4/letter/s/f475e1/32.png) [@syoc](https://forum.suricata.io/u/syoc)\
**Post date:** [June 15, 2020, 8:45am UTC](https://forum.suricata.io/t/suricata-not-recognising-packets-but-tshark-does/320/45 "2020-06-15T08:45:20Z")

</div>

The command should probably be: `apt install -t buster-backports suricata`

---

<div class="post-metadata">

**Author:** ![The\_Radiant](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/the_radiant/32/145_2.png) [@The\_Radiant](https://forum.suricata.io/u/The_Radiant)\
**Post date:** [June 15, 2020, 10:28am UTC](https://forum.suricata.io/t/suricata-not-recognising-packets-but-tshark-does/320/47 "2020-06-15T10:28:26Z")

</div>

I received this error when executing that command.  
`E: The value 'buster-backports' is invalid for APT::Default-Release as such a re lease is not available in the sources`

---

<div class="post-metadata">

**Author:** ![The\_Radiant](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/the_radiant/32/145_2.png) [@The\_Radiant](https://forum.suricata.io/u/The_Radiant)\
**Post date:** [June 16, 2020, 8:29am UTC](https://forum.suricata.io/t/suricata-not-recognising-packets-but-tshark-does/320/48 "2020-06-16T08:29:21Z")

</div>

Bumping this thread.

---

<div class="post-metadata">

**Author:** ![satta](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/satta/32/18_2.png) [@satta](https://forum.suricata.io/u/satta)\
**Post date:** [June 16, 2020, 8:51am UTC](https://forum.suricata.io/t/suricata-not-recognising-packets-but-tshark-does/320/49 "2020-06-16T08:51:06Z")

</div>

Do you really have

```auto
deb http://httpredir.debian.org/debian buster-backports main contrib

```

in your `/etc/apt/sources.list`, as mentioned in Jason’s post above (#40)? And run `sudo apt update` afterwards? Your package manager does not seem to know that you added this extra repository.

---

<div class="post-metadata">

**Author:** ![The\_Radiant](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/the_radiant/32/145_2.png) [@The\_Radiant](https://forum.suricata.io/u/The_Radiant)\
**Post date:** [June 16, 2020, 9:52am UTC](https://forum.suricata.io/t/suricata-not-recognising-packets-but-tshark-does/320/50 "2020-06-16T09:52:56Z")

</div>

Right I don’t think I have done the key generation correctly, can you walk me through it?. The source.list is correct:

```
sudo apt update
Get:1 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]
Get:2 http://archive.raspberrypi.org/debian buster InRelease [32.6 kB]
Get:3 http://httpredir.debian.org/debian buster-backports InRelease [46.7 kB]
Get:4 http://archive.raspberrypi.org/debian buster/main armhf Packages [330 kB]
Err:3 http://httpredir.debian.org/debian buster-backports InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 04EE7 237B7D453EC NO_PUBKEY 648ACFD622F3D138
Reading package lists... Done
W: GPG error: http://httpredir.debian.org/debian buster-backports InRelease: The following signatures co uldn't be verified because the public key is not available: NO_PUBKEY 04EE7237B7D453EC NO_PUBKEY 648ACFD 622F3D138
E: The repository 'http://httpredir.debian.org/debian buster-backports InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
```

---

<div class="post-metadata">

**Author:** ![satta](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/satta/32/18_2.png) [@satta](https://forum.suricata.io/u/satta)\
**Post date:** [June 16, 2020, 1:53pm UTC](https://forum.suricata.io/t/suricata-not-recognising-packets-but-tshark-does/320/51 "2020-06-16T13:53:40Z")

</div>

The package manager needs to have the PGP keys to verify package sets from the new repository.  
You first have to fetch the keys from a keyserver, e.g. the SKS one:

```auto
$ gpg --recv-keys --keyserver ipv4.pool.sks-keyservers.net 04EE7237B7D453EC
gpg: key E0B11894F66AEC98: public key "Debian Archive Automatic Signing Key (9/stretch) <ftpmaster@debian.org>" imported
gpg: Total number processed: 1
gpg: imported: 1
$ gpg --recv-keys --keyserver ipv4.pool.sks-keyservers.net 648ACFD622F3D138
gpg: key DC30D7C23CBBABEE: public key "Debian Archive Automatic Signing Key (10/buster) <ftpmaster@debian.org>" imported
gpg: Total number processed: 1
gpg: imported: 1

```

then import them into your local APT key store:

```auto
$ gpg --export 04EE7237B7D453EC | sudo apt-key add -
OK
$ gpg --export 648ACFD622F3D138 | sudo apt-key add -
OK

```

Then your `apt update` should work.

---

<div class="post-metadata">

**Author:** ![The\_Radiant](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/the_radiant/32/145_2.png) [@The\_Radiant](https://forum.suricata.io/u/The_Radiant)\
**Post date:** [June 16, 2020, 2:18pm UTC](https://forum.suricata.io/t/suricata-not-recognising-packets-but-tshark-does/320/52 "2020-06-16T14:18:19Z")

</div>

That all worked but when I do `apt -t buster-backports suricata` I get an error saying  
`E: Invalid operation suricata`. Should I install suricata at this point using `sudo apt-get install suricata`?

I have already done:  
curl -OL [http://security.debian.org/debian-security/pool/updates/main/l/linux/libbpf4.19\_4.19.118-2+deb10u1\_armhf.deb](http://security.debian.org/debian-security/pool/updates/main/l/linux/libbpf4.19_4.19.118-2+deb10u1_armhf.deb)  
dpkg -i libbpf4.19\_4.19.118-2+deb10u1\_armhf.deb

---

<div class="post-metadata">

**Author:** ![satta](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/satta/32/18_2.png) [@satta](https://forum.suricata.io/u/satta)\
**Post date:** [June 16, 2020, 2:19pm UTC](https://forum.suricata.io/t/suricata-not-recognising-packets-but-tshark-does/320/53 "2020-06-16T14:19:50Z")

</div>

It should be

```auto
sudo apt install -t buster-backports suricata

```

where `install` is the operation, `-t buster-backports` is the `-t`arget distribution, and `suricata` is the package to install via apt.  
With libbpf already present, that should pull in the rest of the dependencies from backports.

---

<div class="post-metadata">

**Author:** ![The\_Radiant](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/the_radiant/32/145_2.png) [@The\_Radiant](https://forum.suricata.io/u/The_Radiant)\
**Post date:** [June 16, 2020, 2:22pm UTC](https://forum.suricata.io/t/suricata-not-recognising-packets-but-tshark-does/320/54 "2020-06-16T14:22:28Z")

</div>

> [@satta](#):
>
> `sudo apt install -t buster-backports suricata`

Great I now have it installed. I will now re run my tests and see what happens.

---

<div class="post-metadata">

**Author:** ![The\_Radiant](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/the_radiant/32/145_2.png) [@The\_Radiant](https://forum.suricata.io/u/The_Radiant)\
**Post date:** [June 16, 2020, 2:37pm UTC](https://forum.suricata.io/t/suricata-not-recognising-packets-but-tshark-does/320/55 "2020-06-16T14:37:21Z")

</div>

Okay, so I have suricata 5 and I can now pickup the ICMP packets. The issue now is I can’t seem to install the emerging rules I was using previously. Here is the install script I was using. Are the emerging rules still compatible with suricata v5?

```
#!/usr/bin/python

import os
import urllib2

suricatadirectory='/etc/suricata/'
md5file=suricatadirectory+'lastmd5'
rulesdirectory=suricatadirectory+'rules.tar.gz'
rulesurl='https://rules.emergingthreats.net/open-nogpl/suricata-2.0/emerging.rules.tar.gz'

#Actualizacion de reglas
def deploynewrules():
	os.system("wget " + rulesurl + " -o /tmp/wget.output -O" + rulesdirectory)
	os.system("tar -xzf " + rulesdirectory + " -C " + suricatadirectory)

#Comprobar si ha cambiado el md5
def md5change():
	re = urllib2.urlopen(rulesurl+".md5")
	newmd5 = re.read()

	oldmd5file = open(md5file,"r")
	oldmd5 = oldmd5file.read()
	oldmd5file.close()

	if newmd5!=oldmd5 :
		md5 = open (md5file,"w")
		md5.write(newmd5)
		md5.close()
		return 1

	else:
		return 0

def main():     
	if os.path.exists(md5file):
		if md5change():
			deploynewrules()
	else:
		re = urllib2.urlopen(rulesurl+".md5")
		newmd5 = re.read()
		md5 = open (md5file,"w")
		md5.write(newmd5)
		md5.close()
		deploynewrules()

if __name__ == ' __main__':
	main()
```

---

<div class="post-metadata">

**Author:** ![Jeff\_Lucovsky](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/jeff_lucovsky/32/11_2.png) [@Jeff\_Lucovsky](https://forum.suricata.io/u/Jeff_Lucovsky)\
**Post date:** [June 16, 2020, 3:31pm UTC](https://forum.suricata.io/t/suricata-not-recognising-packets-but-tshark-does/320/56 "2020-06-16T15:31:50Z")

</div>

Yes, The rules are compatible. Change your URL to `https://rules.emergingthreats.net/open/suricata-git/emerging.rules.tar.gz` and let us know how that works.

---

<div class="post-metadata">

**Author:** ![The\_Radiant](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/the_radiant/32/145_2.png) [@The\_Radiant](https://forum.suricata.io/u/The_Radiant)\
**Post date:** [June 16, 2020, 4:08pm UTC](https://forum.suricata.io/t/suricata-not-recognising-packets-but-tshark-does/320/57 "2020-06-16T16:08:05Z")

</div>

Yep,that works thanks! Could someone supply the default suricata.yaml file. I have moved my old one over to the new suricata v5, but it is causing issues.

---

<div class="post-metadata">

**Author:** ![The\_Radiant](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/the_radiant/32/145_2.png) [@The\_Radiant](https://forum.suricata.io/u/The_Radiant)\
**Post date:** [June 18, 2020, 8:46am UTC](https://forum.suricata.io/t/suricata-not-recognising-packets-but-tshark-does/320/58 "2020-06-18T08:46:48Z")

</div>

I have reinstalled suricata v5 but the .yaml file did not regenerate. Could someone please provided the default suricata.yaml file for suricata v5?

---

<div class="post-metadata">

**Author:** ![satta](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/satta/32/18_2.png) [@satta](https://forum.suricata.io/u/satta)\
**Post date:** [June 18, 2020, 11:21am UTC](https://forum.suricata.io/t/suricata-not-recognising-packets-but-tshark-does/320/59 "2020-06-18T11:21:40Z")

</div>

Here you are:  
[suricata.yaml](https://forum.suricata.io/uploads/short-url/iy9sJgYT8axoQSrDxyMFtAGdppr.yaml) (68.9 KB)

Please make sure to adjust your rule and log paths.

[Previous page](https://forum.suricata.io/t/suricata-not-recognising-packets-but-tshark-does/320.md?page=2)
