简体   繁体   English

如何使用iptables阻止HTTPS应用程序数据?

[英]How can I block HTTPS application data by using iptables?

I want to block a HTTPS connection after TLS handshake using Iptables. 我想在使用Iptables进行TLS握手后阻止HTTPS连接。 In the other words, I want to allow TCP and TLS handshakes, and then I want to drop the connection. 换句话说,我要允许TCP和TLS握手,然后要删除连接。 I know that HTTPS is encrypted, but there may be a solution to differentiate TLS handshake packets and application data packets without decrypting them. 我知道HTTPS是加密的,但是可能存在一种解决方案,可以区分TLS握手数据包和应用程序数据包而无需对其进行解密。

您只需要从端口443接受SYN,SYN / ACK,ACK数据包以允许握手,然后丢弃其余数据包: iptables -A INPUT --protocol tcp --tcp-flags SYN ACK --dport 443 -j ACCEPT iptables -A INPUT --protocol tcp --tcp-flags FIN RST URG PSH --dport 443 -j DROP

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM