历史Linux镜像的问题修复方案
历史Linux镜像创建的ECS云服务器,可能存在NTP没有配置,YUM没有配置,还可能存在最近暴漏较高的安全漏洞,请按照以下步骤进行修复,可以让您的云服务器更加安全,还可以使用阿里云提供的YUM服务进行安装软件,可以使用免费的阿里云提供的NTP进行时间同步。
1. 配置NTP
不区分发行版,先备份 /etc/ntp.conf,然后将其内容替换为如下:
# ntp.conf## ntpd config for aliyun ecs.## 6LAN+6LAN+3WAN# shijun.cao@alibaba-inc.com# 2014.8.11#driftfile /var/lib/ntp/driftpidfile /var/run/ntpd.pidlogfile /var/log/ntp.log# Access Control Supportrestrict default ignorerestrict -6 default ignorerestrict 127.0.0.1restrict 192.168.0.0 mask 255.255.0.0 nomodify notrap nopeer noqueryrestrict 172.16.0.0 mask 255.240.0.0 nomodify notrap nopeer noqueryrestrict 100.64.0.0 mask 255.192.0.0 nomodify notrap nopeer noqueryrestrict 10.0.0.0 mask 255.0.0.0 nomodify notrap nopeer noqueryrestrict ntp1.aliyun.com nomodify notrap nopeer noqueryrestrict ntp2.aliyun.com nomodify notrap nopeer noqueryrestrict ntp3.aliyun.com nomodify notrap nopeer noqueryrestrict ntp4.aliyun.com nomodify notrap nopeer noqueryrestrict ntp5.aliyun.com nomodify notrap nopeer noqueryrestrict ntp6.aliyun.com nomodify notrap nopeer noquery# local clockserver 127.127.1.0fudge 127.127.1.0 stratum 10#public ntp serverserver ntp1.aliyun.com iburst minpoll 4 maxpoll 10server ntp2.aliyun.com iburst minpoll 4 maxpoll 10server ntp3.aliyun.com iburst minpoll 4 maxpoll 10server ntp4.aliyun.com iburst minpoll 4 maxpoll 10server ntp5.aliyun.com iburst minpoll 4 maxpoll 10server ntp6.aliyun.com iburst minpoll 4 maxpoll 10#Private ntp serverserver ntp1.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10server ntp2.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10server ntp3.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10server ntp4.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10server ntp5.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10server ntp6.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10#New private ntp serverserver ntp7.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10server ntp8.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10server ntp9.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10server ntp10.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10server ntp11.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10server ntp12.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10
评论列表()