Hi there,
I had to pause my researching due to hardware issues. Issues were resolved and now I can move forward.
Summarizing what I have so far:
- Running Suricata v6 and v7 as part of SELKS 6 suite
- Setup Suricata in IPS mode
- I am implementing the L2 config approaching (
af-packet
). Machine 150 is hosting Suricata, so I want Suricata to ignore that traffic for detection.
selks6-interfaces-config.yaml
af-packet:
- interface: enxa0cec8d92d70
threads: 1
defrag: yes
cluster-type: cluster_flow
cluster-id: 98
copy-mode: ips
copy-iface: enxa0cec8d92e2e
tpacket-v3: no
ring-size: 2048
buffer-size: 64535
use-mmap: yes
bpf-filter: not host 192.168.1.150
- interface: enxa0cec8d92e2e
threads: 1
cluster-id: 97
defrag: yes
cluster-type: cluster_flow
copy-mode: ips
copy-iface: enxa0cec8d92d70
tpacket-v3: no
ring-size: 2048
buffer-size: 64535
use-mmap: yes
bpf-filter: not host 192.168.1.150
pcap:
- interface: enxa0cec8d92d70
cluster-id: 98
bpf-filter: "not host 192.168.1.150"
- interface: enxa0cec8d92e2e
cluster-id: 97
bpf-filter: "not host 192.168.1.150"
pfring:
- interface: enxa0cec8d92d70
cluster-id: 98
bpf-filter: not host 192.168.1.150
- interface: enxa0cec8d92e2e
cluster-id: 97
bpf-filter: not host 192.168.1.150
netmap:
- interface: enxa0cec8d92d70
cluster-id: 98
bpf-filter: not host 192.168.1.150
- interface: enxa0cec8d92e2e
cluster-id: 97
bpf-filter: not host 192.168.1.150
- Added custom Suricata rule via Scirius (webGUI for SELKS)
- Added to Suricata config
# IP Reputation
reputation-categories-file: /etc/suricata/rules/scirius-categories.txt
default-reputation-path: /etc/suricata/rules
reputation-files:
- scirius-iprep.list
- test-iprep.list
default-rule-path: /etc/suricata/rules
rule-files:
- scirius.rules
scirius-categories.txt
1,2400000,ET DROP Spamhaus DROP Listed Traffic Inbound
2,2402000,ET DROP Dshield Block Listed Source
3,2403300,ET CINS Active Threat Intelligence Poor Reputation IP
4,2404000,ET CNC Shadowserver Reported CnC Server IP
5,2404029,ET CNC Shadowserver Reported CnC Server
6,2404300,ET CNC Feodo Tracker Reported CnC Server
7,2500000,ET COMPROMISED Known Compromised or Hostile Host Traffic
8,2520000,ET TOR Known Tor Exit Node Traffic
9,2522000,ET TOR Known Tor Relay/Router (Not Exit) Node Traffic
10,2525000,ET 3CORESec Poor Reputation IP
30,TESTBadIP,TEST Known Bad IP Reputation
test-iprep.list
149.20.4.15,30,100
scirius.rules
# Rules file for Default SELKS ruleset generated by Scirius at 2021-01-26 15:49:40.671556+00:00
drop ip any any -> any any (msg:"TEST IP Bad Reputation Blacklist"; iprep:any,TESTBadIP,>,99; sid:1; rev:1;)
- The internal
af-packet
bridge in Suricata seems to be working fine, as I can reach a test machine behind Suricata and also that machine can reach Internet
So far so good.
Now I am testing the only rule enabled in Suricata, which should block IP 149.20.4.15 (www.debian.org). Well, traffic is not being blocked. What could I be doing wrong or missing?
Thank you