如何防止IP在Kestrel上访问网站?
我使用ubuntu上的kestrel在端口443上运行的ASPNET Core 6.0 Web应用程序20.04。设置了证书和来源的拉力!
但是,我仍然可以通过转到https://<我的服务器IP>
来访问我的网站。
有什么方法可以防止这种方式访问?
我的appsettings.json:
"Kestrel": {
"HttpsDefaults": {
"ClientCertificateMode": "RequireCertificate"
},
"Endpoints": {
"Https": {
"Url": "https://<my domain>:443",
"Certificate": {
"Path": "/etc/ssl/certificate.pfx",
"Password": "",
"AllowInvalid": false
}
}
}
}
I have a aspnet core 6.0 web app running on port 443 using kestrel on Ubuntu 20.04. The certificate and origin pulls are set up and all work!
However, I can still access my site by going to https://<my server ip>
.
Is there a way I can prevent access this way?
My appsettings.json:
"Kestrel": {
"HttpsDefaults": {
"ClientCertificateMode": "RequireCertificate"
},
"Endpoints": {
"Https": {
"Url": "https://<my domain>:443",
"Certificate": {
"Path": "/etc/ssl/certificate.pfx",
"Password": "",
"AllowInvalid": false
}
}
}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论