hping send SYN: how not to send RST after receiving SYN/ACK?

﹥>﹥吖頭↗ 提交于 2019-12-03 09:10:22

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 <destination> -p tcp --tcp-flags RST RST -j DROP

to revert it, use:

iptables -D OUTPUT -d <destination> -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 <source> -p tcp --tcp-flags SYN,ACK SYN,ACK -j DROP

to revert it, use:

iptables -D INPUT -s <source> -p tcp --tcp-flags SYN,ACK SYN,ACK -j DROP

Works for me with hping3 -S -p 22 <destination>

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!