当前位置: 首页 > news >正文

n1 Armbian OS 24.11.0 noble 安装suricata

参考

安装 Suricata | OISF/suricata - KoalaWiki

arm服务器上部署kibana_kibana arm-CSDN博客

https://artifacts.elastic.co/downloads/kibana/kibana-7.17.22-linux-aarch64.tar.gz

  1. 添加 OISF PPA:

    sudo add-apt-repository ppa:oisf/suricata-stable
    sudo apt-get update
  2. 安装 Suricata:

    sudo apt-get install suricata

Suricata 安装指南

Suricata 是一个高性能的开源入侵检测系统(IDS)、入侵防御系统(IPS)和网络安全监控引擎。以下是在不同操作系统上安装 Suricata 的方法。

在 Ubuntu/Debian 上安装

更新系统软件包列表以确保获取最新的软件版本:

sudo apt update

安装 Suricata 及其依赖项:

sudo apt install suricata

启动 Suricata 服务并设置为开机自启:

sudo systemctl start suricata
sudo systemctl enable suricata

在 CentOS/RHEL 上安装

添加 EPEL 仓库以获取 Suricata 软件包:

sudo yum install epel-release

安装 Suricata:

sudo yum install suricata

启动服务并启用开机自启:

sudo systemctl start suricata
sudo systemctl enable suricata

通过源码编译安装

下载最新版本的 Suricata 源码:

wget https://www.openinfosecfoundation.org/download/suricata-<version>.tar.gz

解压并进入源码目录:

tar -xzvf suricata-<version>.tar.gz
cd suricata-<version>

编译并安装 Suricata:

./configure
make
sudo make install

配置 Suricata

默认配置文件通常位于 /etc/suricata/suricata.yaml,可以根据需求修改规则集和网络接口配置。更新规则集可以使用以下命令:

sudo suricata-update

验证安装

检查 Suricata 版本以确认安装成功:

suricata -V

运行 Suricata 进行测试:

sudo suricata -c /etc/suricata/suricata.yaml -i <interface>

以上步骤涵盖了在主流 Linux 发行版上安装和配置 Suricata 的基本方法。根据具体需求,可能需要进一步调整配置文件或规则集。

egrep -v '^[[:space:]]*#|%$' /etc/suricata/suricata.yaml%YAML 1.1
---suricata-version: "8.0"vars:address-groups:HOME_NET: "[192.168.1.0/24,10.8.8.0/24,172.16.0.0/12]"EXTERNAL_NET: "!$HOME_NET"HTTP_SERVERS: "$HOME_NET"SMTP_SERVERS: "$HOME_NET"SQL_SERVERS: "$HOME_NET"DNS_SERVERS: "$HOME_NET"TELNET_SERVERS: "$HOME_NET"AIM_SERVERS: "$EXTERNAL_NET"DC_SERVERS: "$HOME_NET"DNP3_SERVER: "$HOME_NET"DNP3_CLIENT: "$HOME_NET"MODBUS_CLIENT: "$HOME_NET"MODBUS_SERVER: "$HOME_NET"ENIP_CLIENT: "$HOME_NET"ENIP_SERVER: "$HOME_NET"port-groups:HTTP_PORTS: "80"SHELLCODE_PORTS: "!80"ORACLE_PORTS: 1521SSH_PORTS: 22DNP3_PORTS: 20000MODBUS_PORTS: 502FILE_DATA_PORTS: "[$HTTP_PORTS,110,143]"FTP_PORTS: 21GENEVE_PORTS: 6081VXLAN_PORTS: 4789TEREDO_PORTS: 3544SIP_PORTS: "[5060, 5061]"default-log-dir: /sdb1/log/suricata/stats:enabled: yesinterval: 8exception-policy:plugins:outputs:- fast:enabled: yesfilename: fast.logappend: yes- eve-log:enabled: yesfiletype: regular #regular|syslog|unix_dgram|unix_stream|redisfilename: eve.jsonpcap-file: falsecommunity-id: falsecommunity-id-seed: 0xff:enabled: nomode: extra-datadeployment: reverseheader: X-Forwarded-Fortypes:- alert:tagged-packets: yes- frame:enabled: no- anomaly:enabled: yestypes:- http:extended: yes     # enable this for extended logging information- dns:- mdns:- tls:extended: yes     # enable this for extended logging information- files:force-magic: no   # force logging magic on all logged files- smtp:- websocket- ftp- rdp- nfs- smb:- tftp- ike- dcerpc- krb5- bittorrent-dht- snmp- rfb- sip- quic- ldap- pop3- arp:enabled: no        # Many events can be logged. Disabled by default- dhcp:enabled: yesextended: no- ssh- mqtt:- http2- doh2- pgsql:enabled: no- stats:totals: yes       # stats for all threads merged togetherthreads: no       # per thread statsdeltas: no        # include delta values- flow- tls-store:enabled: no- pcap-log:enabled: nofilename: log.pcaplimit: 1000 MiBmax-files: 2000compression: nonemode: normal # normal or multiuse-stream-depth: no #If set to "yes" packets seen after reaching stream inspection depth are ignored. "no" logs all packetshonor-pass-rules: no # If set to "yes", flows in which a pass rule matched will stop being logged.- alert-debug:enabled: nofilename: alert-debug.logappend: yes- stats:enabled: yesfilename: stats.logappend: yes       # append to file (yes) or overwrite it (no)totals: yes       # stats for all threads merged togetherthreads: no       # per thread stats- file-store:version: 2enabled: noxff:enabled: nomode: extra-datadeployment: reverseheader: X-Forwarded-For- tcp-data:enabled: notype: filefilename: tcp-data.log- http-body-data:enabled: notype: filefilename: http-data.log- lua:enabled: noscripts:heartbeat:logging:default-log-level: noticedefault-output-filter:outputs:- console:enabled: yes- file:enabled: yeslevel: infofilename: suricata.log- syslog:enabled: nofacility: local5format: "[%i] <%d> -- "af-packet:- interface: eth0cluster-id: 99cluster-type: cluster_flowdefrag: yes- interface: defaultaf-xdp:- interface: defaultdpdk:eal-params:proc-type: primaryinterfaces:- interface: 0000:3b:00.0 # PCIe address of the NIC portthreads: autopromisc: true # promiscuous mode - capture all packetsmulticast: true # enables also detection on multicast packetschecksum-checks: true # if Suricata should validate checksumschecksum-checks-offload: true # if possible offload checksum validation to the NIC (saves Suricata resources)mtu: 1500 # Set MTU of the device in bytesvlan-strip-offload: false # if possible enable hardware vlan strippingmempool-size: auto # autocalculated based on Rx/Tx descriptors and threadsmempool-cache-size: auto # autocalculated from the mempool sizerx-descriptors: auto # max number of descriptorstx-descriptors: auto # max number of descriptorscopy-mode: nonecopy-iface: none # or PCIe address of the second interface- interface: defaultthreads: autopromisc: truemulticast: truechecksum-checks: truechecksum-checks-offload: truemtu: 1500vlan-strip-offload: falserss-hash-functions: autolinkup-timeout: 0mempool-size: automempool-cache-size: autorx-descriptors: autotx-descriptors: autocopy-mode: nonecopy-iface: nonepcap:- interface: eth0- interface: defaultpcap-file:checksum-checks: autoapp-layer:protocols:telnet:enabled: yesrfb:enabled: yesdetection-ports:dp: 5900, 5901, 5902, 5903, 5904, 5905, 5906, 5907, 5908, 5909mqtt:enabled: yeskrb5:enabled: yesbittorrent-dht:enabled: yessnmp:enabled: yesike:enabled: yestls:enabled: yesdetection-ports:dp: 443pgsql:enabled: nostream-depth: 0dcerpc:enabled: yesftp:enabled: yeswebsocket:rdp:ssh:enabled: yesdoh2:enabled: yeshttp2:enabled: yessmtp:enabled: yesraw-extraction: nomime:decode-mime: yesdecode-base64: yesdecode-quoted-printable: yesheader-value-depth: 2000extract-urls: yesbody-md5: noinspected-tracker:content-limit: 100000content-inspect-min-size: 32768content-inspect-window: 4096imap:enabled: detection-onlypop3:enabled: yesdetection-ports:dp: 110stream-depth: 0smb:enabled: yesdetection-ports:dp: 139, 445nfs:enabled: yestftp:enabled: yesdns:tcp:enabled: yesdetection-ports:dp: 53udp:enabled: yesdetection-ports:dp: 53http:enabled: yeslibhtp:default-config:personality: IDSrequest-body-limit: 100 KiBresponse-body-limit: 100 KiBrequest-body-minimal-inspect-size: 32 KiBrequest-body-inspect-window: 4 KiBresponse-body-minimal-inspect-size: 40 KiBresponse-body-inspect-window: 16 KiBresponse-body-decompress-layer-limit: 2http-body-inline: autoswf-decompression:enabled: notype: bothcompress-depth: 100 KiBdecompress-depth: 100 KiBdouble-decode-path: nodouble-decode-query: noserver-config:modbus:enabled: nodetection-ports:dp: 502stream-depth: 0dnp3:enabled: nodetection-ports:dp: 20000enip:enabled: nodetection-ports:dp: 44818sp: 44818ntp:enabled: yesquic:enabled: yesdhcp:enabled: yessip:ldap:tcp:enabled: yesdetection-ports:dp: 389, 3268udp:enabled: yesdetection-ports:dp: 389, 3268mdns:enabled: yesasn1-max-frames: 256datasets:defaults:limits:rules:security:limit-noproc: truelandlock:enabled: nodirectories:read:- /usr/- /etc/- /etc/suricata/lua:coredump:max-dump: unlimitedhost-mode: autounix-command:enabled: autolegacy:uricontent: enabledexception-policy: autoengine-analysis:rules-fast-pattern: yesrules: yespcre:match-limit: 3500match-limit-recursion: 1500host-os-policy:windows: [0.0.0.0/0]bsd: []bsd-right: []old-linux: []linux: []old-solaris: []solaris: []hpux10: []hpux11: []irix: []macos: []vista: []windows2k3: []defrag:memcap: 32 MiBhash-size: 65536trackers: 65535 # number of defragmented flows to followmax-frags: 65535 # number of fragments to keep (higher than trackers)prealloc: yestimeout: 60flow:memcap: 128 MiBhash-size: 65536prealloc: 10000emergency-recovery: 30vlan:use-for-tracking: truelivedev:use-for-tracking: trueflow-timeouts:default:new: 30established: 300closed: 0bypassed: 100emergency-new: 10emergency-established: 100emergency-closed: 0emergency-bypassed: 50tcp:new: 60established: 600closed: 60bypassed: 100emergency-new: 5emergency-established: 100emergency-closed: 10emergency-bypassed: 50udp:new: 30established: 300bypassed: 100emergency-new: 10emergency-established: 100emergency-bypassed: 50icmp:new: 30established: 300bypassed: 100emergency-new: 10emergency-established: 100emergency-bypassed: 50stream:memcap: 64 MiBchecksum-validation: yes      # reject incorrect csumsinline: auto                  # auto will use inline mode in IPS mode, yes or no set it staticallyreassembly:urgent:policy: oob              # drop, inline, oob (1 byte, see RFC 6093, 3.1), gapoob-limit-policy: dropmemcap: 256 MiBdepth: 1 MiB                # reassemble 1 MiB into a streamtoserver-chunk-size: 2560toclient-chunk-size: 2560randomize-chunk-size: yeshost:hash-size: 4096prealloc: 1000memcap: 32 MiBdecoder:teredo:enabled: trueports: $TEREDO_PORTS # syntax: '[3544, 1234]' or '3533' or 'any'.vxlan:enabled: trueports: $VXLAN_PORTS # syntax: '[8472, 4789]' or '4789'.geneve:enabled: trueports: $GENEVE_PORTS # syntax: '[6081, 1234]' or '6081'.recursion-level:use-for-tracking: truedetect:profile: mediumcustom-values:toclient-groups: 3toserver-groups: 25sgh-mpm-context: autosgh-mpm-caching: yessgh-mpm-caching-path: /var/lib/suricata/cache/sghprefilter:default: mpmgrouping:thresholds:hash-size: 16384memcap: 16 MiBprofiling:grouping:dump-to-disk: falseinclude-rules: false      # very verboseinclude-mpm-stats: falsempm-algo: autospm-algo: autothreading:set-cpu-affinity: noautopin: nocpu-affinity:management-cpu-set:cpu: [ 0 ]  # include only these CPUs in affinity settingsreceive-cpu-set:cpu: [ 0 ]  # include only these CPUs in affinity settingsworker-cpu-set:cpu: [ "all" ]mode: "exclusive"prio:low: [ 0 ]medium: [ "1-2" ]high: [ 3 ]default: "medium"interface-specific-cpu-set:- interface: "enp4s0f0" # 0000:3b:00.0 # net_bonding0 # ens1f0cpu: [ 1,3,5,7,9 ]mode: "exclusive"prio:high: [ "all" ]default: "medium"detect-thread-ratio: 1.0profiling:rules:enabled: yesfilename: rule_perf.logappend: yeslimit: 10json: yeskeywords:enabled: yesfilename: keyword_perf.logappend: yesprefilter:enabled: yesfilename: prefilter_perf.logappend: yesrulegroups:enabled: yesfilename: rule_group_perf.logappend: yespackets:enabled: yesfilename: packet_stats.logappend: yescsv:enabled: nofilename: packet_stats.csvlocks:enabled: nofilename: lock_stats.logappend: yespcap-log:enabled: nofilename: pcaplog_stats.logappend: yesnfq:nflog:- group: 2buffer-size: 18432- group: defaultqthreshold: 1qtimeout: 100max-size: 20000capture:netmap:- interface: eth2- interface: defaultpfring:- interface: eth0threads: autocluster-id: 99cluster-type: cluster_flow- interface: defaultipfw:napatech:streams: ["0-3"]enable-stream-stats: noauto-config: yeshardware-bypass: yesinline: noports: [0-1,2-3]hashmode: hash5tuplesorteddefault-rule-path: /var/lib/suricata/rulesrule-files:- suricata.rulesclassification-file: /etc/suricata/classification.config
reference-config-file: /etc/suricata/reference.configfirewall:

#root用户操作useradd es
useradd -s /bin/false es


文章转载自:

http://pKj9wf6D.pqhfx.cn
http://iWlGvcs8.pqhfx.cn
http://Zxh8bSqf.pqhfx.cn
http://ERkstVjN.pqhfx.cn
http://SelS7DyQ.pqhfx.cn
http://K3uQFzaD.pqhfx.cn
http://w5kNT3OB.pqhfx.cn
http://VSQgXOuc.pqhfx.cn
http://B9rvOCjQ.pqhfx.cn
http://w2ey9imh.pqhfx.cn
http://KnlWZvZS.pqhfx.cn
http://081pdUad.pqhfx.cn
http://OTlIMUrB.pqhfx.cn
http://b250uyAz.pqhfx.cn
http://hzaHYhEf.pqhfx.cn
http://CaoB0kTa.pqhfx.cn
http://xJb0h8w4.pqhfx.cn
http://TjMuoXF7.pqhfx.cn
http://9CdE872E.pqhfx.cn
http://KJvvOGga.pqhfx.cn
http://Pu4jPgxW.pqhfx.cn
http://LRccOZk2.pqhfx.cn
http://bYLPePSo.pqhfx.cn
http://iMW1q0k0.pqhfx.cn
http://Mlcvdqn5.pqhfx.cn
http://xk6a9Exl.pqhfx.cn
http://qt2YJe61.pqhfx.cn
http://JJZ5WRWI.pqhfx.cn
http://pCIlldtS.pqhfx.cn
http://yZSCqNqY.pqhfx.cn
http://www.dtcms.com/a/375595.html

相关文章:

  • 【算法--链表】114.二叉树展开为链表--通俗讲解
  • IntelliJ IDEA 2025.1 Java Stream Debugger 快速使用指南
  • IDEA2024.1使用Debug调试工具F8步过失效解决方法
  • Java 大视界 -- Java 大数据在智能交通智能公交系统优化与乘客出行服务提升中的应用(409)
  • Java数据结构——树
  • vue3和vue2生命周期的区别
  • 《棒球小白》棒球球落地了才能跑垒吗·棒球1号位
  • 排序算法(Java)
  • Oracle数据库
  • 腾讯开源智能体框架Youtu-agent全解析:特性、架构与实战指南
  • 【2511系统分析师备考-快速阅读一】
  • Vue 学习随笔系列二十五 -- 多文件上传并支持修改
  • 从0到1学习Vue框架Day03
  • 【Redis五种数据类型】
  • Redis 双向同步如何避免循环?【附实操演示】
  • Redis单线程模型为什么快?
  • At least one <template> or <script> is required in a single file component
  • 不止是DELETE:MySQL多表关联删除的JOIN语法实战详解
  • 动态控制rabbitmq中的消费者监听的启动和停止
  • C# 基于halcon的视觉工作流-章30-圆圆距离测量
  • Android Studio 构建项目时 Gradle 下载失败的解决方案
  • 【STM32项目开源】STM32单片机智能恒温箱控制系统
  • 苹果ios的系统app应用WebClip免签应用开源及方式原理
  • Java数据库连接JDBC完全解析
  • Node-RED 究竟是否适合工业场景?
  • zephyr开发环境搭建
  • OpenCV 实战:基于模板匹配的身份证号自动识别系统
  • java中将租户ID包装为JSQLParser的StringValue表达式对象,JSQLParser指的是?
  • CMake工程指南
  • 单北斗GNSS该如何在变形监测中发挥最大效能?