有没有办法根据 path 隐藏 http 服务

七月 28, 2024 更新: 七月 31, 2024 [网络与安全] #obsidian #vpn #密码学 #网络

有没有办法根据 path 隐藏 http 服务

就是如果不通过指定 path 来访问 http 服务器,别人都无法判断这个端口是否有 http 服务 查了 caddy 和 nginx 的资料,都不知道能不能做出这种效果来

1、iptables url 过滤

2、用程序控制,发现 URL 不匹配的时候,直接把 tcp socket close 掉,或者直接 RESET 连接

3、nginx return 444

Stops processing and returns the specified `code` to a client. The non-standard code 444 closes a connection without sending a response header.
location / {
    return 444;
}

4、非指定 path 代理到 mysql 上面??

5、用 openresty 在获取到 sslname 之后直接拒掉一样

如果是 https 的话就做不到了,服务器要先完成 TLS 握手才能知道访问的 path,收到 Server Hello 就知道这是个 web 服务器了