2020-04-29 edit
Before installing Suricata on windows, install this prerequisite. Newer npcap versions may not work.

Suricata installation (and/or compilation from scratch) can be found here:

also a windows binary - self extracting auto install package is available here:

2020-04-29 edit
Note In order to avoid errors like this: "The logging directory C:\\Program Files\\Suricata/log supplied by suricata.yaml doesn't exist. (note this orphan "/") Consider installing into this directory C:\Suricata and not into C:\Program Files\Suricata.

Preparing the build environment

The instructions below should be followed in the order they appear. If your configuration requires unique actions to compile the package and/or you significantly modify the configure shell script, please e-mail the details of your requirements and/or solution to .

Set up MinGW environment from

Do not use the automatic installer, as it is deprecated. Instead, manually unpack the following packages to c:\mingw (you may use newer versions if you prefer):

* binutils
    o binutils-2.20-1-mingw32-bin.tar.gz
* mingw-runtime (dev and dll)
    o mingwrt-3.17-mingw32-dll.tar.gz
    o mingwrt-3.17-mingw32-dev.tar.gz
* w32api
    o w32api-3.14-mingw32-dev.tar.gz
* Required runtime libraries for GCC (gmp, libiconv, MPFR and pthreads)
    o gmp-4.2.4-mingw32-dll.tar.gz
    o libiconv-1.13.1-1-mingw32-dll-2.tar.lzma
    o mpfr-2.4.1-mingw32-dll.tar.gz
    o pthreads-w32-2.8.0-mingw32-dll.tar.gz
* gcc-core (bin and dll)
    o gcc-core-4.4.0-mingw32-bin.tar.gz
    o gcc-core-4.4.0-mingw32-dll.tar.gz
* make
    o make-3.81-20090914-mingw32-bin.tar.gz
* zlib
    o libz-1.2.3-1-mingw32-dll-1.tar.gz
    + libz-1.2.3-1-mingw32-dev.tar.gz

Download MSYS

Get MSYS from and install

MSYS-1.0.11.exe (MSYS Base System)
msysDTK-1.0.1.exe (MSYS Suplementary Tools)

MSYS will ask the following questions during installation.

Accept Post Install: [y]
MinGW Installed? : [y]
path to MinGW: [c:/MinGW]

Download pkg-config

Install pkg-config taken from
Download and extract the following into c:\Msys\1.0

Set PKG_CONFIG_PATH=/win32/lib/pkgconfig

(e.g. by adding the Windows environment variable PKG_CONFIG_PATH in "Control Panel"->"System"->"Advanced System Settings"->"Environment Variables" and setting the value to /win32/lib/pkgconfig)

Download Git sources

Get Git sources from

Unpack to /msys/1.0
Remember to edit ~/.gitconfig to set your username

Download libpcre

Get libpcre from

./configure --enable-utf8 --disable-cpp --prefix=/mingw
make install

Download libyaml

Download libyaml from

Though libyaml does not support mingw compilation, it does work in static mode.

./configure --prefix=/mingw CFLAGS="-DYAML_DECLARE_STATIC" 
make install

Download libpcap

Download the developer pack from
To have the driver in the system, download and install a corresponding installer package from
Copy includes to c:/mingw/include and libs (.a) to c:/mingw/lib
Rename libwpcap.a to libpcap.a

Get and compile Suricata

git clone git://
cd oisf

Because of an autotools port bug, you will need to do the following:

dos2unix.exe libhtp/
dos2unix.exe libhtp/
dos2unix.exe libhtp/


Add --enable-nfqueue as a configurable parameter to enable inline mode.


If the full installation is successful, suricata.exe will be located in src/.lib. To test your build, you will need libpcre-0.dll, libz-1.dll, and pthreadGC2.dll, all of which should already be installed under c:/mingw or c:/msys.
preparing the runtime environment.

To prepare the runtime environment, you must copy the executable and DLLs to a dedicated directory. Get the classification.config and suricata.yaml, and then edit suricata.yaml to ensure the directories are correctly identified.

pcap mode

If you have not already done so, install winpcap runtime and its driver. Then, determine your eth device UUID in the registry:

suricata.exe -c suricata.yaml -i \device\

In the example above, device should be replaced with your device uuid.

Inline mode

To operate in inline mode, you must download, compile and install netfilterforwin, which is the netfilter.sys driver and Windows port of the libnetfilter_queue library.

Download and install the Windows Driver Kit from Microsoft

Download netfilterforwin from
Unpack it so the netfilterforwin directory is beside the oisf directory. You must omit the version from its name.

Compile the driver
Open the correct build environment from your Start menu

Start > All Programs > Windows Driver Kits > WDK xxxx.yyyy.z > Build Environments > Windows Server 2003 > x86 Free Build Environment

At your command line prompt, enter the following:

cd netfilterforwin/netfilter

Install the driver
Copy inf/* files and the freshly built netfilter.sys to a separate directory, and then open the network connections.
Right-click an interface, then select Properties
Click install...
Select Service
Click Add
Click Have disk...
Browse to the directory with the inf files and netfilter.sys, select netfilter.inf, and then click Ok.
Confirm everything

The driver is now installed.

Run Suricata in inline mode

      suricata.exe -c suricata.yaml -q 0