XIII
Very Senior Member
That was no crash; the rules update (and re-start Suricata) at 3:00...I did see a log that Suricata crashed (and restarted) around 3:00 though.
That was no crash; the rules update (and re-start Suricata) at 3:00...I did see a log that Suricata crashed (and restarted) around 3:00 though.
$HOME_NET
to any
to get a hit?):drop ip any any -> [a.b.c.d] any (msg:"Test"; threshold:type limit,track by_src,seconds 3600,count 1; classtype:trojan-activity; sid:2016993; rev:3; metadata:created_at 2013_06_10, updated_at 2013_06_10;)
Aug 9 13:40:58 ac86u suricata[4246]: [Drop] [1:2016993:3] Test [Classification: A Network Trojan was Detected] [Priority: 1] {TCP} <my-ip>:<my-port> -> a.b.c.d:80
drop.log
file:08/09/2020-14:31:41.651139: IN= OUT= SRC=<my-ip> DST=a.b.c.d LEN=60 TOS=0x00 TTL=64 ID=62963 PROTO=TCP SPT=46314 DPT=80 SEQ=1998555557 ACK=0 WINDOW=29200 SYN RES=0x00 URGP=0
08/09/2020-14:31:41.671299: IN= OUT= SRC=a.b.c.d DST=<my-ip> LEN=60 TOS=0x00 TTL=234 ID=0 PROTO=TCP SPT=80 DPT=46314 SEQ=2285492155 ACK=1998555558 WINDOW=26847 SYN ACK RES=0x00 URGP=0
08/09/2020-14:31:41.774798: IN= OUT= SRC=<my-ip> DST=a.b.c.d LEN=60 TOS=0x00 TTL=64 ID=46555 PROTO=TCP SPT=33613 DPT=443 SEQ=2219362744 ACK=0 WINDOW=29200 SYN RES=0x00 URGP=0
08/09/2020-14:31:41.793659: IN= OUT= SRC=a.b.c.d DST=<my-ip> LEN=60 TOS=0x00 TTL=237 ID=0 PROTO=TCP SPT=443 DPT=33613 SEQ=1989515720 ACK=2219362745 WINDOW=26847 SYN ACK RES=0x00 URGP=0
curl a.b.c.d
and wget a.b.c.d
still show the contents of that website, so nothing gets dropped?Oh, looking better at the (redacted) IP address in the log: the rule is triggered on my external IP; not on anything in the 192.168.0.0/16 range!additionally I had to change the source from$HOME_NET
toany
to get a hit?
HOME_NET
?HOME_NET: "[192.168.0.0/16, <external-IP]
"?.Suricata is a very good IPS/IDS but I do not think it is a good fit for our Asus routers. I have finally realized that I have spent way too much time on it, so I have removed it from my router. I wish the best for further endeavors on this project.
uhhh, may I have some of this ^ please?Little easier to read:
View attachment 25280
> suricata --build-info
...
NFQueue support: no
I don't have a dedicated IPS, I have a router system with more possibilities of resources. But FW Merlin has many good features.I actually plan to do,what @rgnldo is doing. I want to eventually setup a dedicated IPS system for my network.
A technical assessment is required.Post #1 mentions that Suricata is not compatible with AiProtection
But the github site for the suricata script install, says that suricata is not compatible with Aiprotection AND also not compatible with Adaptive QOS.
is it really fact that Suricata does not work if Adaptive QoS is enabled?
I thought that Suricata could work with either Cake or AdaptiveQoS...
thanks
2#issueLittle easier to read:
View attachment 25280
.I actually plan to do,what @rgnldo is doing. I want to eventually setup a dedicated IPS system for my network.
.Just to give more info, I am the guy who used to run online gaming servers for Tribes, RTCW and CounterStrike on a FreeBSD server.
uhhh, may I have some of this ^ please?
/jffs/addons/suricata/suricata_stats.sh install
Good suggestions. I removed the skynet check already.
I can wait. enjoy your vacation!i am away for a week and didn’t have time to post more.
can try by grabbing three files from here:
Github
you want to place the files suricata_log.sh, suricata_stats.sh and suricatastats_www.asp in a folder /jffs/addons/suricata.
then chmod +x the two scripts and runCode:/jffs/addons/suricata/suricata_stats.sh install
when I have time I was thinking of adding this to the suricata_manager.sh script.
i am away for a week and didn’t have time to post more.
can try by grabbing three files from here:
Github
you want to place the files suricata_log.sh, suricata_stats.sh and suricatastats_www.asp in a folder /jffs/addons/suricata.
then chmod +x the two scripts and runCode:/jffs/addons/suricata/suricata_stats.sh install
when I have time I was thinking of adding this to the suricata_manager.sh script.
# Linux high speed capture support
af-packet:
- interface: eth0 ## set your wan interface
copy-mode: ips
copy-iface: br0
buffer-size: 3072
cluster-id: 99
cluster-type: cluster_flow
use-mmap: yes
# mmap-locked: yes
tpacket-v3: yes
ring-size: 3072
- interface: br0
copy-mode: ips
copy-iface: eth0
buffer-size: 3072
cluster-id: 98
cluster-type: cluster_flow
use-mmap: yes
# mmap-locked: yes
tpacket-v3: yes
ring-size: 3072
Excellent technical explanation. Liked it. Finally, we have a contribution based on knowledge about FW AsusWRT. This has always been my aim, open source solutions. Good to know of availability. With the knowledge of @faux123 and @juched we will have promising advances with Suricata.I finally got Suricata to operate in IDS/IPS on af-packet mode (which is the ONLY mode available for our Entware build, I was trying to get a PF_RING build but was having some issues with libraries and other Entware dependencies). Below is the relevant yaml code from my own config. mmap (memory mapped ring buffers) must be enabled for IPS to work, without it, it's only running in IDS mode. I'm running this on my AC86U (with suricata, I kinda wish I have the newer AX88U not for its wifi but for its quad core CPU and 1 GB of real RAM). The configuration is a good compromise for my own build, the average load on my router is around 3.50 so your router will be hotter with it. Download speed is close to my native ISP speed (which is around 200 Mbps), upload speed is somewhat limited around 160 Mbps which is far below my normal ISP speed of 225 Mbps (this is due to AC86U's CPU capability). I'm running CakeQoS as well (I don't like the proprietary closed sourced solutions from TrendMicro as it causes some random kernel panics on my own fork with their modules which I can't fix, I much prefer the GPL alternative which is Suricata+CakeQoS). You will experience around 2.1% packet drops (again this is due to dual core and limited real RAM of AC86U). I can live with this small amount of packet drops as I didn't experience any real usage issues with such packet loss.
Thanks to all those who contributed so far, it took me a while to read through tons of source code from Suricata and their piss poor documentations/examples to finally crack this.
YAML:# Linux high speed capture support af-packet: - interface: eth0 ## set your wan interface copy-mode: ips copy-iface: br0 buffer-size: 3072 cluster-id: 99 cluster-type: cluster_flow use-mmap: yes # mmap-locked: yes tpacket-v3: yes ring-size: 3072 - interface: br0 copy-mode: ips copy-iface: eth0 buffer-size: 3072 cluster-id: 98 cluster-type: cluster_flow use-mmap: yes # mmap-locked: yes tpacket-v3: yes ring-size: 3072
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!