using hping, I send SYN packet, second peer is listening and replies with SYN/ACK, but hping (or linux kernel does it I guess) sends RST after receiving SYN/ACK.
Is ther
This command should drop any TCP packet with the RST
flag set your machine would send to the specific destination:
iptables -I OUTPUT 1 -d -p tcp --tcp-flags RST RST -j DROP
to revert it, use:
iptables -D OUTPUT -d -p tcp --tcp-flags RST RST -j DROP
An alternative is to block all incoming TCP packets with SYN
+ACK
flags set from the specific source (i.e. the packets that cause the RST
):
iptables -I INPUT 1 -s
to revert it, use:
iptables -D INPUT -s
Works for me with hping3 -S -p 22