如何反溯源隐藏自己的源IP防止溯源?
还有些大牛会进行渗透攻击、CC攻击,溯源打服务器,各式各样的,防不胜防。所以很多站长套起了cdn,比起cdn提供的加速效果,更多的站长可能还是为了保护那可怜弱小的源站ip不被发现然后攻击。
下面给大家带来一篇简单的防溯源教程
第一步:先给自己换一个新的IP
更换已经被泄露过的源IP,如果没有泄露的话就不用更换
第二步:给自己套一个CDN
Cloudfare或者腾讯阿里云之类的cdn
第三步:禁止直接通过IP访问,容易被扫到
给IP配置上一张带错误域名的证书,防止泄露你自己的域名
禁止直接访问IP,将访问IP的请求,不管是HTTP还是HTTPS全部转错误页 返回状态码444 ERR_EMPTY_RESPONSE
创建一个默认站点
在宝塔中创建一个默认站点域名随便填
修改默认站点到新创建的这个域名
给这个网页加上一张空证书,用的是亚洲诚信测试证书生成,域名的话随便填
点击刚刚添加的网站,网站名 ,添加一张空白的证书,我已经生成好了直接复制就可以使用
key(秘钥):
-----BEGIN RSA PRIVATE KEY-----
MIIEogIBAAKCAQEA3eOYHHb536pNXndHkqnc0p3BmK3J0WM1n7QzEsWnqwC1uyqK
2vQm5SwT72MN1IxKsLBHwqEu3tQC956GN4F0FGvMWQjB8J9dX7+Uw5CPryMAFQ8h
yZZe84K+QA5PQvf29IuGRMIeyXBAaHr4Pe3NRQkIrSCYhMoZk4/j6tCnwX1U09z2
eFDTQqmQcJfdreismI3RbnBpb1V0NlYgD/JzT6K2pFgtJQ38Scmuv3386HOotQA3
jGQ3fUY3NqaJGCAbqVizIUT+5cltpPyE/Cc9KEeaVu2ZZ6fVr/sDJg8w2c9Zzer9
hwzeSIErcJA6NxTT5uSlz3gz3+RcCC11sFXELwIDAQABAoIBAARUj8BmdgPub+ob
C9OJ6xxVJdUT9y9V71L5klGYd+g3cFSBxQn239dzH8R5O2jdgAuotQ3QVXjVzGUG
u/nTVe+cFvXZ3OcURR88Puv+Iz+4wCSpEfC8NYgtEgdwAA3/httI6crnuvAVd7xS
Qgv7WxkwzvGKBE/7HbqqgTkw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cS5jb20w
DQYJKoZIhvcNAQELBQADggEBAJSM9hShBE3O1Bq3hmKLiiJgBszz9cOWYTTF7Ygm
TzM1wU9rOwTz6cdD5OUsL7OUJ6bD+Wfr6sbhePMEQbYiPzKdtVhfZvSmTflhZz+N
PpZycGU7685zv4fqOFC8yLwsmL430JaX719efPH7OCuzm7iQCPpA9DLn2LyQ1zgU
TNMDf1CsoP9xEAMMbp1QmXIDlmOSV8D74n0iJRBgeWWoJd6qXK+QL2wjYlsB04Ik
EWkqjBApLXhwjpl2P8VqOfdFZMjVZHvjfyVoXw/P1uifjXKyObV1nyia5rmy+jGq
eN56Sg9F32/eaqzUQEVbAIIJGQ7P1Ch9m5olSYxTBF+6yOs=
-----END CERTIFICATE-----
然后我们保存。这个时候,我们再去查看证书的时候,已经变了
保存后,点击配置文件修改配置
listen 80 default_server;
listen 443 ssl http2 default_server;
server_name default.com;
return 444;
第四步:关闭邮件
一般邮件服务器在内部,没有CDN解析,邮件返回的域名IP可能是真实IP
关闭邮件功能或者调用第三方邮件api防止泄露源
基本上做到以上两点“空白证书”、“关闭邮件功能”,基本上可以做到不泄露源地址了