OPNsense Forum

English Forums => Intrusion Detection and Prevention => Topic started by: cobrax2 on August 08, 2021, 04:28:01 pm

Title: Suricata legacy mode?
Post by: cobrax2 on August 08, 2021, 04:28:01 pm
hi
since i have pppoe on wan, i can't use inline mode with suricata
how can i switch to legacy?
thanks
Title: Re: Suricata legacy mode?
Post by: franco on August 09, 2021, 09:38:28 am
It's easy: don't enable IPS mode. :)


Cheers,
Franco
Title: Re: Suricata legacy mode?
Post by: cobrax2 on August 09, 2021, 10:48:39 am
lol, but does it allow to block then? from what i've read, ids mode only alerts, does not block.
also, does it work on pppoe connections? as it doesnt seem to
thanks
Title: Re: Suricata legacy mode?
Post by: franco on August 09, 2021, 11:16:12 am
I'm not sure what "legacy" is to you. We have PCAP mode (IPS unticked) and Netmap mode (IPS ticked).


Cheers,
Franco
Title: Re: Suricata legacy mode?
Post by: cobrax2 on August 09, 2021, 11:29:32 am
yes, pcap is what i am looking for
i come from pfsense, which had snort, and it worked on wan on "legacy mode" that is when the packets are copied instead of it being "inline" and it still worked with a small delay from what i understand, because on a match it still closed the connections.
but if i use suricata, even in ids mode, it doesn't show anything being blocked :(
isn't it supposed to work with pppoe in ids mode?
thanks again!
Title: Re: Suricata legacy mode?
Post by: franco on August 09, 2021, 01:50:06 pm
Hi,

Ah yes... context :)

We don't have this out-of -band IP block via pf table, because it's simply insecure. When it blocks, you have already been exploited.


Cheers,
Franco
Title: Re: Suricata legacy mode?
Post by: cobrax2 on August 09, 2021, 03:25:07 pm
oh
then what are my choices, seeing that i have a pppoe connection?
or why doesnt suricata work even on lan interface?
thanks
Title: Re: Suricata legacy mode?
Post by: chemlud on August 09, 2021, 03:55:38 pm
...sounds like you are struggeling to get suricata to work at all. which rule sets do you have enabled?

https://docs.opnsense.org/manual/ips.html#choosing-an-interface

... and the whole rest of the documentation will help you to make some decisions. A bit of a difference to snort on pfsense, if you start from the scratch.
Title: Re: Suricata legacy mode?
Post by: cobrax2 on August 09, 2021, 04:08:14 pm
in the log, it says that it is started, lol
i have some et rules enabled, they are downloaded and seem to be ok.
i just dont know how to make it work.
if "legacy" mode doesnt work, i cant enable suricata on wan, then i cant see if any of the rules get hit, because i have no open ports to the exterior atm.
if i enable it on lan, they also dont seem to work, as i tried some sites that say they test the ids and everything went to the antivirus
Title: Re: Suricata legacy mode?
Post by: cobrax2 on August 10, 2021, 06:32:58 am
sorry for my ignorance, i am not an expert, but i am trying to solve my problem
is there any way to do this?
i have another free ethernet port on the router, can i do somehow an instance that connects to the pppoe wan server on that port, decode the pppoe layer and then pass the traffiic to the true wan port, like bridging them? like adding another physical pppoe router in front of the main one without really adding it?
thanks again
Title: Re: Suricata legacy mode?
Post by: franco on August 10, 2021, 08:02:33 am
Well, run IPS on LAN in that case is what I would have suggested too.

What sort of hardware / network devices are we talking about? Does traffic not pass through or not? If it passes does not not block?


Cheers,
Franco
Title: Re: Suricata legacy mode?
Post by: cobrax2 on August 10, 2021, 08:16:40 am
i managed to get it working on lan, but i do have a few services on the server wan side that i'd like to protect: vpn and ssh for now. so i'd like to run suricata on wan.
my setup is: i have a pc, 2 intel gb pci (em0 and em1), one for wan and one for lan. the mb has also a lan adapter that is free. is it possible to use this spare adapter to use it as a ppoe client and then bridge it to the em0 wan adapter somehow so suricata running on em0 will "see" it as standard interface and work on it?
thanks again for your willingness to help me
Title: Re: Suricata legacy mode?
Post by: franco on August 10, 2021, 08:19:05 am
Both protocols are encrypted and will not give you extra security being run through an IDS or IPS.


Cheers,
Franco
Title: Re: Suricata legacy mode?
Post by: cobrax2 on August 10, 2021, 08:40:31 am
ok, cool
but i would still want to do it for some other ones that i might add later
is there a way to use the 3rd adapter?
Title: Re: Suricata legacy mode?
Post by: cobrax2 on August 10, 2021, 10:59:57 am
i investigated some more, i think the 3rd adapter must not be in bridge mode, as it will still pass the pppoe authentication to the other adapter.
so it would have to be somehow in router mode, then the other intel would have to be nat'ed but declared somehow as external and run suricata, and the second intel as lan
but then i'd be double nat'ed, which is not good, right?
Title: Re: Suricata legacy mode?
Post by: cobrax2 on August 14, 2021, 11:53:27 am
so no way to do this?
Title: Re: Suricata legacy mode?
Post by: chemlud on August 14, 2021, 12:01:48 pm
what?
Title: Re: Suricata legacy mode?
Post by: cobrax2 on August 15, 2021, 12:43:53 pm
well, story short:
i have 3 network adapters in one pc. i'd like to use one as pppoe client, then connect one of the others to it as wan somehow, and the 3rd as lan.
then run suricata on wan, as it does not want to work on pppoe connections. so, can i make the first adapter act as some kind of a modem/ router?
thanks
Title: Re: Suricata legacy mode?
Post by: cookiemonster on August 16, 2021, 05:46:22 pm
hi
since i have pppoe on wan, i can't use inline mode with suricata
how can i switch to legacy?
thanks
From this your WAN port is already the PPOE client. I don't know if what you sugges can be done, essentially to split the PPOE or WAN elements of the interface and place them on your spare one.
Title: Re: Suricata legacy mode?
Post by: cobrax2 on August 16, 2021, 05:59:26 pm
yes, was thinking of having pppoe client on one interface and somehow make it be a router, and add some manual routes maybe to another interface and declare that one as wan