<div dir="ltr"><div><div>Hi all,<br></div>I'm trying to implement a syn flood protection, so, if the controller receives a syn without ack consider the source a suspect source and I add its mac address, dst mac addr and dst TCP port in a grey list. After receiving a certain numer of syn packet (a threshold) without ack response I wanna drop the incoming syn traffic from the "attacker" identifing it by its mac address.<br>
</div><div><br>I've installed the dropping rule leaving the actions list empty in this way:<br><br>actions=[]<br>              match=of.ofp_match.from_packet(packet,inport)<br>              match.dl_src=SRCmac<br>              match.tp_src=None<br>
              match.nw_src=None<br>              #match.tp_dst=None<br>              msg=of.ofp_flow_mod(command=of.OFPFC_ADD,<br>                                idle_timeout=FLOW_IDLE_TIMEOUT,<br>                                hard_timeout=of.OFP_FLOW_PERMANENT,<br>
                                buffer_id=event.ofp.buffer_id,<br>                                actions=actions,match=match)<br>              event.connection.send(msg.pack())<br>              print("Dropping Rule installed")<br>
<br></div><div>but if the attacker performs ip spoofing and send a syn packet with the new IP my controller install again the rule, also if the srcIP is wildcarded.<br><br></div><div>There are any wrong matching?<br></div>
<div><br></div><div>P.S.:<br></div><div>When the controller receives syn packet, if numer of syn <threshold, it pretends to be the destination host and sent the syn ack packet.<br></div><div>If it receives the ack sends a reset, add the src ip in a whitelist and install the forwarding rule.<br>
<br></div><div>Thanks for your help.<br></div><div><div><div><br>-- <br>Silvia Fichera
</div></div></div></div>