RD之家欢迎你,立即注册 登录
RD笔记 返回首页

Toolong的个人空间 https://www.rdzhijia.com/?14227 [收藏] [复制] [分享] [RSS]

日志

20 quick tips to make Linux networking easier (2/20)

已有 62 次阅读2020-2-19 10:58 |系统分类:Linux

2: Keep out unwanted users with /etc/hosts.deny
Yet another helpful “hosts” file is hosts.deny. This file allows you to create access control based on client or
server names. This is helpful in many ways. You can block blacklist domains from gaining access to your
network or you can block certain users from gaining access to certain machines. But no matter how you use
it, the format is the same.
Let’s say you want to block the domain bad.domain.name from gaining access to a machine. To do this, open
up the /etc/hosts.deny file (you will need either root or sudo privileges) and add this to the bottom of the file:
ALL: bad.domain.name
Save it and you’re good to go.

路过

鸡蛋

鲜花

握手

雷人

评论 (0 个评论)

facelist

您需要登录后才可以评论 登录 | RD之家欢迎你,立即注册

QQ|Archiver|手机版|小黑屋|个人研发笔记 京ICP备18037383号-1

GMT+8, 2020-4-10 02:59

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

返回顶部