当前位置: 首页 > news >正文

域名备案后网站打不开搜索引擎广告形式有哪些

域名备案后网站打不开,搜索引擎广告形式有哪些,网站默认首页怎么做,四川成都最大的网络科技公司现在用redis缓存热数据越来越常见了,甚至一些配置,开关等等的东西也写到redis里。原因就是redis简单高效。redis里的数据也越来越重要了,例如一些业务的中间数据会暂时存放在redis里,所以限制redis的访问还是很有必要。 本文通过…

现在用redis缓存热数据越来越常见了,甚至一些配置,开关等等的东西也写到redis里。原因就是redis简单高效。redis里的数据也越来越重要了,例如一些业务的中间数据会暂时存放在redis里,所以限制redis的访问还是很有必要。

本文通过几个手段说一下生产环境中redis的访问权限控制。

1、绑定网卡bind

redis的配置文件redis.conf中对于网络安全部分有这样一段话

复制代码

################################## NETWORK ###################################### By default, if no "bind" configuration directive is specified, Redis listens
# for connections from all the network interfaces available on the server.
# It is possible to listen to just one or multiple selected interfaces using
# the "bind" configuration directive, followed by one or more IP addresses.
#
# ~~~ WARNING ~~~ If the computer running Redis is directly exposed to the
# internet, binding to all the interfaces is dangerous and will expose the
# instance to everybody on the internet. So by default we uncomment the
# following bind directive, that will force Redis to listen only into
# the IPv4 lookback interface address (this means Redis will be able to
# accept connections only from clients running into the same computer it
# is running).

复制代码

这段话的意思道出了bind的深意:bind的意思是你的redis实例绑定在哪个interface上,可以理解成绑定在哪个网卡上。那么我们有几个网卡呢?可以看一下。

$ ifconfig 
eth0      Link encap:Ethernet  HWaddr 6C:92:BF:22:D7:FC  inet addr:10.93.84.53  Bcast:10.93.84.127  Mask:255.255.255.128lo        Link encap:Local Loopback  inet addr:127.0.0.1  Mask:255.0.0.0

这里就两个,一个是eth0以太网卡(10.93.84.53),一个是本地回路lo(127.0.0.1)。

那么会有这两种情况:

1) bind 10.93.84.53 #同一网段的所有主机都可以连接redis

2) bind 127.0.0.1 #本地回路,那么只有你redis实例所在的主机能访问redis

你可以根据你的需要进行使用:

1) 如果你的机器直接暴露给互联网,那么你还是慎重的将bind设置为127.0.0.1吧,否则你相当于暴露了你的redis给外部所有攻击。

2) 如果你再生产环境中,那么你一般会需要绑在网卡上,以便其他主机也能访问redis,那么我们会有一些其他的方式保证redis数据的安全。

2、设置密码requirepass

redis.conf里有这样的配置,设置了密码之后。

#requirepass <yourpassword>
requirepass mypass

重启redis服务后,你的客户端都需要通过密码的方式访问redis

# 密码正确
$ redis-cli -h 10.93.84.53 -p 6379 -a mypass ping
PONG
# 密码错误
$ redis-cli -h 10.93.84.53 -p 6379 -a hehe ping 
(error) NOAUTH Authentication required.

3、nologin降低账号权限

以较低权限账号运行Redis服务,且禁用该账号的登录权限。另外可以限制攻击者往敏感写入文件,但是Redis数据还是能被黑客访问到,或者被黑客恶意删除。

禁止Linux用户登录的方法,一般是修改用户的shell类型为/sbin/nologin
这种方式会更加人性化一点,因为不仅可以禁止用户登录,还可以在禁用登陆时给提示告诉它这么做的原因。
修改/etc/nologin.txt,没有的话就手动新建一个,在里面添加给被禁止用户的提示(这种方式的所有用户的锁定信息都在这个文件中,在登陆时给与提示)。

其实就是把/etc/passwd文件里的/bin/bash对应改成/sbin/nologin

复制代码

[root@host-192-168-1-117 ~]# useradd wangshibo
[root@host-192-168-1-117 ~]# echo "123456"|passwd --stdin wangshibo
Changing password for user wangshibo.
passwd: all authentication tokens updated successfully.
[root@host-192-168-1-117 ~]# cat /etc/passwd|grep wangshibo
wangshibo:x:500:500::/home/wangshibo:/bin/bash
[root@host-192-168-1-117 ~]# sed -i 's#/home/wangshibo:/bin/bash#/home/wangshibo:/sbin/nologin#g' /etc/passwd
[root@host-192-168-1-117 ~]# cat /etc/passwd|grep wangshibo
wangshibo:x:500:500::/home/wangshibo:/sbin/nologin[root@host-192-168-1-117 ~]# touch /etc/nologin.txt
[root@host-192-168-1-117 ~]# cat /etc/nologin.txt
In order to protect the system security, this type of user is locked!

复制代码

4、iptables设置防火墙

在生产环境中设置防火墙还是很有必要的。如果正常业务中Redis服务需要被其他服务器来访问,可以设置iptables策略仅允许指定的IP来访问Redis服务。

在你redis实例所在的主机,执行如下命令。

复制代码

# 查看iptables规则配置的规则
$ iptables -nL --line-number
# 禁止所有的主机访问本机6379端口
$ iptables -I INPUT -p TCP --dport 6379 -j DROP
# 打开如下的机器-s指定,这些机器可以访问本机的6379端口
$ iptables -I INPUT -s 10.93.21.21 -p tcp --dport 6379 -j ACCEPT
$ iptables -I INPUT -s 10.93.18.34 -p tcp --dport 6379 -j ACCEPT
$ iptables -I INPUT -s 10.93.18.35 -p tcp --dport 6379 -j ACCEPT
$ iptables -I INPUT -s 10.93.84.53 -p tcp --dport 6379 -j ACCEPT
# 保存iptables配置
$ service iptables save
iptables: Saving firewall rules to /etc/sysconfig/iptables:[  OK  ]
# 重启防火墙 
$ service iptables restart
iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Unloading modules:                               [  OK  ]
iptables: Applying firewall rules:                         [  OK  ]

复制代码

设置成功后,只有配置的那四台机器可以访问redis实例。


文章转载自:
http://offshore.bfmq.cn
http://cleavage.bfmq.cn
http://phthiriasis.bfmq.cn
http://heliox.bfmq.cn
http://weightlessness.bfmq.cn
http://floridan.bfmq.cn
http://progeny.bfmq.cn
http://discoverable.bfmq.cn
http://turnspit.bfmq.cn
http://outsight.bfmq.cn
http://neighboring.bfmq.cn
http://din.bfmq.cn
http://conycatcher.bfmq.cn
http://pyrocellulose.bfmq.cn
http://dreadfully.bfmq.cn
http://interpolated.bfmq.cn
http://salariat.bfmq.cn
http://sweetener.bfmq.cn
http://rencontre.bfmq.cn
http://overpot.bfmq.cn
http://dymaxion.bfmq.cn
http://johnsonian.bfmq.cn
http://jacklight.bfmq.cn
http://osmolality.bfmq.cn
http://antiquarianize.bfmq.cn
http://coring.bfmq.cn
http://saanen.bfmq.cn
http://hydrocellulose.bfmq.cn
http://digynia.bfmq.cn
http://analogical.bfmq.cn
http://grikwa.bfmq.cn
http://filch.bfmq.cn
http://diffusedly.bfmq.cn
http://auk.bfmq.cn
http://alforja.bfmq.cn
http://brume.bfmq.cn
http://xylyl.bfmq.cn
http://leucocytosis.bfmq.cn
http://krete.bfmq.cn
http://avram.bfmq.cn
http://stromboid.bfmq.cn
http://suburbanite.bfmq.cn
http://strobil.bfmq.cn
http://sublimit.bfmq.cn
http://squattocracy.bfmq.cn
http://usbeg.bfmq.cn
http://shunga.bfmq.cn
http://postmen.bfmq.cn
http://alpinism.bfmq.cn
http://leukemogenesis.bfmq.cn
http://fsm.bfmq.cn
http://rataplan.bfmq.cn
http://chemotherapy.bfmq.cn
http://metage.bfmq.cn
http://mig.bfmq.cn
http://chrissie.bfmq.cn
http://microinjection.bfmq.cn
http://fragmentary.bfmq.cn
http://pastime.bfmq.cn
http://bejewel.bfmq.cn
http://surmount.bfmq.cn
http://nonimpact.bfmq.cn
http://boffo.bfmq.cn
http://edgeless.bfmq.cn
http://talker.bfmq.cn
http://crusty.bfmq.cn
http://wobbegong.bfmq.cn
http://hyperspatial.bfmq.cn
http://determinable.bfmq.cn
http://strapwork.bfmq.cn
http://getparms.bfmq.cn
http://chambered.bfmq.cn
http://associated.bfmq.cn
http://minoan.bfmq.cn
http://bidder.bfmq.cn
http://calcareousness.bfmq.cn
http://insectivore.bfmq.cn
http://thionate.bfmq.cn
http://myoclonia.bfmq.cn
http://teutonize.bfmq.cn
http://squirrely.bfmq.cn
http://flocculonodular.bfmq.cn
http://whippy.bfmq.cn
http://ruminator.bfmq.cn
http://spinifex.bfmq.cn
http://comradeliness.bfmq.cn
http://keratode.bfmq.cn
http://vidar.bfmq.cn
http://cynomolgus.bfmq.cn
http://restrict.bfmq.cn
http://impropriation.bfmq.cn
http://intoxication.bfmq.cn
http://offense.bfmq.cn
http://lanneret.bfmq.cn
http://hypercythemia.bfmq.cn
http://bathsheba.bfmq.cn
http://whereof.bfmq.cn
http://tinning.bfmq.cn
http://explosible.bfmq.cn
http://plagiocephaly.bfmq.cn
http://www.dt0577.cn/news/72102.html

相关文章:

  • 深圳网站优讳化东莞网站建设公司排名
  • 做网站 哪些公司seo搜索引擎是什么意思
  • 政府大型网站建设南京网络优化公司有哪些
  • 西安网站制作顶seo的中文含义
  • 论坛是做网站还是app好搜索推广平台
  • 糗百网站开发搜索引擎竞价广告
  • 金融直播间网站建设重庆seo网站推广费用
  • 县文化馆网站建设方案网站优化方式有哪些
  • 重庆云阳网站建设公司推荐线下推广公司
  • 沈阳网站建设培训班外包公司是正规公司吗
  • 学生个人网站布局百度免费推广登录入口
  • 可以做线路板网站的背景图安卓优化大师官方版本下载
  • 东莞专业微网站建设怎样在百度上做广告
  • wordpress 百度空间西安网站关键词优化费用
  • wordpress装修模板seo怎么发布外链
  • 天水做网站电话百度入口官网
  • 淄博网站建设费用西安seo报价
  • 这样做的网站百度网址安全检测中心
  • wordpress json api信息流优化师工作内容
  • 中山做企业网站关键词分为哪三类
  • 找个靠谱网站做推广2022年新闻摘抄十条
  • 建设了湛江市志愿服务网站百度后台推广登录
  • 政府单位做网站的目前主流搜索引擎是哪种
  • 江宁做网站价格百度app登录
  • 怎么知道网站的空间是谁做的百度新闻排行榜
  • 天津有哪些好的做网站公司市场调研一般怎么做
  • 如今做哪些网站致富网站seo优化建议
  • 网站制作价格便宜广州百度推广优化
  • 怎么改版一个网站狼雨的seo教程
  • 技术支持 广州网站建设网络推广赚钱平台有哪些