as you can see from my export I used your configuration against flags attack and changed the TTL with the rule in prerouting (would it be better to move it to postrouting?) The problem is that now, after that 'error the router reboots.No, del ponte LTE...
the second rule is disabledEDIT
Btw, there are also two "protocol=!tcp" in sequence.
add action=drop chain=prerouting comment="Unused protocol protection" \ disabled=yes protocol=!tcp
the second rule is disabled
/ip firewall raw add action=accept chain=prerouting protocol=icmp add action=accept chain=prerouting protocol=igmp add action=accept chain=prerouting protocol=tcp add action=accept chain=prerouting protocol=udp add action=accept chain=prerouting protocol=gre add action=log chain=prerouting log=yes log-prefix="Not TCP protocol" protocol=!tcp add action=drop chain=prerouting comment="Unused protocol protection" disabled=yes protocol=!tcp
/ip firewall raw add action=drop chain=prerouting protocol=sctp
/ip firewall raw add action=drop chain=prerouting protocol=sctp
/ip firewall raw add action=drop chain=prerouting protocol=ipv6-encap
The rules I have in the firewall should do that , what is wrong in your opinion?@frank333,只是一个建议:在我们的总公司we use a simple design philosophy "keep it as simple as possible" with only a few well-chosen and commonly used patterns for sabotage, intrusions and port scanners that end up permanently in a BAN list. The first rule in the raw chain checks against that list. This avoids repeated and unnecessary checks in the rest of the chains.
We also use fasttrack with the filter "Connection Mark: no-mark" to enable routing marks etc and jump-chain optimization in prerouting whenever possible like for example this:viewtopic.php?t=134048#p659676
Spero che hai messo prima le regole per accettare l'ICMP e l'UDP, oltre al TCP come avevo indicato nel post originale.....in this way all protocols other than tcp are filtered out.
Exactly.Don't think you can mitigate DDoS locally on your router. You can't.
The above is why I stated that people should not mess with the "raw" table when they do not know exactly what they are doing.I'm just curious where the SCTP is coming from here. It's also connection oriented like TCP, so this could be a replay from a client initiating it.
I'd imagine most LTE connections are limited to TCP and UDP, so you'd want to block SCTP outbound. Which a prerouting filter rule would do, no need for RAW rules IMO.When there was an SCTP block in the filter table it would work OK and like you expect.
Those rules bring you absolutely nothing. They never "worked well", they were just no-ops. Until, apparently, some of your devices started using SCTP.
- @pe1chl
So I would do well to delete them ? I have been using them for a few years and they have always worked well , only lately they give me that problem.
You contradict yourself, in the default firewall the SCTP directed to an IP that does not exist is deleted anyway...There is no reason to block SCTP.
Just use the default firewall rules.
It isn't. The "incoming traffic" is a reply to traffic he sent outside. When filtering in the "raw" table, that is not considered.You contradict yourself, in the default firewall the SCTP directed to an IP that does not exist is deleted anyway...There is no reason to block SCTP.
Just use the default firewall rules.
(or at most his machine is used to perhaps amplify an attack, if the response goes out again on the WAN because it can't find the IP inside...)
That traffic is going to his LTE CPE, but he doesn't have that IP anywhere... So there's a problem somewhere for sure...
/ip firewall filter add action=drop chain=input comment="Winbox on WAN" dst-port=8291 \ in-interface=lte1 protocol=tcp add action=accept chain=input comment=\ "defconf: accept established,related,untracked" connection-state=\ established,related,untracked add action=drop chain=input comment="defconf: drop invalid" connection-state=\ invalid add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp add action=accept chain=input comment=\ "defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1 add action=add-src-to-address-list address-list=BAN address-list-timeout=\ none-dynamic chain=input comment="list address banned" in-interface-list=\ !LAN add action=drop chain=input comment="defconf: drop all not coming from LAN *" \ in-interface-list=!LAN log-prefix="[DROP input]" add action=accept chain=forward comment=\ "defconf: accept established,related, untracked" connection-state=\ established,related,untracked add action=drop chain=forward comment="defconf: drop invalid" \ connection-state=invalid add action=drop chain=forward comment=\ "defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat \ connection-state=new disabled=yes in-interface-list=WAN add action=drop chain=input comment="TCP non SYN scan attack input" \ connection-state=new protocol=tcp tcp-flags=!syn add action=drop chain=forward comment="TCP non SYN scan attack forward" \ connection-state=new protocol=tcp tcp-flags=!syn
It isn't. The "incoming traffic" is a reply to traffic he sent outside. When filtering in the "raw" table, that is not considered.
When his locally connected systems attempt an outgoing SCTP connection, the reply that comes back is dropped and logged by those "raw" rules.
Makes no sense. Don't do that "raw" filtering, use only "filter" where the first rule will normally accept "established/related" and these packets would be passed through back to the system that sent them.
so essentially, I would just delete the raw rules, delete the two SYN rules above, and enable the default rule ' drop all from WAN not DSTNATed' and I would no longer have problems with sctp ?
You can also use this command in commandline mode: /system/default-configuration/printok,
我会做一个出口configuratio(文本)n, scripts and modem settings.
Then I'll do a total reset so at least I have the firewall with the default rules; then I'll add what's missing by hand.
I don't see any other solution.
It might just the response is getting flagged as invalid, so first SCTP makes it out but part of the handshake get lost. Totally right you see it in a sniffer however, but also possible WebRTC DataChannel is transitory (e.g. a game or video call might try SCTP with WebRTC). It's just SCTP isn't typical, it leaking from LTE or attack also seem weird too.re:The log is clear, the SCTP comes from outside, not inside, with wireguard you see nothing.....
I thought that if there was a webrtc communication between lan and external you could see it by listening on the router's ethernet interface (but you're right, I started an online webrtc test and it didn't detect anything)