suricata.yaml.in 77 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048
  1. %YAML 1.1
  2. ---
  3. # Suricata configuration file. In addition to the comments describing all
  4. # options in this file, full documentation can be found at:
  5. # https://suricata.readthedocs.io/en/latest/configuration/suricata-yaml.html
  6. #
  7. # This configuration file generated by:
  8. # Suricata @PACKAGE_VERSION@
  9. ##
  10. ## Step 1: Inform Suricata about your network
  11. ##
  12. vars:
  13. # more specific is better for alert accuracy and performance
  14. address-groups:
  15. HOME_NET: "[192.168.0.0/16,10.0.0.0/8,172.16.0.0/12]"
  16. #HOME_NET: "[192.168.0.0/16]"
  17. #HOME_NET: "[10.0.0.0/8]"
  18. #HOME_NET: "[172.16.0.0/12]"
  19. #HOME_NET: "any"
  20. EXTERNAL_NET: "!$HOME_NET"
  21. #EXTERNAL_NET: "any"
  22. HTTP_SERVERS: "$HOME_NET"
  23. SMTP_SERVERS: "$HOME_NET"
  24. SQL_SERVERS: "$HOME_NET"
  25. DNS_SERVERS: "$HOME_NET"
  26. TELNET_SERVERS: "$HOME_NET"
  27. AIM_SERVERS: "$EXTERNAL_NET"
  28. DC_SERVERS: "$HOME_NET"
  29. DNP3_SERVER: "$HOME_NET"
  30. DNP3_CLIENT: "$HOME_NET"
  31. MODBUS_CLIENT: "$HOME_NET"
  32. MODBUS_SERVER: "$HOME_NET"
  33. ENIP_CLIENT: "$HOME_NET"
  34. ENIP_SERVER: "$HOME_NET"
  35. port-groups:
  36. HTTP_PORTS: "80"
  37. SHELLCODE_PORTS: "!80"
  38. ORACLE_PORTS: 1521
  39. SSH_PORTS: 22
  40. DNP3_PORTS: 20000
  41. MODBUS_PORTS: 502
  42. FILE_DATA_PORTS: "[$HTTP_PORTS,110,143]"
  43. FTP_PORTS: 21
  44. GENEVE_PORTS: 6081
  45. VXLAN_PORTS: 4789
  46. TEREDO_PORTS: 3544
  47. ##
  48. ## Step 2: Select outputs to enable
  49. ##
  50. # The default logging directory. Any log or output file will be
  51. # placed here if it's not specified with a full path name. This can be
  52. # overridden with the -l command line parameter.
  53. default-log-dir: @e_logdir@
  54. # Global stats configuration
  55. stats:
  56. enabled: yes
  57. # The interval field (in seconds) controls the interval at
  58. # which stats are updated in the log.
  59. interval: 8
  60. # Add decode events to stats.
  61. #decoder-events: true
  62. # Decoder event prefix in stats. Has been 'decoder' before, but that leads
  63. # to missing events in the eve.stats records. See issue #2225.
  64. #decoder-events-prefix: "decoder.event"
  65. # Add stream events as stats.
  66. #stream-events: false
  67. # Plugins -- Experimental -- specify the filename for each plugin shared object
  68. plugins:
  69. # - /path/to/plugin.so
  70. # Configure the type of alert (and other) logging you would like.
  71. outputs:
  72. # a line based alerts log similar to Snort's fast.log
  73. - fast:
  74. enabled: yes
  75. filename: fast.log
  76. append: yes
  77. #filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
  78. # Extensible Event Format (nicknamed EVE) event log in JSON format
  79. - eve-log:
  80. enabled: @e_enable_evelog@
  81. filetype: regular #regular|syslog|unix_dgram|unix_stream|redis
  82. filename: eve.json
  83. # Enable for multi-threaded eve.json output; output files are amended with
  84. # an identifier, e.g., eve.9.json
  85. #threaded: false
  86. #prefix: "@cee: " # prefix to prepend to each log entry
  87. # the following are valid when type: syslog above
  88. #identity: "suricata"
  89. #facility: local5
  90. #level: Info ## possible levels: Emergency, Alert, Critical,
  91. ## Error, Warning, Notice, Info, Debug
  92. #ethernet: no # log ethernet header in events when available
  93. #redis:
  94. # server: 127.0.0.1
  95. # port: 6379
  96. # async: true ## if redis replies are read asynchronously
  97. # mode: list ## possible values: list|lpush (default), rpush, channel|publish
  98. # ## lpush and rpush are using a Redis list. "list" is an alias for lpush
  99. # ## publish is using a Redis channel. "channel" is an alias for publish
  100. # key: suricata ## key or channel to use (default to suricata)
  101. # Redis pipelining set up. This will enable to only do a query every
  102. # 'batch-size' events. This should lower the latency induced by network
  103. # connection at the cost of some memory. There is no flushing implemented
  104. # so this setting should be reserved to high traffic Suricata deployments.
  105. # pipelining:
  106. # enabled: yes ## set enable to yes to enable query pipelining
  107. # batch-size: 10 ## number of entries to keep in buffer
  108. # Include top level metadata. Default yes.
  109. #metadata: no
  110. # include the name of the input pcap file in pcap file processing mode
  111. pcap-file: false
  112. # Community Flow ID
  113. # Adds a 'community_id' field to EVE records. These are meant to give
  114. # records a predictable flow ID that can be used to match records to
  115. # output of other tools such as Zeek (Bro).
  116. #
  117. # Takes a 'seed' that needs to be same across sensors and tools
  118. # to make the id less predictable.
  119. # enable/disable the community id feature.
  120. community-id: false
  121. # Seed value for the ID output. Valid values are 0-65535.
  122. community-id-seed: 0
  123. # HTTP X-Forwarded-For support by adding an extra field or overwriting
  124. # the source or destination IP address (depending on flow direction)
  125. # with the one reported in the X-Forwarded-For HTTP header. This is
  126. # helpful when reviewing alerts for traffic that is being reverse
  127. # or forward proxied.
  128. xff:
  129. enabled: no
  130. # Two operation modes are available: "extra-data" and "overwrite".
  131. mode: extra-data
  132. # Two proxy deployments are supported: "reverse" and "forward". In
  133. # a "reverse" deployment the IP address used is the last one, in a
  134. # "forward" deployment the first IP address is used.
  135. deployment: reverse
  136. # Header name where the actual IP address will be reported. If more
  137. # than one IP address is present, the last IP address will be the
  138. # one taken into consideration.
  139. header: X-Forwarded-For
  140. types:
  141. - alert:
  142. # payload: yes # enable dumping payload in Base64
  143. # payload-buffer-size: 4kb # max size of payload buffer to output in eve-log
  144. # payload-printable: yes # enable dumping payload in printable (lossy) format
  145. # packet: yes # enable dumping of packet (without stream segments)
  146. # metadata: no # enable inclusion of app layer metadata with alert. Default yes
  147. # http-body: yes # Requires metadata; enable dumping of HTTP body in Base64
  148. # http-body-printable: yes # Requires metadata; enable dumping of HTTP body in printable format
  149. # Enable the logging of tagged packets for rules using the
  150. # "tag" keyword.
  151. tagged-packets: yes
  152. # app layer frames
  153. - frame:
  154. # disabled by default as this is very verbose.
  155. enabled: no
  156. - anomaly:
  157. # Anomaly log records describe unexpected conditions such
  158. # as truncated packets, packets with invalid IP/UDP/TCP
  159. # length values, and other events that render the packet
  160. # invalid for further processing or describe unexpected
  161. # behavior on an established stream. Networks which
  162. # experience high occurrences of anomalies may experience
  163. # packet processing degradation.
  164. #
  165. # Anomalies are reported for the following:
  166. # 1. Decode: Values and conditions that are detected while
  167. # decoding individual packets. This includes invalid or
  168. # unexpected values for low-level protocol lengths as well
  169. # as stream related events (TCP 3-way handshake issues,
  170. # unexpected sequence number, etc).
  171. # 2. Stream: This includes stream related events (TCP
  172. # 3-way handshake issues, unexpected sequence number,
  173. # etc).
  174. # 3. Application layer: These denote application layer
  175. # specific conditions that are unexpected, invalid or are
  176. # unexpected given the application monitoring state.
  177. #
  178. # By default, anomaly logging is enabled. When anomaly
  179. # logging is enabled, applayer anomaly reporting is
  180. # also enabled.
  181. enabled: yes
  182. #
  183. # Choose one or more types of anomaly logging and whether to enable
  184. # logging of the packet header for packet anomalies.
  185. types:
  186. # decode: no
  187. # stream: no
  188. # applayer: yes
  189. #packethdr: no
  190. - http:
  191. extended: yes # enable this for extended logging information
  192. # custom allows additional HTTP fields to be included in eve-log.
  193. # the example below adds three additional fields when uncommented
  194. #custom: [Accept-Encoding, Accept-Language, Authorization]
  195. # set this value to one and only one from {both, request, response}
  196. # to dump all HTTP headers for every HTTP request and/or response
  197. # dump-all-headers: none
  198. - dns:
  199. # This configuration uses the new DNS logging format,
  200. # the old configuration is still available:
  201. # https://suricata.readthedocs.io/en/latest/output/eve/eve-json-output.html#dns-v1-format
  202. # As of Suricata 5.0, version 2 of the eve dns output
  203. # format is the default.
  204. #version: 2
  205. # Enable/disable this logger. Default: enabled.
  206. #enabled: yes
  207. # Control logging of requests and responses:
  208. # - requests: enable logging of DNS queries
  209. # - responses: enable logging of DNS answers
  210. # By default both requests and responses are logged.
  211. #requests: no
  212. #responses: no
  213. # Format of answer logging:
  214. # - detailed: array item per answer
  215. # - grouped: answers aggregated by type
  216. # Default: all
  217. #formats: [detailed, grouped]
  218. # DNS record types to log, based on the query type.
  219. # Default: all.
  220. #types: [a, aaaa, cname, mx, ns, ptr, txt]
  221. - tls:
  222. extended: yes # enable this for extended logging information
  223. # output TLS transaction where the session is resumed using a
  224. # session id
  225. #session-resumption: no
  226. # custom controls which TLS fields that are included in eve-log
  227. #custom: [subject, issuer, session_resumed, serial, fingerprint, sni, version, not_before, not_after, certificate, chain, ja3, ja3s]
  228. - files:
  229. force-magic: no # force logging magic on all logged files
  230. # force logging of checksums, available hash functions are md5,
  231. # sha1 and sha256
  232. #force-hash: [md5]
  233. #- drop:
  234. # alerts: yes # log alerts that caused drops
  235. # flows: all # start or all: 'start' logs only a single drop
  236. # # per flow direction. All logs each dropped pkt.
  237. - smtp:
  238. #extended: yes # enable this for extended logging information
  239. # this includes: bcc, message-id, subject, x_mailer, user-agent
  240. # custom fields logging from the list:
  241. # reply-to, bcc, message-id, subject, x-mailer, user-agent, received,
  242. # x-originating-ip, in-reply-to, references, importance, priority,
  243. # sensitivity, organization, content-md5, date
  244. #custom: [received, x-mailer, x-originating-ip, relays, reply-to, bcc]
  245. # output md5 of fields: body, subject
  246. # for the body you need to set app-layer.protocols.smtp.mime.body-md5
  247. # to yes
  248. #md5: [body, subject]
  249. #- dnp3
  250. - ftp
  251. - rdp
  252. - nfs
  253. - smb
  254. - tftp
  255. - ike
  256. - dcerpc
  257. - krb5
  258. - bittorrent-dht
  259. - snmp
  260. - rfb
  261. - sip
  262. - quic
  263. - dhcp:
  264. enabled: yes
  265. # When extended mode is on, all DHCP messages are logged
  266. # with full detail. When extended mode is off (the
  267. # default), just enough information to map a MAC address
  268. # to an IP address is logged.
  269. extended: no
  270. - ssh
  271. - mqtt:
  272. # passwords: yes # enable output of passwords
  273. - http2
  274. - pgsql:
  275. enabled: no
  276. # passwords: yes # enable output of passwords. Disabled by default
  277. - stats:
  278. totals: yes # stats for all threads merged together
  279. threads: no # per thread stats
  280. deltas: no # include delta values
  281. # bi-directional flows
  282. - flow
  283. # uni-directional flows
  284. #- netflow
  285. # Metadata event type. Triggered whenever a pktvar is saved
  286. # and will include the pktvars, flowvars, flowbits and
  287. # flowints.
  288. #- metadata
  289. # a line based log of HTTP requests (no alerts)
  290. - http-log:
  291. enabled: no
  292. filename: http.log
  293. append: yes
  294. #extended: yes # enable this for extended logging information
  295. #custom: yes # enable the custom logging format (defined by customformat)
  296. #customformat: "%{%D-%H:%M:%S}t.%z %{X-Forwarded-For}i %H %m %h %u %s %B %a:%p -> %A:%P"
  297. #filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
  298. # a line based log of TLS handshake parameters (no alerts)
  299. - tls-log:
  300. enabled: no # Log TLS connections.
  301. filename: tls.log # File to store TLS logs.
  302. append: yes
  303. #extended: yes # Log extended information like fingerprint
  304. #custom: yes # enabled the custom logging format (defined by customformat)
  305. #customformat: "%{%D-%H:%M:%S}t.%z %a:%p -> %A:%P %v %n %d %D"
  306. #filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
  307. # output TLS transaction where the session is resumed using a
  308. # session id
  309. #session-resumption: no
  310. # output module to store certificates chain to disk
  311. - tls-store:
  312. enabled: no
  313. #certs-log-dir: certs # directory to store the certificates files
  314. # Packet log... log packets in pcap format. 3 modes of operation: "normal"
  315. # "multi" and "sguil".
  316. #
  317. # In normal mode a pcap file "filename" is created in the default-log-dir,
  318. # or as specified by "dir".
  319. # In multi mode, a file is created per thread. This will perform much
  320. # better, but will create multiple files where 'normal' would create one.
  321. # In multi mode the filename takes a few special variables:
  322. # - %n -- thread number
  323. # - %i -- thread id
  324. # - %t -- timestamp (secs or secs.usecs based on 'ts-format'
  325. # E.g. filename: pcap.%n.%t
  326. #
  327. # Note that it's possible to use directories, but the directories are not
  328. # created by Suricata. E.g. filename: pcaps/%n/log.%s will log into the
  329. # per thread directory.
  330. #
  331. # Also note that the limit and max-files settings are enforced per thread.
  332. # So the size limit when using 8 threads with 1000mb files and 2000 files
  333. # is: 8*1000*2000 ~ 16TiB.
  334. #
  335. # In Sguil mode "dir" indicates the base directory. In this base dir the
  336. # pcaps are created in the directory structure Sguil expects:
  337. #
  338. # $sguil-base-dir/YYYY-MM-DD/$filename.<timestamp>
  339. #
  340. # By default all packets are logged except:
  341. # - TCP streams beyond stream.reassembly.depth
  342. # - encrypted streams after the key exchange
  343. #
  344. - pcap-log:
  345. enabled: no
  346. filename: log.pcap
  347. # File size limit. Can be specified in kb, mb, gb. Just a number
  348. # is parsed as bytes.
  349. limit: 1000mb
  350. # If set to a value, ring buffer mode is enabled. Will keep maximum of
  351. # "max-files" of size "limit"
  352. max-files: 2000
  353. # Compression algorithm for pcap files. Possible values: none, lz4.
  354. # Enabling compression is incompatible with the sguil mode. Note also
  355. # that on Windows, enabling compression will *increase* disk I/O.
  356. compression: none
  357. # Further options for lz4 compression. The compression level can be set
  358. # to a value between 0 and 16, where higher values result in higher
  359. # compression.
  360. #lz4-checksum: no
  361. #lz4-level: 0
  362. mode: normal # normal, multi or sguil.
  363. # Directory to place pcap files. If not provided the default log
  364. # directory will be used. Required for "sguil" mode.
  365. #dir: /nsm_data/
  366. #ts-format: usec # sec or usec second format (default) is filename.sec usec is filename.sec.usec
  367. use-stream-depth: no #If set to "yes" packets seen after reaching stream inspection depth are ignored. "no" logs all packets
  368. honor-pass-rules: no # If set to "yes", flows in which a pass rule matched will stop being logged.
  369. # Use "all" to log all packets or use "alerts" to log only alerted packets and flows or "tag"
  370. # to log only flow tagged via the "tag" keyword
  371. #conditional: all
  372. # a full alert log containing much information for signature writers
  373. # or for investigating suspected false positives.
  374. - alert-debug:
  375. enabled: no
  376. filename: alert-debug.log
  377. append: yes
  378. #filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
  379. # Stats.log contains data from various counters of the Suricata engine.
  380. - stats:
  381. enabled: yes
  382. filename: stats.log
  383. append: yes # append to file (yes) or overwrite it (no)
  384. totals: yes # stats for all threads merged together
  385. threads: no # per thread stats
  386. #null-values: yes # print counters that have value 0. Default: no
  387. # a line based alerts log similar to fast.log into syslog
  388. - syslog:
  389. enabled: no
  390. # reported identity to syslog. If omitted the program name (usually
  391. # suricata) will be used.
  392. #identity: "suricata"
  393. facility: local5
  394. #level: Info ## possible levels: Emergency, Alert, Critical,
  395. ## Error, Warning, Notice, Info, Debug
  396. # Output module for storing files on disk. Files are stored in
  397. # directory names consisting of the first 2 characters of the
  398. # SHA256 of the file. Each file is given its SHA256 as a filename.
  399. #
  400. # When a duplicate file is found, the timestamps on the existing file
  401. # are updated.
  402. #
  403. # Unlike the older filestore, metadata is not written by default
  404. # as each file should already have a "fileinfo" record in the
  405. # eve-log. If write-fileinfo is set to yes, then each file will have
  406. # one more associated .json files that consist of the fileinfo
  407. # record. A fileinfo file will be written for each occurrence of the
  408. # file seen using a filename suffix to ensure uniqueness.
  409. #
  410. # To prune the filestore directory see the "suricatactl filestore
  411. # prune" command which can delete files over a certain age.
  412. - file-store:
  413. version: 2
  414. enabled: no
  415. # Set the directory for the filestore. Relative pathnames
  416. # are contained within the "default-log-dir".
  417. #dir: filestore
  418. # Write out a fileinfo record for each occurrence of a file.
  419. # Disabled by default as each occurrence is already logged
  420. # as a fileinfo record to the main eve-log.
  421. #write-fileinfo: yes
  422. # Force storing of all files. Default: no.
  423. #force-filestore: yes
  424. # Override the global stream-depth for sessions in which we want
  425. # to perform file extraction. Set to 0 for unlimited; otherwise,
  426. # must be greater than the global stream-depth value to be used.
  427. #stream-depth: 0
  428. # Uncomment the following variable to define how many files can
  429. # remain open for filestore by Suricata. Default value is 0 which
  430. # means files get closed after each write to the file.
  431. #max-open-files: 1000
  432. # Force logging of checksums: available hash functions are md5,
  433. # sha1 and sha256. Note that SHA256 is automatically forced by
  434. # the use of this output module as it uses the SHA256 as the
  435. # file naming scheme.
  436. #force-hash: [sha1, md5]
  437. # NOTE: X-Forwarded configuration is ignored if write-fileinfo is disabled
  438. # HTTP X-Forwarded-For support by adding an extra field or overwriting
  439. # the source or destination IP address (depending on flow direction)
  440. # with the one reported in the X-Forwarded-For HTTP header. This is
  441. # helpful when reviewing alerts for traffic that is being reverse
  442. # or forward proxied.
  443. xff:
  444. enabled: no
  445. # Two operation modes are available, "extra-data" and "overwrite".
  446. mode: extra-data
  447. # Two proxy deployments are supported, "reverse" and "forward". In
  448. # a "reverse" deployment the IP address used is the last one, in a
  449. # "forward" deployment the first IP address is used.
  450. deployment: reverse
  451. # Header name where the actual IP address will be reported. If more
  452. # than one IP address is present, the last IP address will be the
  453. # one taken into consideration.
  454. header: X-Forwarded-For
  455. # Log TCP data after stream normalization
  456. # Two types: file or dir:
  457. # - file logs into a single logfile.
  458. # - dir creates 2 files per TCP session and stores the raw TCP
  459. # data into them.
  460. # Use 'both' to enable both file and dir modes.
  461. #
  462. # Note: limited by "stream.reassembly.depth"
  463. - tcp-data:
  464. enabled: no
  465. type: file
  466. filename: tcp-data.log
  467. # Log HTTP body data after normalization, de-chunking and unzipping.
  468. # Two types: file or dir.
  469. # - file logs into a single logfile.
  470. # - dir creates 2 files per HTTP session and stores the
  471. # normalized data into them.
  472. # Use 'both' to enable both file and dir modes.
  473. #
  474. # Note: limited by the body limit settings
  475. - http-body-data:
  476. enabled: no
  477. type: file
  478. filename: http-data.log
  479. # Lua Output Support - execute lua script to generate alert and event
  480. # output.
  481. # Documented at:
  482. # https://suricata.readthedocs.io/en/latest/output/lua-output.html
  483. - lua:
  484. enabled: no
  485. #scripts-dir: /etc/suricata/lua-output/
  486. scripts:
  487. # - script1.lua
  488. # Logging configuration. This is not about logging IDS alerts/events, but
  489. # output about what Suricata is doing, like startup messages, errors, etc.
  490. logging:
  491. # The default log level: can be overridden in an output section.
  492. # Note that debug level logging will only be emitted if Suricata was
  493. # compiled with the --enable-debug configure option.
  494. #
  495. # This value is overridden by the SC_LOG_LEVEL env var.
  496. default-log-level: notice
  497. # The default output format. Optional parameter, should default to
  498. # something reasonable if not provided. Can be overridden in an
  499. # output section. You can leave this out to get the default.
  500. #
  501. # This value is overridden by the SC_LOG_FORMAT env var.
  502. #default-log-format: "[%i] %t - (%f:%l) <%d> (%n) -- "
  503. # A regex to filter output. Can be overridden in an output section.
  504. # Defaults to empty (no filter).
  505. #
  506. # This value is overridden by the SC_LOG_OP_FILTER env var.
  507. default-output-filter:
  508. # Requires libunwind to be available when Suricata is configured and built.
  509. # If a signal unexpectedly terminates Suricata, displays a brief diagnostic
  510. # message with the offending stacktrace if enabled.
  511. #stacktrace-on-signal: on
  512. # Define your logging outputs. If none are defined, or they are all
  513. # disabled you will get the default: console output.
  514. outputs:
  515. - console:
  516. enabled: yes
  517. # type: json
  518. - file:
  519. enabled: yes
  520. level: info
  521. filename: suricata.log
  522. # type: json
  523. - syslog:
  524. enabled: no
  525. facility: local5
  526. format: "[%i] <%d> -- "
  527. # type: json
  528. ##
  529. ## Step 3: Configure common capture settings
  530. ##
  531. ## See "Advanced Capture Options" below for more options, including Netmap
  532. ## and PF_RING.
  533. ##
  534. # Linux high speed capture support
  535. af-packet:
  536. - interface: eth0
  537. # Number of receive threads. "auto" uses the number of cores
  538. #threads: auto
  539. # Default clusterid. AF_PACKET will load balance packets based on flow.
  540. cluster-id: 99
  541. # Default AF_PACKET cluster type. AF_PACKET can load balance per flow or per hash.
  542. # This is only supported for Linux kernel > 3.1
  543. # possible value are:
  544. # * cluster_flow: all packets of a given flow are sent to the same socket
  545. # * cluster_cpu: all packets treated in kernel by a CPU are sent to the same socket
  546. # * cluster_qm: all packets linked by network card to a RSS queue are sent to the same
  547. # socket. Requires at least Linux 3.14.
  548. # * cluster_ebpf: eBPF file load balancing. See doc/userguide/capture-hardware/ebpf-xdp.rst for
  549. # more info.
  550. # Recommended modes are cluster_flow on most boxes and cluster_cpu or cluster_qm on system
  551. # with capture card using RSS (requires cpu affinity tuning and system IRQ tuning)
  552. cluster-type: cluster_flow
  553. # In some fragmentation cases, the hash can not be computed. If "defrag" is set
  554. # to yes, the kernel will do the needed defragmentation before sending the packets.
  555. defrag: yes
  556. # To use the ring feature of AF_PACKET, set 'use-mmap' to yes
  557. #use-mmap: yes
  558. # Lock memory map to avoid it being swapped. Be careful that over
  559. # subscribing could lock your system
  560. #mmap-locked: yes
  561. # Use tpacket_v3 capture mode, only active if use-mmap is true
  562. # Don't use it in IPS or TAP mode as it causes severe latency
  563. #tpacket-v3: yes
  564. # Ring size will be computed with respect to "max-pending-packets" and number
  565. # of threads. You can set manually the ring size in number of packets by setting
  566. # the following value. If you are using flow "cluster-type" and have really network
  567. # intensive single-flow you may want to set the "ring-size" independently of the number
  568. # of threads:
  569. #ring-size: 2048
  570. # Block size is used by tpacket_v3 only. It should set to a value high enough to contain
  571. # a decent number of packets. Size is in bytes so please consider your MTU. It should be
  572. # a power of 2 and it must be multiple of page size (usually 4096).
  573. #block-size: 32768
  574. # tpacket_v3 block timeout: an open block is passed to userspace if it is not
  575. # filled after block-timeout milliseconds.
  576. #block-timeout: 10
  577. # On busy systems, set it to yes to help recover from a packet drop
  578. # phase. This will result in some packets (at max a ring flush) not being inspected.
  579. #use-emergency-flush: yes
  580. # recv buffer size, increased value could improve performance
  581. # buffer-size: 32768
  582. # Set to yes to disable promiscuous mode
  583. # disable-promisc: no
  584. # Choose checksum verification mode for the interface. At the moment
  585. # of the capture, some packets may have an invalid checksum due to
  586. # the checksum computation being offloaded to the network card.
  587. # Possible values are:
  588. # - kernel: use indication sent by kernel for each packet (default)
  589. # - yes: checksum validation is forced
  590. # - no: checksum validation is disabled
  591. # - auto: Suricata uses a statistical approach to detect when
  592. # checksum off-loading is used.
  593. # Warning: 'capture.checksum-validation' must be set to yes to have any validation
  594. #checksum-checks: kernel
  595. # BPF filter to apply to this interface. The pcap filter syntax applies here.
  596. #bpf-filter: port 80 or udp
  597. # You can use the following variables to activate AF_PACKET tap or IPS mode.
  598. # If copy-mode is set to ips or tap, the traffic coming to the current
  599. # interface will be copied to the copy-iface interface. If 'tap' is set, the
  600. # copy is complete. If 'ips' is set, the packet matching a 'drop' action
  601. # will not be copied.
  602. #copy-mode: ips
  603. #copy-iface: eth1
  604. # For eBPF and XDP setup including bypass, filter and load balancing, please
  605. # see doc/userguide/capture-hardware/ebpf-xdp.rst for more info.
  606. # Put default values here. These will be used for an interface that is not
  607. # in the list above.
  608. - interface: default
  609. #threads: auto
  610. #use-mmap: no
  611. #tpacket-v3: yes
  612. dpdk:
  613. eal-params:
  614. proc-type: primary
  615. # DPDK capture support
  616. # RX queues (and TX queues in IPS mode) are assigned to cores in 1:1 ratio
  617. interfaces:
  618. - interface: 0000:3b:00.0 # PCIe address of the NIC port
  619. # Threading: possible values are either "auto" or number of threads
  620. # - auto takes all cores
  621. # in IPS mode it is required to specify the number of cores and the numbers on both interfaces must match
  622. threads: auto
  623. promisc: true # promiscuous mode - capture all packets
  624. multicast: true # enables also detection on multicast packets
  625. checksum-checks: true # if Suricata should validate checksums
  626. checksum-checks-offload: true # if possible offload checksum validation to the NIC (saves Suricata resources)
  627. mtu: 1500 # Set MTU of the device in bytes
  628. # rss-hash-functions: 0x0 # advanced configuration option, use only if you use untested NIC card and experience RSS warnings,
  629. # For `rss-hash-functions` use hexadecimal 0x01ab format to specify RSS hash function flags - DumpRssFlags can help (you can see output if you use -vvv option during Suri startup)
  630. # setting auto to rss_hf sets the default RSS hash functions (based on IP addresses)
  631. # To approximately calculate required amount of space (in bytes) for interface's mempool: mempool-size * mtu
  632. # Make sure you have enough allocated hugepages.
  633. # The optimum size for the packet memory pool (in terms of memory usage) is power of two minus one: n = (2^q - 1)
  634. mempool-size: 65535 # The number of elements in the mbuf pool
  635. # Mempool cache size must be lower or equal to:
  636. # - RTE_MEMPOOL_CACHE_MAX_SIZE (by default 512) and
  637. # - "mempool-size / 1.5"
  638. # It is advised to choose cache_size to have "mempool-size modulo cache_size == 0".
  639. # If this is not the case, some elements will always stay in the pool and will never be used.
  640. # The cache can be disabled if the cache_size argument is set to 0, can be useful to avoid losing objects in cache
  641. # If the value is empty or set to "auto", Suricata will attempt to set cache size of the mempool to a value
  642. # that matches the previously mentioned recommendations
  643. mempool-cache-size: 257
  644. rx-descriptors: 1024
  645. tx-descriptors: 1024
  646. #
  647. # IPS mode for Suricata works in 3 modes - none, tap, ips
  648. # - none: IDS mode only - disables IPS functionality (does not further forward packets)
  649. # - tap: forwards all packets and generates alerts (omits DROP action) This is not DPDK TAP
  650. # - ips: the same as tap mode but it also drops packets that are flagged by rules to be dropped
  651. copy-mode: none
  652. copy-iface: none # or PCIe address of the second interface
  653. - interface: default
  654. threads: auto
  655. promisc: true
  656. multicast: true
  657. checksum-checks: true
  658. checksum-checks-offload: true
  659. mtu: 1500
  660. rss-hash-functions: auto
  661. mempool-size: 65535
  662. mempool-cache-size: 257
  663. rx-descriptors: 1024
  664. tx-descriptors: 1024
  665. copy-mode: none
  666. copy-iface: none
  667. # Cross platform libpcap capture support
  668. pcap:
  669. - interface: eth0
  670. # On Linux, pcap will try to use mmap'ed capture and will use "buffer-size"
  671. # as total memory used by the ring. So set this to something bigger
  672. # than 1% of your bandwidth.
  673. #buffer-size: 16777216
  674. #bpf-filter: "tcp and port 25"
  675. # Choose checksum verification mode for the interface. At the moment
  676. # of the capture, some packets may have an invalid checksum due to
  677. # the checksum computation being offloaded to the network card.
  678. # Possible values are:
  679. # - yes: checksum validation is forced
  680. # - no: checksum validation is disabled
  681. # - auto: Suricata uses a statistical approach to detect when
  682. # checksum off-loading is used. (default)
  683. # Warning: 'capture.checksum-validation' must be set to yes to have any validation
  684. #checksum-checks: auto
  685. # With some accelerator cards using a modified libpcap (like Myricom), you
  686. # may want to have the same number of capture threads as the number of capture
  687. # rings. In this case, set up the threads variable to N to start N threads
  688. # listening on the same interface.
  689. #threads: 16
  690. # set to no to disable promiscuous mode:
  691. #promisc: no
  692. # set snaplen, if not set it defaults to MTU if MTU can be known
  693. # via ioctl call and to full capture if not.
  694. #snaplen: 1518
  695. # Put default values here
  696. - interface: default
  697. #checksum-checks: auto
  698. # Settings for reading pcap files
  699. pcap-file:
  700. # Possible values are:
  701. # - yes: checksum validation is forced
  702. # - no: checksum validation is disabled
  703. # - auto: Suricata uses a statistical approach to detect when
  704. # checksum off-loading is used. (default)
  705. # Warning: 'checksum-validation' must be set to yes to have checksum tested
  706. checksum-checks: auto
  707. # See "Advanced Capture Options" below for more options, including Netmap
  708. # and PF_RING.
  709. ##
  710. ## Step 4: App Layer Protocol configuration
  711. ##
  712. # Configure the app-layer parsers.
  713. #
  714. # The error-policy setting applies to all app-layer parsers. Values can be
  715. # "drop-flow", "pass-flow", "bypass", "drop-packet", "pass-packet", "reject" or
  716. # "ignore" (the default).
  717. #
  718. # The protocol's section details each protocol.
  719. #
  720. # The option "enabled" takes 3 values - "yes", "no", "detection-only".
  721. # "yes" enables both detection and the parser, "no" disables both, and
  722. # "detection-only" enables protocol detection only (parser disabled).
  723. app-layer:
  724. # error-policy: ignore
  725. protocols:
  726. telnet:
  727. enabled: yes
  728. rfb:
  729. enabled: yes
  730. detection-ports:
  731. dp: 5900, 5901, 5902, 5903, 5904, 5905, 5906, 5907, 5908, 5909
  732. mqtt:
  733. enabled: yes
  734. # max-msg-length: 1mb
  735. # subscribe-topic-match-limit: 100
  736. # unsubscribe-topic-match-limit: 100
  737. # Maximum number of live MQTT transactions per flow
  738. # max-tx: 4096
  739. krb5:
  740. enabled: yes
  741. bittorrent-dht:
  742. enabled: yes
  743. snmp:
  744. enabled: yes
  745. ike:
  746. enabled: yes
  747. tls:
  748. enabled: yes
  749. detection-ports:
  750. dp: 443
  751. # Generate JA3 fingerprint from client hello. If not specified it
  752. # will be disabled by default, but enabled if rules require it.
  753. #ja3-fingerprints: auto
  754. # What to do when the encrypted communications start:
  755. # - default: keep tracking TLS session, check for protocol anomalies,
  756. # inspect tls_* keywords. Disables inspection of unmodified
  757. # 'content' signatures.
  758. # - bypass: stop processing this flow as much as possible. No further
  759. # TLS parsing and inspection. Offload flow bypass to kernel
  760. # or hardware if possible.
  761. # - full: keep tracking and inspection as normal. Unmodified content
  762. # keyword signatures are inspected as well.
  763. #
  764. # For best performance, select 'bypass'.
  765. #
  766. #encryption-handling: default
  767. pgsql:
  768. enabled: no
  769. # Stream reassembly size for PostgreSQL. By default, track it completely.
  770. stream-depth: 0
  771. # Maximum number of live PostgreSQL transactions per flow
  772. # max-tx: 1024
  773. dcerpc:
  774. enabled: yes
  775. ftp:
  776. enabled: yes
  777. # memcap: 64mb
  778. rdp:
  779. #enabled: yes
  780. ssh:
  781. enabled: yes
  782. #hassh: yes
  783. http2:
  784. enabled: yes
  785. # Maximum number of live HTTP2 streams in a flow
  786. #max-streams: 4096
  787. # Maximum headers table size
  788. #max-table-size: 65536
  789. smtp:
  790. enabled: yes
  791. raw-extraction: no
  792. # Configure SMTP-MIME Decoder
  793. mime:
  794. # Decode MIME messages from SMTP transactions
  795. # (may be resource intensive)
  796. # This field supersedes all others because it turns the entire
  797. # process on or off
  798. decode-mime: yes
  799. # Decode MIME entity bodies (ie. Base64, quoted-printable, etc.)
  800. decode-base64: yes
  801. decode-quoted-printable: yes
  802. # Maximum bytes per header data value stored in the data structure
  803. # (default is 2000)
  804. header-value-depth: 2000
  805. # Extract URLs and save in state data structure
  806. extract-urls: yes
  807. # Scheme of URLs to extract
  808. # (default is [http])
  809. #extract-urls-schemes: [http, https, ftp, mailto]
  810. # Log the scheme of URLs that are extracted
  811. # (default is no)
  812. #log-url-scheme: yes
  813. # Set to yes to compute the md5 of the mail body. You will then
  814. # be able to journalize it.
  815. body-md5: no
  816. # Configure inspected-tracker for file_data keyword
  817. inspected-tracker:
  818. content-limit: 100000
  819. content-inspect-min-size: 32768
  820. content-inspect-window: 4096
  821. imap:
  822. enabled: detection-only
  823. smb:
  824. enabled: yes
  825. detection-ports:
  826. dp: 139, 445
  827. # Stream reassembly size for SMB streams. By default track it completely.
  828. #stream-depth: 0
  829. nfs:
  830. enabled: yes
  831. # max-tx: 1024
  832. tftp:
  833. enabled: yes
  834. dns:
  835. tcp:
  836. enabled: yes
  837. detection-ports:
  838. dp: 53
  839. udp:
  840. enabled: yes
  841. detection-ports:
  842. dp: 53
  843. http:
  844. enabled: yes
  845. # Byte Range Containers default settings
  846. # byterange:
  847. # memcap: 100mb
  848. # timeout: 60
  849. # memcap: Maximum memory capacity for HTTP
  850. # Default is unlimited, values can be 64mb, e.g.
  851. # default-config: Used when no server-config matches
  852. # personality: List of personalities used by default
  853. # request-body-limit: Limit reassembly of request body for inspection
  854. # by http_client_body & pcre /P option.
  855. # response-body-limit: Limit reassembly of response body for inspection
  856. # by file_data, http_server_body & pcre /Q option.
  857. #
  858. # For advanced options, see the user guide
  859. # server-config: List of server configurations to use if address matches
  860. # address: List of IP addresses or networks for this block
  861. # personality: List of personalities used by this block
  862. #
  863. # Then, all the fields from default-config can be overloaded
  864. #
  865. # Currently Available Personalities:
  866. # Minimal, Generic, IDS (default), IIS_4_0, IIS_5_0, IIS_5_1, IIS_6_0,
  867. # IIS_7_0, IIS_7_5, Apache_2
  868. libhtp:
  869. default-config:
  870. personality: IDS
  871. # Can be specified in kb, mb, gb. Just a number indicates
  872. # it's in bytes.
  873. request-body-limit: 100kb
  874. response-body-limit: 100kb
  875. # inspection limits
  876. request-body-minimal-inspect-size: 32kb
  877. request-body-inspect-window: 4kb
  878. response-body-minimal-inspect-size: 40kb
  879. response-body-inspect-window: 16kb
  880. # response body decompression (0 disables)
  881. response-body-decompress-layer-limit: 2
  882. # auto will use http-body-inline mode in IPS mode, yes or no set it statically
  883. http-body-inline: auto
  884. # Decompress SWF files. Disabled by default.
  885. # Two types: 'deflate', 'lzma', 'both' will decompress deflate and lzma
  886. # compress-depth:
  887. # Specifies the maximum amount of data to decompress,
  888. # set 0 for unlimited.
  889. # decompress-depth:
  890. # Specifies the maximum amount of decompressed data to obtain,
  891. # set 0 for unlimited.
  892. swf-decompression:
  893. enabled: no
  894. type: both
  895. compress-depth: 100kb
  896. decompress-depth: 100kb
  897. # Use a random value for inspection sizes around the specified value.
  898. # This lowers the risk of some evasion techniques but could lead
  899. # to detection change between runs. It is set to 'yes' by default.
  900. #randomize-inspection-sizes: yes
  901. # If "randomize-inspection-sizes" is active, the value of various
  902. # inspection size will be chosen from the [1 - range%, 1 + range%]
  903. # range
  904. # Default value of "randomize-inspection-range" is 10.
  905. #randomize-inspection-range: 10
  906. # decoding
  907. double-decode-path: no
  908. double-decode-query: no
  909. # Can enable LZMA decompression
  910. #lzma-enabled: false
  911. # Memory limit usage for LZMA decompression dictionary
  912. # Data is decompressed until dictionary reaches this size
  913. #lzma-memlimit: 1mb
  914. # Maximum decompressed size with a compression ratio
  915. # above 2048 (only LZMA can reach this ratio, deflate cannot)
  916. #compression-bomb-limit: 1mb
  917. # Maximum time spent decompressing a single transaction in usec
  918. #decompression-time-limit: 100000
  919. server-config:
  920. #- apache:
  921. # address: [192.168.1.0/24, 127.0.0.0/8, "::1"]
  922. # personality: Apache_2
  923. # # Can be specified in kb, mb, gb. Just a number indicates
  924. # # it's in bytes.
  925. # request-body-limit: 4096
  926. # response-body-limit: 4096
  927. # double-decode-path: no
  928. # double-decode-query: no
  929. #- iis7:
  930. # address:
  931. # - 192.168.0.0/24
  932. # - 192.168.10.0/24
  933. # personality: IIS_7_0
  934. # # Can be specified in kb, mb, gb. Just a number indicates
  935. # # it's in bytes.
  936. # request-body-limit: 4096
  937. # response-body-limit: 4096
  938. # double-decode-path: no
  939. # double-decode-query: no
  940. # Note: Modbus probe parser is minimalist due to the limited usage in the field.
  941. # Only Modbus message length (greater than Modbus header length)
  942. # and protocol ID (equal to 0) are checked in probing parser
  943. # It is important to enable detection port and define Modbus port
  944. # to avoid false positives
  945. modbus:
  946. # How many unanswered Modbus requests are considered a flood.
  947. # If the limit is reached, the app-layer-event:modbus.flooded; will match.
  948. #request-flood: 500
  949. enabled: no
  950. detection-ports:
  951. dp: 502
  952. # According to MODBUS Messaging on TCP/IP Implementation Guide V1.0b, it
  953. # is recommended to keep the TCP connection opened with a remote device
  954. # and not to open and close it for each MODBUS/TCP transaction. In that
  955. # case, it is important to set the depth of the stream reassembling as
  956. # unlimited (stream.reassembly.depth: 0)
  957. # Stream reassembly size for modbus. By default track it completely.
  958. stream-depth: 0
  959. # DNP3
  960. dnp3:
  961. enabled: no
  962. detection-ports:
  963. dp: 20000
  964. # SCADA EtherNet/IP and CIP protocol support
  965. enip:
  966. enabled: no
  967. detection-ports:
  968. dp: 44818
  969. sp: 44818
  970. ntp:
  971. enabled: yes
  972. quic:
  973. enabled: yes
  974. dhcp:
  975. enabled: yes
  976. sip:
  977. #enabled: yes
  978. # Limit for the maximum number of asn1 frames to decode (default 256)
  979. asn1-max-frames: 256
  980. # Datasets default settings
  981. # datasets:
  982. # # Default fallback memcap and hashsize values for datasets in case these
  983. # # were not explicitly defined.
  984. # defaults:
  985. # memcap: 100mb
  986. # hashsize: 2048
  987. ##############################################################################
  988. ##
  989. ## Advanced settings below
  990. ##
  991. ##############################################################################
  992. ##
  993. ## Run Options
  994. ##
  995. # Run Suricata with a specific user-id and group-id:
  996. #run-as:
  997. # user: suri
  998. # group: suri
  999. security:
  1000. # if true, prevents process creation from Suricata by calling
  1001. # setrlimit(RLIMIT_NPROC, 0)
  1002. limit-noproc: true
  1003. # Use landlock security module under Linux
  1004. landlock:
  1005. enabled: no
  1006. directories:
  1007. #write:
  1008. # - @e_rundir@
  1009. # /usr and /etc folders are added to read list to allow
  1010. # file magic to be used.
  1011. read:
  1012. - /usr/
  1013. - /etc/
  1014. - @e_sysconfdir@
  1015. # Some logging modules will use that name in event as identifier. The default
  1016. # value is the hostname
  1017. #sensor-name: suricata
  1018. # Default location of the pid file. The pid file is only used in
  1019. # daemon mode (start Suricata with -D). If not running in daemon mode
  1020. # the --pidfile command line option must be used to create a pid file.
  1021. #pid-file: @e_rundir@suricata.pid
  1022. # Daemon working directory
  1023. # Suricata will change directory to this one if provided
  1024. # Default: "/"
  1025. #daemon-directory: "/"
  1026. # Umask.
  1027. # Suricata will use this umask if it is provided. By default it will use the
  1028. # umask passed on by the shell.
  1029. #umask: 022
  1030. # Suricata core dump configuration. Limits the size of the core dump file to
  1031. # approximately max-dump. The actual core dump size will be a multiple of the
  1032. # page size. Core dumps that would be larger than max-dump are truncated. On
  1033. # Linux, the actual core dump size may be a few pages larger than max-dump.
  1034. # Setting max-dump to 0 disables core dumping.
  1035. # Setting max-dump to 'unlimited' will give the full core dump file.
  1036. # On 32-bit Linux, a max-dump value >= ULONG_MAX may cause the core dump size
  1037. # to be 'unlimited'.
  1038. coredump:
  1039. max-dump: unlimited
  1040. # If the Suricata box is a router for the sniffed networks, set it to 'router'. If
  1041. # it is a pure sniffing setup, set it to 'sniffer-only'.
  1042. # If set to auto, the variable is internally switched to 'router' in IPS mode
  1043. # and 'sniffer-only' in IDS mode.
  1044. # This feature is currently only used by the reject* keywords.
  1045. host-mode: auto
  1046. # Number of packets preallocated per thread. The default is 1024. A higher number
  1047. # will make sure each CPU will be more easily kept busy, but may negatively
  1048. # impact caching.
  1049. #max-pending-packets: 1024
  1050. # Runmode the engine should use. Please check --list-runmodes to get the available
  1051. # runmodes for each packet acquisition method. Default depends on selected capture
  1052. # method. 'workers' generally gives best performance.
  1053. #runmode: autofp
  1054. # Specifies the kind of flow load balancer used by the flow pinned autofp mode.
  1055. #
  1056. # Supported schedulers are:
  1057. #
  1058. # hash - Flow assigned to threads using the 5-7 tuple hash.
  1059. # ippair - Flow assigned to threads using addresses only.
  1060. #
  1061. #autofp-scheduler: hash
  1062. # Preallocated size for each packet. Default is 1514 which is the classical
  1063. # size for pcap on Ethernet. You should adjust this value to the highest
  1064. # packet size (MTU + hardware header) on your system.
  1065. #default-packet-size: 1514
  1066. # Unix command socket that can be used to pass commands to Suricata.
  1067. # An external tool can then connect to get information from Suricata
  1068. # or trigger some modifications of the engine. Set enabled to yes
  1069. # to activate the feature. In auto mode, the feature will only be
  1070. # activated in live capture mode. You can use the filename variable to set
  1071. # the file name of the socket.
  1072. unix-command:
  1073. enabled: auto
  1074. #filename: custom.socket
  1075. # Magic file. The extension .mgc is added to the value here.
  1076. #magic-file: /usr/share/file/magic
  1077. @e_magic_file_comment@magic-file: @e_magic_file@
  1078. # GeoIP2 database file. Specify path and filename of GeoIP2 database
  1079. # if using rules with "geoip" rule option.
  1080. #geoip-database: /usr/local/share/GeoLite2/GeoLite2-Country.mmdb
  1081. legacy:
  1082. uricontent: enabled
  1083. ##
  1084. ## Detection settings
  1085. ##
  1086. # Set the order of alerts based on actions
  1087. # The default order is pass, drop, reject, alert
  1088. # action-order:
  1089. # - pass
  1090. # - drop
  1091. # - reject
  1092. # - alert
  1093. # Define maximum number of possible alerts that can be triggered for the same
  1094. # packet. Default is 15
  1095. #packet-alert-max: 15
  1096. # IP Reputation
  1097. #reputation-categories-file: @e_sysconfdir@iprep/categories.txt
  1098. #default-reputation-path: @e_sysconfdir@iprep
  1099. #reputation-files:
  1100. # - reputation.list
  1101. # When run with the option --engine-analysis, the engine will read each of
  1102. # the parameters below, and print reports for each of the enabled sections
  1103. # and exit. The reports are printed to a file in the default log dir
  1104. # given by the parameter "default-log-dir", with engine reporting
  1105. # subsection below printing reports in its own report file.
  1106. engine-analysis:
  1107. # enables printing reports for fast-pattern for every rule.
  1108. rules-fast-pattern: yes
  1109. # enables printing reports for each rule
  1110. rules: yes
  1111. #recursion and match limits for PCRE where supported
  1112. pcre:
  1113. match-limit: 3500
  1114. match-limit-recursion: 1500
  1115. ##
  1116. ## Advanced Traffic Tracking and Reconstruction Settings
  1117. ##
  1118. # Host specific policies for defragmentation and TCP stream
  1119. # reassembly. The host OS lookup is done using a radix tree, just
  1120. # like a routing table so the most specific entry matches.
  1121. host-os-policy:
  1122. # Make the default policy windows.
  1123. windows: [0.0.0.0/0]
  1124. bsd: []
  1125. bsd-right: []
  1126. old-linux: []
  1127. linux: []
  1128. old-solaris: []
  1129. solaris: []
  1130. hpux10: []
  1131. hpux11: []
  1132. irix: []
  1133. macos: []
  1134. vista: []
  1135. windows2k3: []
  1136. # Defrag settings:
  1137. # The memcap-policy value can be "drop-flow", "pass-flow", "bypass",
  1138. # "drop-packet", "pass-packet", "reject" or "ignore" (which is the default).
  1139. defrag:
  1140. memcap: 32mb
  1141. # memcap-policy: ignore
  1142. hash-size: 65536
  1143. trackers: 65535 # number of defragmented flows to follow
  1144. max-frags: 65535 # number of fragments to keep (higher than trackers)
  1145. prealloc: yes
  1146. timeout: 60
  1147. # Enable defrag per host settings
  1148. # host-config:
  1149. #
  1150. # - dmz:
  1151. # timeout: 30
  1152. # address: [192.168.1.0/24, 127.0.0.0/8, 1.1.1.0/24, 2.2.2.0/24, "1.1.1.1", "2.2.2.2", "::1"]
  1153. #
  1154. # - lan:
  1155. # timeout: 45
  1156. # address:
  1157. # - 192.168.0.0/24
  1158. # - 192.168.10.0/24
  1159. # - 172.16.14.0/24
  1160. # Flow settings:
  1161. # By default, the reserved memory (memcap) for flows is 32MB. This is the limit
  1162. # for flow allocation inside the engine. You can change this value to allow
  1163. # more memory usage for flows.
  1164. # The hash-size determines the size of the hash used to identify flows inside
  1165. # the engine, and by default the value is 65536.
  1166. # At startup, the engine can preallocate a number of flows, to get better
  1167. # performance. The number of flows preallocated is 10000 by default.
  1168. # emergency-recovery is the percentage of flows that the engine needs to
  1169. # prune before clearing the emergency state. The emergency state is activated
  1170. # when the memcap limit is reached, allowing new flows to be created, but
  1171. # pruning them with the emergency timeouts (they are defined below).
  1172. # If the memcap is reached, the engine will try to prune flows
  1173. # with the default timeouts. If it doesn't find a flow to prune, it will set
  1174. # the emergency bit and it will try again with more aggressive timeouts.
  1175. # If that doesn't work, then it will try to kill the oldest flows using
  1176. # last time seen flows.
  1177. # The memcap can be specified in kb, mb, gb. Just a number indicates it's
  1178. # in bytes.
  1179. # The memcap-policy can be "drop-flow", "pass-flow", "bypass", "drop-packet",
  1180. # "pass-packet", "reject" or "ignore" (which is the default).
  1181. flow:
  1182. memcap: 128mb
  1183. #memcap-policy: ignore
  1184. hash-size: 65536
  1185. prealloc: 10000
  1186. emergency-recovery: 30
  1187. #managers: 1 # default to one flow manager
  1188. #recyclers: 1 # default to one flow recycler thread
  1189. # This option controls the use of VLAN ids in the flow (and defrag)
  1190. # hashing. Normally this should be enabled, but in some (broken)
  1191. # setups where both sides of a flow are not tagged with the same VLAN
  1192. # tag, we can ignore the VLAN id's in the flow hashing.
  1193. vlan:
  1194. use-for-tracking: true
  1195. # Specific timeouts for flows. Here you can specify the timeouts that the
  1196. # active flows will wait to transit from the current state to another, on each
  1197. # protocol. The value of "new" determines the seconds to wait after a handshake or
  1198. # stream startup before the engine frees the data of that flow it doesn't
  1199. # change the state to established (usually if we don't receive more packets
  1200. # of that flow). The value of "established" is the amount of
  1201. # seconds that the engine will wait to free the flow if that time elapses
  1202. # without receiving new packets or closing the connection. "closed" is the
  1203. # amount of time to wait after a flow is closed (usually zero). "bypassed"
  1204. # timeout controls locally bypassed flows. For these flows we don't do any other
  1205. # tracking. If no packets have been seen after this timeout, the flow is discarded.
  1206. #
  1207. # There's an emergency mode that will become active under attack circumstances,
  1208. # making the engine to check flow status faster. This configuration variables
  1209. # use the prefix "emergency-" and work similar as the normal ones.
  1210. # Some timeouts doesn't apply to all the protocols, like "closed", for udp and
  1211. # icmp.
  1212. flow-timeouts:
  1213. default:
  1214. new: 30
  1215. established: 300
  1216. closed: 0
  1217. bypassed: 100
  1218. emergency-new: 10
  1219. emergency-established: 100
  1220. emergency-closed: 0
  1221. emergency-bypassed: 50
  1222. tcp:
  1223. new: 60
  1224. established: 600
  1225. closed: 60
  1226. bypassed: 100
  1227. emergency-new: 5
  1228. emergency-established: 100
  1229. emergency-closed: 10
  1230. emergency-bypassed: 50
  1231. udp:
  1232. new: 30
  1233. established: 300
  1234. bypassed: 100
  1235. emergency-new: 10
  1236. emergency-established: 100
  1237. emergency-bypassed: 50
  1238. icmp:
  1239. new: 30
  1240. established: 300
  1241. bypassed: 100
  1242. emergency-new: 10
  1243. emergency-established: 100
  1244. emergency-bypassed: 50
  1245. # Stream engine settings. Here the TCP stream tracking and reassembly
  1246. # engine is configured.
  1247. #
  1248. # stream:
  1249. # memcap: 64mb # Can be specified in kb, mb, gb. Just a
  1250. # # number indicates it's in bytes.
  1251. # memcap-policy: ignore # Can be "drop-flow", "pass-flow", "bypass",
  1252. # # "drop-packet", "pass-packet", "reject" or
  1253. # # "ignore" default is "ignore"
  1254. # checksum-validation: yes # To validate the checksum of received
  1255. # # packet. If csum validation is specified as
  1256. # # "yes", then packets with invalid csum values will not
  1257. # # be processed by the engine stream/app layer.
  1258. # # Warning: locally generated traffic can be
  1259. # # generated without checksum due to hardware offload
  1260. # # of checksum. You can control the handling of checksum
  1261. # # on a per-interface basis via the 'checksum-checks'
  1262. # # option
  1263. # prealloc-sessions: 2048 # 2k sessions prealloc'd per stream thread
  1264. # midstream: false # don't allow midstream session pickups
  1265. # midstream-policy: ignore # Can be "drop-flow", "pass-flow", "bypass",
  1266. # # "drop-packet", "pass-packet", "reject" or
  1267. # # "ignore" default is "ignore"
  1268. # async-oneside: false # don't enable async stream handling
  1269. # inline: no # stream inline mode
  1270. # drop-invalid: yes # in inline mode, drop packets that are invalid with regards to streaming engine
  1271. # max-synack-queued: 5 # Max different SYN/ACKs to queue
  1272. # bypass: no # Bypass packets when stream.reassembly.depth is reached.
  1273. # # Warning: first side to reach this triggers
  1274. # # the bypass.
  1275. #
  1276. # reassembly:
  1277. # memcap: 256mb # Can be specified in kb, mb, gb. Just a number
  1278. # # indicates it's in bytes.
  1279. # memcap-policy: ignore # Can be "drop-flow", "pass-flow", "bypass",
  1280. # # "drop-packet", "pass-packet", "reject" or
  1281. # # "ignore" default is "ignore"
  1282. # depth: 1mb # Can be specified in kb, mb, gb. Just a number
  1283. # # indicates it's in bytes.
  1284. # toserver-chunk-size: 2560 # inspect raw stream in chunks of at least
  1285. # # this size. Can be specified in kb, mb,
  1286. # # gb. Just a number indicates it's in bytes.
  1287. # toclient-chunk-size: 2560 # inspect raw stream in chunks of at least
  1288. # # this size. Can be specified in kb, mb,
  1289. # # gb. Just a number indicates it's in bytes.
  1290. # randomize-chunk-size: yes # Take a random value for chunk size around the specified value.
  1291. # # This lowers the risk of some evasion techniques but could lead
  1292. # # to detection change between runs. It is set to 'yes' by default.
  1293. # randomize-chunk-range: 10 # If randomize-chunk-size is active, the value of chunk-size is
  1294. # # a random value between (1 - randomize-chunk-range/100)*toserver-chunk-size
  1295. # # and (1 + randomize-chunk-range/100)*toserver-chunk-size and the same
  1296. # # calculation for toclient-chunk-size.
  1297. # # Default value of randomize-chunk-range is 10.
  1298. #
  1299. # raw: yes # 'Raw' reassembly enabled or disabled.
  1300. # # raw is for content inspection by detection
  1301. # # engine.
  1302. #
  1303. # segment-prealloc: 2048 # number of segments preallocated per thread
  1304. #
  1305. # check-overlap-different-data: true|false
  1306. # # check if a segment contains different data
  1307. # # than what we've already seen for that
  1308. # # position in the stream.
  1309. # # This is enabled automatically if inline mode
  1310. # # is used or when stream-event:reassembly_overlap_different_data;
  1311. # # is used in a rule.
  1312. #
  1313. stream:
  1314. memcap: 64mb
  1315. #memcap-policy: ignore
  1316. checksum-validation: yes # reject incorrect csums
  1317. #midstream: false
  1318. #midstream-policy: ignore
  1319. inline: auto # auto will use inline mode in IPS mode, yes or no set it statically
  1320. reassembly:
  1321. memcap: 256mb
  1322. #memcap-policy: ignore
  1323. depth: 1mb # reassemble 1mb into a stream
  1324. toserver-chunk-size: 2560
  1325. toclient-chunk-size: 2560
  1326. randomize-chunk-size: yes
  1327. #randomize-chunk-range: 10
  1328. #raw: yes
  1329. #segment-prealloc: 2048
  1330. #check-overlap-different-data: true
  1331. # Host table:
  1332. #
  1333. # Host table is used by the tagging and per host thresholding subsystems.
  1334. #
  1335. host:
  1336. hash-size: 4096
  1337. prealloc: 1000
  1338. memcap: 32mb
  1339. # IP Pair table:
  1340. #
  1341. # Used by xbits 'ippair' tracking.
  1342. #
  1343. #ippair:
  1344. # hash-size: 4096
  1345. # prealloc: 1000
  1346. # memcap: 32mb
  1347. # Decoder settings
  1348. decoder:
  1349. # Teredo decoder is known to not be completely accurate
  1350. # as it will sometimes detect non-teredo as teredo.
  1351. teredo:
  1352. enabled: true
  1353. # ports to look for Teredo. Max 4 ports. If no ports are given, or
  1354. # the value is set to 'any', Teredo detection runs on _all_ UDP packets.
  1355. ports: $TEREDO_PORTS # syntax: '[3544, 1234]' or '3533' or 'any'.
  1356. # VXLAN decoder is assigned to up to 4 UDP ports. By default only the
  1357. # IANA assigned port 4789 is enabled.
  1358. vxlan:
  1359. enabled: true
  1360. ports: $VXLAN_PORTS # syntax: '[8472, 4789]' or '4789'.
  1361. # Geneve decoder is assigned to up to 4 UDP ports. By default only the
  1362. # IANA assigned port 6081 is enabled.
  1363. geneve:
  1364. enabled: true
  1365. ports: $GENEVE_PORTS # syntax: '[6081, 1234]' or '6081'.
  1366. # maximum number of decoder layers for a packet
  1367. # max-layers: 16
  1368. ##
  1369. ## Performance tuning and profiling
  1370. ##
  1371. # The detection engine builds internal groups of signatures. The engine
  1372. # allows us to specify the profile to use for them, to manage memory in an
  1373. # efficient way keeping good performance. For the profile keyword you
  1374. # can use the words "low", "medium", "high" or "custom". If you use custom,
  1375. # make sure to define the values in the "custom-values" section.
  1376. # Usually you would prefer medium/high/low.
  1377. #
  1378. # "sgh mpm-context", indicates how the staging should allot mpm contexts for
  1379. # the signature groups. "single" indicates the use of a single context for
  1380. # all the signature group heads. "full" indicates a mpm-context for each
  1381. # group head. "auto" lets the engine decide the distribution of contexts
  1382. # based on the information the engine gathers on the patterns from each
  1383. # group head.
  1384. #
  1385. # The option inspection-recursion-limit is used to limit the recursive calls
  1386. # in the content inspection code. For certain payload-sig combinations, we
  1387. # might end up taking too much time in the content inspection code.
  1388. # If the argument specified is 0, the engine uses an internally defined
  1389. # default limit. When a value is not specified, there are no limits on the recursion.
  1390. detect:
  1391. profile: medium
  1392. custom-values:
  1393. toclient-groups: 3
  1394. toserver-groups: 25
  1395. sgh-mpm-context: auto
  1396. inspection-recursion-limit: 3000
  1397. # If set to yes, the loading of signatures will be made after the capture
  1398. # is started. This will limit the downtime in IPS mode.
  1399. #delayed-detect: yes
  1400. prefilter:
  1401. # default prefiltering setting. "mpm" only creates MPM/fast_pattern
  1402. # engines. "auto" also sets up prefilter engines for other keywords.
  1403. # Use --list-keywords=all to see which keywords support prefiltering.
  1404. default: mpm
  1405. # the grouping values above control how many groups are created per
  1406. # direction. Port whitelisting forces that port to get its own group.
  1407. # Very common ports will benefit, as well as ports with many expensive
  1408. # rules.
  1409. grouping:
  1410. #tcp-whitelist: 53, 80, 139, 443, 445, 1433, 3306, 3389, 6666, 6667, 8080
  1411. #udp-whitelist: 53, 135, 5060
  1412. profiling:
  1413. # Log the rules that made it past the prefilter stage, per packet
  1414. # default is off. The threshold setting determines how many rules
  1415. # must have made it past pre-filter for that rule to trigger the
  1416. # logging.
  1417. #inspect-logging-threshold: 200
  1418. grouping:
  1419. dump-to-disk: false
  1420. include-rules: false # very verbose
  1421. include-mpm-stats: false
  1422. # Select the multi pattern algorithm you want to run for scan/search the
  1423. # in the engine.
  1424. #
  1425. # The supported algorithms are:
  1426. # "ac" - Aho-Corasick, default implementation
  1427. # "ac-bs" - Aho-Corasick, reduced memory implementation
  1428. # "ac-ks" - Aho-Corasick, "Ken Steele" variant
  1429. # "hs" - Hyperscan, available when built with Hyperscan support
  1430. #
  1431. # The default mpm-algo value of "auto" will use "hs" if Hyperscan is
  1432. # available, "ac" otherwise.
  1433. #
  1434. # The mpm you choose also decides the distribution of mpm contexts for
  1435. # signature groups, specified by the conf - "detect.sgh-mpm-context".
  1436. # Selecting "ac" as the mpm would require "detect.sgh-mpm-context"
  1437. # to be set to "single", because of ac's memory requirements, unless the
  1438. # ruleset is small enough to fit in memory, in which case one can
  1439. # use "full" with "ac". The rest of the mpms can be run in "full" mode.
  1440. mpm-algo: auto
  1441. # Select the matching algorithm you want to use for single-pattern searches.
  1442. #
  1443. # Supported algorithms are "bm" (Boyer-Moore) and "hs" (Hyperscan, only
  1444. # available if Suricata has been built with Hyperscan support).
  1445. #
  1446. # The default of "auto" will use "hs" if available, otherwise "bm".
  1447. spm-algo: auto
  1448. # Suricata is multi-threaded. Here the threading can be influenced.
  1449. threading:
  1450. set-cpu-affinity: no
  1451. # Tune cpu affinity of threads. Each family of threads can be bound
  1452. # to specific CPUs.
  1453. #
  1454. # These 2 apply to the all runmodes:
  1455. # management-cpu-set is used for flow timeout handling, counters
  1456. # worker-cpu-set is used for 'worker' threads
  1457. #
  1458. # Additionally, for autofp these apply:
  1459. # receive-cpu-set is used for capture threads
  1460. # verdict-cpu-set is used for IPS verdict threads
  1461. #
  1462. cpu-affinity:
  1463. - management-cpu-set:
  1464. cpu: [ 0 ] # include only these CPUs in affinity settings
  1465. - receive-cpu-set:
  1466. cpu: [ 0 ] # include only these CPUs in affinity settings
  1467. - worker-cpu-set:
  1468. cpu: [ "all" ]
  1469. mode: "exclusive"
  1470. # Use explicitly 3 threads and don't compute number by using
  1471. # detect-thread-ratio variable:
  1472. # threads: 3
  1473. prio:
  1474. low: [ 0 ]
  1475. medium: [ "1-2" ]
  1476. high: [ 3 ]
  1477. default: "medium"
  1478. #- verdict-cpu-set:
  1479. # cpu: [ 0 ]
  1480. # prio:
  1481. # default: "high"
  1482. #
  1483. # By default Suricata creates one "detect" thread per available CPU/CPU core.
  1484. # This setting allows controlling this behaviour. A ratio setting of 2 will
  1485. # create 2 detect threads for each CPU/CPU core. So for a dual core CPU this
  1486. # will result in 4 detect threads. If values below 1 are used, less threads
  1487. # are created. So on a dual core CPU a setting of 0.5 results in 1 detect
  1488. # thread being created. Regardless of the setting at a minimum 1 detect
  1489. # thread will always be created.
  1490. #
  1491. detect-thread-ratio: 1.0
  1492. #
  1493. # By default, the per-thread stack size is left to its default setting. If
  1494. # the default thread stack size is too small, use the following configuration
  1495. # setting to change the size. Note that if any thread's stack size cannot be
  1496. # set to this value, a fatal error occurs.
  1497. #
  1498. # Generally, the per-thread stack-size should not exceed 8MB.
  1499. #stack-size: 8mb
  1500. # Luajit has a strange memory requirement, its 'states' need to be in the
  1501. # first 2G of the process' memory.
  1502. #
  1503. # 'luajit.states' is used to control how many states are preallocated.
  1504. # State use: per detect script: 1 per detect thread. Per output script: 1 per
  1505. # script.
  1506. luajit:
  1507. states: 128
  1508. # Profiling settings. Only effective if Suricata has been built with
  1509. # the --enable-profiling configure flag.
  1510. #
  1511. profiling:
  1512. # Run profiling for every X-th packet. The default is 1, which means we
  1513. # profile every packet. If set to 1000, one packet is profiled for every
  1514. # 1000 received.
  1515. #sample-rate: 1000
  1516. # rule profiling
  1517. rules:
  1518. # Profiling can be disabled here, but it will still have a
  1519. # performance impact if compiled in.
  1520. enabled: yes
  1521. filename: rule_perf.log
  1522. append: yes
  1523. # Sort options: ticks, avgticks, checks, matches, maxticks
  1524. # If commented out all the sort options will be used.
  1525. #sort: avgticks
  1526. # Limit the number of sids for which stats are shown at exit (per sort).
  1527. limit: 10
  1528. # output to json
  1529. json: @e_enable_evelog@
  1530. # per keyword profiling
  1531. keywords:
  1532. enabled: yes
  1533. filename: keyword_perf.log
  1534. append: yes
  1535. prefilter:
  1536. enabled: yes
  1537. filename: prefilter_perf.log
  1538. append: yes
  1539. # per rulegroup profiling
  1540. rulegroups:
  1541. enabled: yes
  1542. filename: rule_group_perf.log
  1543. append: yes
  1544. # packet profiling
  1545. packets:
  1546. # Profiling can be disabled here, but it will still have a
  1547. # performance impact if compiled in.
  1548. enabled: yes
  1549. filename: packet_stats.log
  1550. append: yes
  1551. # per packet csv output
  1552. csv:
  1553. # Output can be disabled here, but it will still have a
  1554. # performance impact if compiled in.
  1555. enabled: no
  1556. filename: packet_stats.csv
  1557. # profiling of locking. Only available when Suricata was built with
  1558. # --enable-profiling-locks.
  1559. locks:
  1560. enabled: no
  1561. filename: lock_stats.log
  1562. append: yes
  1563. pcap-log:
  1564. enabled: no
  1565. filename: pcaplog_stats.log
  1566. append: yes
  1567. ##
  1568. ## Netfilter integration
  1569. ##
  1570. # When running in NFQ inline mode, it is possible to use a simulated
  1571. # non-terminal NFQUEUE verdict.
  1572. # This permits sending all needed packet to Suricata via this rule:
  1573. # iptables -I FORWARD -m mark ! --mark $MARK/$MASK -j NFQUEUE
  1574. # And below, you can have your standard filtering ruleset. To activate
  1575. # this mode, you need to set mode to 'repeat'
  1576. # If you want a packet to be sent to another queue after an ACCEPT decision
  1577. # set the mode to 'route' and set next-queue value.
  1578. # On Linux >= 3.1, you can set batchcount to a value > 1 to improve performance
  1579. # by processing several packets before sending a verdict (worker runmode only).
  1580. # On Linux >= 3.6, you can set the fail-open option to yes to have the kernel
  1581. # accept the packet if Suricata is not able to keep pace.
  1582. # bypass mark and mask can be used to implement NFQ bypass. If bypass mark is
  1583. # set then the NFQ bypass is activated. Suricata will set the bypass mark/mask
  1584. # on packet of a flow that need to be bypassed. The Nefilter ruleset has to
  1585. # directly accept all packets of a flow once a packet has been marked.
  1586. nfq:
  1587. # mode: accept
  1588. # repeat-mark: 1
  1589. # repeat-mask: 1
  1590. # bypass-mark: 1
  1591. # bypass-mask: 1
  1592. # route-queue: 2
  1593. # batchcount: 20
  1594. # fail-open: yes
  1595. #nflog support
  1596. nflog:
  1597. # netlink multicast group
  1598. # (the same as the iptables --nflog-group param)
  1599. # Group 0 is used by the kernel, so you can't use it
  1600. - group: 2
  1601. # netlink buffer size
  1602. buffer-size: 18432
  1603. # put default value here
  1604. - group: default
  1605. # set number of packets to queue inside kernel
  1606. qthreshold: 1
  1607. # set the delay before flushing packet in the kernel's queue
  1608. qtimeout: 100
  1609. # netlink max buffer size
  1610. max-size: 20000
  1611. ##
  1612. ## Advanced Capture Options
  1613. ##
  1614. # General settings affecting packet capture
  1615. capture:
  1616. # disable NIC offloading. It's restored when Suricata exits.
  1617. # Enabled by default.
  1618. #disable-offloading: false
  1619. #
  1620. # disable checksum validation. Same as setting '-k none' on the
  1621. # commandline.
  1622. #checksum-validation: none
  1623. # Netmap support
  1624. #
  1625. # Netmap operates with NIC directly in driver, so you need FreeBSD 11+ which has
  1626. # built-in Netmap support or compile and install the Netmap module and appropriate
  1627. # NIC driver for your Linux system.
  1628. # To reach maximum throughput disable all receive-, segmentation-,
  1629. # checksum- offloading on your NIC (using ethtool or similar).
  1630. # Disabling TX checksum offloading is *required* for connecting OS endpoint
  1631. # with NIC endpoint.
  1632. # You can find more information at https://github.com/luigirizzo/netmap
  1633. #
  1634. netmap:
  1635. # To specify OS endpoint add plus sign at the end (e.g. "eth0+")
  1636. - interface: eth2
  1637. # Number of capture threads. "auto" uses number of RSS queues on interface.
  1638. # Warning: unless the RSS hashing is symmetrical, this will lead to
  1639. # accuracy issues.
  1640. #threads: auto
  1641. # You can use the following variables to activate netmap tap or IPS mode.
  1642. # If copy-mode is set to ips or tap, the traffic coming to the current
  1643. # interface will be copied to the copy-iface interface. If 'tap' is set, the
  1644. # copy is complete. If 'ips' is set, the packet matching a 'drop' action
  1645. # will not be copied.
  1646. # To specify the OS as the copy-iface (so the OS can route packets, or forward
  1647. # to a service running on the same machine) add a plus sign at the end
  1648. # (e.g. "copy-iface: eth0+"). Don't forget to set up a symmetrical eth0+ -> eth0
  1649. # for return packets. Hardware checksumming must be *off* on the interface if
  1650. # using an OS endpoint (e.g. 'ifconfig eth0 -rxcsum -txcsum -rxcsum6 -txcsum6' for FreeBSD
  1651. # or 'ethtool -K eth0 tx off rx off' for Linux).
  1652. #copy-mode: tap
  1653. #copy-iface: eth3
  1654. # Set to yes to disable promiscuous mode
  1655. # disable-promisc: no
  1656. # Choose checksum verification mode for the interface. At the moment
  1657. # of the capture, some packets may have an invalid checksum due to
  1658. # the checksum computation being offloaded to the network card.
  1659. # Possible values are:
  1660. # - yes: checksum validation is forced
  1661. # - no: checksum validation is disabled
  1662. # - auto: Suricata uses a statistical approach to detect when
  1663. # checksum off-loading is used.
  1664. # Warning: 'checksum-validation' must be set to yes to have any validation
  1665. #checksum-checks: auto
  1666. # BPF filter to apply to this interface. The pcap filter syntax apply here.
  1667. #bpf-filter: port 80 or udp
  1668. #- interface: eth3
  1669. #threads: auto
  1670. #copy-mode: tap
  1671. #copy-iface: eth2
  1672. # Put default values here
  1673. - interface: default
  1674. # PF_RING configuration: for use with native PF_RING support
  1675. # for more info see http://www.ntop.org/products/pf_ring/
  1676. pfring:
  1677. - interface: eth0
  1678. # Number of receive threads. If set to 'auto' Suricata will first try
  1679. # to use CPU (core) count and otherwise RSS queue count.
  1680. threads: auto
  1681. # Default clusterid. PF_RING will load balance packets based on flow.
  1682. # All threads/processes that will participate need to have the same
  1683. # clusterid.
  1684. cluster-id: 99
  1685. # Default PF_RING cluster type. PF_RING can load balance per flow.
  1686. # Possible values are cluster_flow or cluster_round_robin.
  1687. cluster-type: cluster_flow
  1688. # bpf filter for this interface
  1689. #bpf-filter: tcp
  1690. # If bypass is set then the PF_RING hw bypass is activated, when supported
  1691. # by the network interface. Suricata will instruct the interface to bypass
  1692. # all future packets for a flow that need to be bypassed.
  1693. #bypass: yes
  1694. # Choose checksum verification mode for the interface. At the moment
  1695. # of the capture, some packets may have an invalid checksum due to
  1696. # the checksum computation being offloaded to the network card.
  1697. # Possible values are:
  1698. # - rxonly: only compute checksum for packets received by network card.
  1699. # - yes: checksum validation is forced
  1700. # - no: checksum validation is disabled
  1701. # - auto: Suricata uses a statistical approach to detect when
  1702. # checksum off-loading is used. (default)
  1703. # Warning: 'checksum-validation' must be set to yes to have any validation
  1704. #checksum-checks: auto
  1705. # Second interface
  1706. #- interface: eth1
  1707. # threads: 3
  1708. # cluster-id: 93
  1709. # cluster-type: cluster_flow
  1710. # Put default values here
  1711. - interface: default
  1712. #threads: 2
  1713. # For FreeBSD ipfw(8) divert(4) support.
  1714. # Please make sure you have ipfw_load="YES" and ipdivert_load="YES"
  1715. # in /etc/loader.conf or kldload'ing the appropriate kernel modules.
  1716. # Additionally, you need to have an ipfw rule for the engine to see
  1717. # the packets from ipfw. For Example:
  1718. #
  1719. # ipfw add 100 divert 8000 ip from any to any
  1720. #
  1721. # N.B. This example uses "8000" -- this number must mach the values
  1722. # you passed on the command line, i.e., -d 8000
  1723. #
  1724. ipfw:
  1725. # Reinject packets at the specified ipfw rule number. This config
  1726. # option is the ipfw rule number AT WHICH rule processing continues
  1727. # in the ipfw processing system after the engine has finished
  1728. # inspecting the packet for acceptance. If no rule number is specified,
  1729. # accepted packets are reinjected at the divert rule which they entered
  1730. # and IPFW rule processing continues. No check is done to verify
  1731. # this will rule makes sense so care must be taken to avoid loops in ipfw.
  1732. #
  1733. ## The following example tells the engine to reinject packets
  1734. # back into the ipfw firewall AT rule number 5500:
  1735. #
  1736. # ipfw-reinjection-rule-number: 5500
  1737. napatech:
  1738. # When use_all_streams is set to "yes" the initialization code will query
  1739. # the Napatech service for all configured streams and listen on all of them.
  1740. # When set to "no" the streams config array will be used.
  1741. #
  1742. # This option necessitates running the appropriate NTPL commands to create
  1743. # the desired streams prior to running Suricata.
  1744. #use-all-streams: no
  1745. # The streams to listen on when auto-config is disabled or when and threading
  1746. # cpu-affinity is disabled. This can be either:
  1747. # an individual stream (e.g. streams: [0])
  1748. # or
  1749. # a range of streams (e.g. streams: ["0-3"])
  1750. #
  1751. streams: ["0-3"]
  1752. # Stream stats can be enabled to provide fine grain packet and byte counters
  1753. # for each thread/stream that is configured.
  1754. #
  1755. enable-stream-stats: no
  1756. # When auto-config is enabled the streams will be created and assigned
  1757. # automatically to the NUMA node where the thread resides. If cpu-affinity
  1758. # is enabled in the threading section. Then the streams will be created
  1759. # according to the number of worker threads specified in the worker-cpu-set.
  1760. # Otherwise, the streams array is used to define the streams.
  1761. #
  1762. # This option is intended primarily to support legacy configurations.
  1763. #
  1764. # This option cannot be used simultaneously with either "use-all-streams"
  1765. # or "hardware-bypass".
  1766. #
  1767. auto-config: yes
  1768. # Enable hardware level flow bypass.
  1769. #
  1770. hardware-bypass: yes
  1771. # Enable inline operation. When enabled traffic arriving on a given port is
  1772. # automatically forwarded out its peer port after analysis by Suricata.
  1773. #
  1774. inline: no
  1775. # Ports indicates which Napatech ports are to be used in auto-config mode.
  1776. # these are the port IDs of the ports that will be merged prior to the
  1777. # traffic being distributed to the streams.
  1778. #
  1779. # When hardware-bypass is enabled the ports must be configured as a segment.
  1780. # specify the port(s) on which upstream and downstream traffic will arrive.
  1781. # This information is necessary for the hardware to properly process flows.
  1782. #
  1783. # When using a tap configuration one of the ports will receive inbound traffic
  1784. # for the network and the other will receive outbound traffic. The two ports on a
  1785. # given segment must reside on the same network adapter.
  1786. #
  1787. # When using a SPAN-port configuration the upstream and downstream traffic
  1788. # arrives on a single port. This is configured by setting the two sides of the
  1789. # segment to reference the same port. (e.g. 0-0 to configure a SPAN port on
  1790. # port 0).
  1791. #
  1792. # port segments are specified in the form:
  1793. # ports: [0-1,2-3,4-5,6-6,7-7]
  1794. #
  1795. # For legacy systems when hardware-bypass is disabled this can be specified in any
  1796. # of the following ways:
  1797. #
  1798. # a list of individual ports (e.g. ports: [0,1,2,3])
  1799. #
  1800. # a range of ports (e.g. ports: [0-3])
  1801. #
  1802. # "all" to indicate that all ports are to be merged together
  1803. # (e.g. ports: [all])
  1804. #
  1805. # This parameter has no effect if auto-config is disabled.
  1806. #
  1807. ports: [0-1,2-3]
  1808. # When auto-config is enabled the hashmode specifies the algorithm for
  1809. # determining to which stream a given packet is to be delivered.
  1810. # This can be any valid Napatech NTPL hashmode command.
  1811. #
  1812. # The most common hashmode commands are: hash2tuple, hash2tuplesorted,
  1813. # hash5tuple, hash5tuplesorted and roundrobin.
  1814. #
  1815. # See Napatech NTPL documentation other hashmodes and details on their use.
  1816. #
  1817. # This parameter has no effect if auto-config is disabled.
  1818. #
  1819. hashmode: hash5tuplesorted
  1820. ##
  1821. ## Configure Suricata to load Suricata-Update managed rules.
  1822. ##
  1823. default-rule-path: @e_defaultruledir@
  1824. rule-files:
  1825. - suricata.rules
  1826. ##
  1827. ## Auxiliary configuration files.
  1828. ##
  1829. classification-file: @e_sysconfdir@classification.config
  1830. reference-config-file: @e_sysconfdir@reference.config
  1831. # threshold-file: @e_sysconfdir@threshold.config
  1832. ##
  1833. ## Include other configs
  1834. ##
  1835. # Includes: Files included here will be handled as if they were in-lined
  1836. # in this configuration file. Files with relative pathnames will be
  1837. # searched for in the same directory as this configuration file. You may
  1838. # use absolute pathnames too.
  1839. # You can specify more than 2 configuration files, if needed.
  1840. #include: include1.yaml
  1841. #include: include2.yaml