当前位置:网站首页>每日面试1题-如何防止CDN防护被绕过
每日面试1题-如何防止CDN防护被绕过
2022-06-30 16:31:00 【qq_51550750】
当攻击者发现目标站点存在CDN防护的时候,会尝试通过查找站点的真实IP,从而绕过CDN防护。
我们来看一个比较常见的基于公有云的高可用架构,如下:
CDN(入口层)->WAF(应用层防护)-> SLB(负载层)-> ECS(源站) -> RDS(数据库)
即对应关系为:域名 cname CDN,CDN—>WAF,WAF—> SLB,SLB—> ECS。

SLB:Server Load Balancer 网络服务器之间的负载均衡
客户端向虚拟服务器发起连接时,通过某种负载均衡算法,转发到某真实服务器。
我们重点来关注一下CDN—>WAF—>SLB—>ECS这几层服务的关系。
假设,攻击者知道SLB的真实IP地址,就可以直接访问SLB的ip地址,从而轻易绕过CDN+WAF的安全防护。
如何防止CDN被绕过呢?
这里分享一个CDN防护技巧,通过中间件配置只允许域名访问,禁止ip访问。
这样处理的话,所有直接访问站点真实IP的请求都会被拒绝,任何用户只能通过域名访问站点,通过预先设定的网络链路,从DNS–>CDN–>waf防护–>源站,所有的访问请求都必须经过WAF检测。
即使攻击者找到了真实IP地址,修改本地hosts文件,强行将域名与IP解析,也无法访问到目标站点。
Nginx参考配置:
#添加一个server,在原server里绑定域名
server {
listen 80 default;
server_name _;
return 403;
}
server {
listen 80;
server_name www.demo.com;
.........
Apache参考配置:
#在httpd.conf最后面加上
<VirtualHost 此处填写IP>
ServerName 此处填写IP
<Location />
Order Allow,Deny
Deny from all
</Location>
</VirtualHost>
<VirtualHost 此处填写IP>
DocumentRoot /var/www/html
ServerName 此处填写域名
</VirtualHost>
边栏推荐
- 新技能:通过代码缓存加速 Node.js 的启动
- Write the simplest small program in C language Hello World
- MySQL之零碎知识点
- k线图快速入门必读
- MIT科技评论2022年35岁以下创新者名单发布,含AlphaFold作者等
- splitting.js密码显示隐藏js特效
- [sword finger offer] 53 - I. find the number I in the sorted array
- Develop those things: how to add text watermarks to videos?
- Shutter music recording playing audioplayers
- Map集合
猜你喜欢

构建基本buildroot文件系统
![[Architecture] 1366- how to draw an excellent architecture diagram](/img/98/5dc29e08e91e751f67d910fadc6430.jpg)
[Architecture] 1366- how to draw an excellent architecture diagram

3D chart effectively improves the level of large data screen

JS from prototype chain to inheritance

编译生成busybox文件系统

【架构】1366- 如何画出一张优秀的架构图

高等数学(第七版)同济大学 总习题一 个人解答

Six pictures show you why TCP has three handshakes?

巴比特 | 元宇宙每日必读:未成年人打赏后要求退款,虚拟主播称自己是大冤种,怎么看待这个监管漏洞?...

Cesium-1.72 learning (earth rotation)
随机推荐
Tubes响应性数据系统的设计与原理
.NET ORM框架HiSql实战-第一章-集成HiSql
splitting.js密码显示隐藏js特效
【Proteus仿真】Arduino UNO利用74LS148扩展中断
零基础也能做Apple大片!这款免费工具帮你渲染、做特效、丝滑展示
广电5G正式启航,黄金频段将如何应用引关注
JS from prototype chain to inheritance
Ten thousand volumes - list sorting [01]
K-line diagram must be read for quick start
Exch:完整性检查 Database Integrity Checking
[proteus simulation] Arduino uno uses 74ls148 to extend interrupt
MySQL advanced notes
EMQ 助力青岛研博建设智慧水务平台
Send the injured baby for emergency medical treatment. Didi's driver ran five red lights in a row
5G商用三年,未来创新何去何从?
Analysis on the construction scheme and necessity of constructing expressway video monitoring platform
万卷书 - 欧洲的门户 [The Gates of Europe]
Parker proportional overflow valve rs10r35s4sn1jw
Is there an optimal solution to the energy consumption anxiety in the data center?
Development: how to install offline MySQL in Linux system?