Nginx的拒绝服务漏洞主要影响版本为1.10.3之前的版本,为不影响原有nginx的使用,且为避免修改其它配置文件,可以通过编译nginx最新版本的执行文件去替换旧的执行文件,文中的场景为由nginx1.8.0版本平滑升级到1.10.3版本,安装过程如下:

1、         nginx安装依赖如下安装包:

openssl:http://www.openssl.org/source/openssl-fips-2.0.9.tar.gz
zlib:http://zlib.net/zlib-1.2.8.tar.gz
pcre:ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.38.tar.gz

2、查看nginx的当前版本

进入   /sur/sbin/目录下执行如下命令:

./nginx  -V  查看版本

[root@push1 sbin]# ./nginx -V

nginx version: nginx/1.9.9

built by gcc 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC)

built with OpenSSL 1.0.1p 9 Jul 2015

TLS SNI support enabled

configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-mail --with-mail_ssl_module --with-file-aio --with-ipv6 --with-cc-opt='-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --with-openssl=/usr/local/src/openssl-1.0.1p

2下载nginx1.10.3版本

下载地址:http://nginx.org/download/nginx-1.10.3.tar.gz

上传安装包到opt目录下

解压  tar –zxvf  nginx-1.10.3.tar.gz

进入目录:  cd  nginx-1.10.3

指定配置信息:./configure  --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-mail --with-mail_ssl_module --with-file-aio --with-ipv6 --with-cc-opt='-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --with-openssl=/usr/local/src/openssl-1.0.1p

注意:prefix=的内容为步骤2查看版本显示的内容

3、编译:make,不需要make install

4、备份原来的nginx的可执行文件,进入 /usr/sbin执行

mv   nginx   nginx.old

5、拷贝新编译的执行文件代替旧的文件

5、如果报text  file   busy 需先停掉nginx,命令如下:

pkill -int nginx

6、再次查看版本信息

[root@push1 sbin]# ./nginx -V

nginx version: nginx/1.10.3

built by gcc 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC)

built with OpenSSL 1.0.1p 9 Jul 2015

TLS SNI support enabled

configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-mail --with-mail_ssl_module --with-file-aio --with-ipv6 --with-cc-opt='-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --with-openssl=/usr/local/src/openssl-1.0.1p

7、升级成功,启动nginx

Service   nginx  start

Nginx 拒接服务漏洞(CVE-2016-0747)整改的更多相关文章

  1. Nginx SPDY缓冲区溢出漏洞

    漏洞版本: nginx 1.3.15 nginx 1.5.x 漏洞描述: CVE ID:CVE-2014-0133 Nginx是HTTP及反向代理服务器,同时也用作邮件代理服务器,由Igor Syso ...

  2. Nginx敏感信息泄露漏洞(CVE-2017-7529)

    2017年7月11日,为了修复整数溢出漏洞(CVE-2017-7529), Nginx官方发布了nginx-1.12.1 stable和nginx-1.13.3 mainline版本,并且提供了官方p ...

  3. 还在担心CC攻击? 让我们来了解它, 并尽可能将其拒之服务之外.

    还在担心CC攻击? 让我们来了解它, 并尽可能将其拒之服务之外. CC攻击是什么? 基本原理 CC原名为ChallengeCollapsar, 这种攻击通常是攻击者通过大量的代理机或者肉鸡给目标服务器 ...

  4. windows+nginx+iis+redis+Task.MainForm构建分布式架构 之 (nginx+iis构建服务集群)

    本次要分享的是利用windows+nginx+iis+redis+Task.MainForm组建分布式架构,由标题就能看出此内容不是一篇分享文章能说完的,所以我打算分几篇分享文章来讲解,一步一步实现分 ...

  5. Windows下将nginx安装为服务运行

    今天看到nginx这个小服务器软件正式版更新到了1.4.2,想玩下它.这个服务器软件虽小,但功能强大,是开源软件,有着良好的性能,被很多个人.企业,甚至大型企业所使用! 由于是在Windows下,所以 ...

  6. linux开机自启动设置,自定义开机启动模版,nginx开机自启动服务

    /etc/init.d 目录,我们把shell脚本放在这个目录下来作为启动脚本 都是用来放服务脚本的,当Linux启动时,会寻找这些目录中的服务脚本,并根据脚本的run level确定不同的启动级别. ...

  7. [已解决]通过多层nginx,tomcat服务无法获取外网真实IP

    问题描述: 使用腾讯的御天验证码,提示IP非法IP,内网的tomcat,经过2层nginx代理,服务获取的IP地址为内网ip地址,由于腾讯云的御天验证码对单一IP的频繁访问有拦截的,认定为非法IP(刷 ...

  8. 为 Nginx 创建 windows 服务自启动

    1.下载最新版的 Windows Service Wrapper 程序 下载地址:http://download.java.net/maven/2/com/sun/winsw/winsw/1.9/ 2 ...

  9. GridFS使用及配合nginx实现文件服务

    Mongodb下GridFS使用及配合nginx实现文件服务 一.GridFS简介 GridFS是mongodb下用来存储文件的一种规范,所有官方支持的驱动均实现了GridFS规范. Mongodb本 ...

随机推荐

  1. MySQL数据库char与varchar的区别分析及使用建议

    在数据库中,字符 型的数据是最多的,可以占到整个数据库的80%以上.为此正确处理字符型的数据,对于提高数据库的性能有很大的作用.在字符型数据中,用的最多的就是 Char与Varchar两种类型.前面的 ...

  2. 嵌入式程序设计中C/C++代码的优化

    虽然使软件正确是一个工程合乎逻辑的最后一个步骤,但是在嵌入式的系统开发中,情况并不总是这样的.出于对低价产品的需求,硬件的设计者需要提供刚好足够的存储器和完成工作的处理能力.所以在嵌入式软件设计的最后 ...

  3. 【原创】大数据基础之Flume(2)kudu sink

    kudu中的flume sink代码路径: https://github.com/apache/kudu/tree/master/java/kudu-flume-sink kudu-flume-sin ...

  4. 数据库-mysql-DDL-表记录操作

  5. ipfs上传下载

    上传下载步骤: 启动ipfs节点服务器: 页面效果显示如下: 当在一个终端启动ipfs节点服务器之后之后,上传下载步骤: 1.创建文件demo4,新建一个文件a.txt,文本内容为hello mkdi ...

  6. 3)django-路由系统url

    一:django路由系统说明 路由都在urls文件里,它将浏览器输入的url映射到相应的业务处理逻辑 二:django 常用路由系统配置  1)URL常用有模式一FBV(function base v ...

  7. python-模块入门二(模块循环导入,区分python文件的两种用途,模块搜索路径,软件开发的目录规范)

    一.模块的循环导入问题 run.py # import m1 # 第一次导入 m1.py # 错误示范 ''' print('正在导入m1') from m2 import y #第一次导入m2 x= ...

  8. Codeforces 1097G Vladislav and a Great Legend [树形DP,斯特林数]

    洛谷 Codeforces 这题真是妙的很. 通过看题解,终于知道了\(\sum_n f(n)^k​\)这种东西怎么算. update:经过思考,我对这题有了更深的理解,现将更新内容放在原题解下方. ...

  9. linux命令tar压缩解压

    tar -c: 建立压缩档案-x:解压-t:查看内容-r:向压缩归档文件末尾追加文件-u:更新原压缩包中的文件 这五个是独立的命令,压缩解压都要用到其中一个,可以和别的命令连用但只能用其中一个.下面的 ...

  10. Linux 上的 SQL Server 2017 的安装指南

    一:介绍背景 微软在2016年 3 月首次对外宣布了 Linux 版的 SQL Server,并于2017年 7 月发布了首个公开 RC 版.前几日在美国奥兰多召开的微软 Ignite 2017 大会 ...