I am running suricata-5.0.3 in af-packet mode but there is no internet connection at all while it is running. I am able to access web resource via socks/squid proxy but not otherwise.
System - Linux flux 5.3.18-lp152.36-default #1 SMP Tue Aug 18 17:09:44 UTC 2020 (885251f) x86_64 x86_64 x86_64 GNU/Linux
The setup: ONT – OpenBSD Router – openSUSE + suricata – wired & wireless clients.
For testing purpose I connected suricata directly to ONT. I have setup two vlans for port mirroring in the ONT. Unfortunately the ONT is carrier locked, they do not provide any documentation. I am going to experiment with ONT and figure out ways to make it work or buy my own ONT or get a TAP device. I will post an update on the coming Tuesday.
This raises some questions. You’re talking about a port mirror and a TAP, so passive traffic. This won’t match IPS mode.
Another point is that I see you have just eth0/eth1 and also with IPs configured. Keep in mind that ALL packets sent to eth0 will be copied to eth1 and sent out, this includes traffic that you want to send directly to the device (for example SSH for management).
How do you do the routing?
So overall I would challenge the setup passive traffic monitoring vs IPS mode as some sort of conflict.
Today I configured a OpenWrt router with port-mirroring to which suricata device connects. I am trying different options but none seem to work in af-packet ips/tap copy-mode. Zeek is working in af-packet mode on same setup.
The port-mirroring in OpenWrt is working as expected.
My default route is wlan0. You will find contradictory information coming from me since I am experimenting with different options and changing the hardware/network topology in the process.
Let me go back to the original scenario of suricata running behind OpenBSD pf, get the new hardware; probably quad port PCIe ethernet adapter and see if it changes anything. I will report back in a couple of days, appreciate your patience. Thank you.
I just checked, if you ran Zeek it was only IDS mode since it is just passive. So if you want to have Suricata the same way like Zeek I would recommend to just use Suricata in AF_PACKET IDS mode and in that case it’s rather easy to run it on on interface where the mirrored traffic arrives.
I will like to learn IPS mode. I’ve used IDS for a while on OpenBSD. I am new to Linux and it is time to learn new things. I will get back with infrastructure detail latest by Thursday, please help me get it working.
My issue is sorted after adding Intel dual lan PCI adapter and not assigning IP to it.
Network
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: eth4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:1a:64:92:13:18 brd ff:ff:ff:ff:ff:ff
3: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
link/ether 2a:3c:0a:6d:4e:07 brd ff:ff:ff:ff:ff:ff
4: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 74:d0:2b:2b:1a:42 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.25/24 brd 192.168.0.255 scope global eth1
valid_lft forever preferred_lft forever
5: eth3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:1a:64:92:13:19 brd ff:ff:ff:ff:ff:ff
My network flow ONT/Modem – Suricata (IPS) – OpenWrt router (connected to wan port)
Should I connect to LAN port on OpenWrt or let it stay connected to WAN?
I apologize for the late update but the Amazon vendor sent me PCI-X card instead of PCIe, I was expecting a quick replacement but it didn’t work out that way. I’ve installed PCI-X in PCI 2.0 slot for now and configured the suricata. In this situation I can not test suricata with netmap or PF_RING.