Linux Access.conf安全配置
access.conf is the configuration file used to logins to the Linux or Unix systems. This file is locate at /etc/security/ path. With this file logins of users, groups, hosts, tty, network are defined to allows or disallowed status. Each line specifies a rule.
access.conf是用于登录Linux或Unix系统的配置文件。 该文件位于/etc/security/路径。 使用此文件,用户,组,主机,tty,网络的登录名被定义为允许或禁止状态。 每行指定一个规则。
句法 (Syntax)
permission:users/groups:origins
Show Services Using Access.conf
使用Access.conf显示服务
允许规则(Allow Rule)
As we stated before each line is a rule. The aim of the rules are allowing or denying access with related parameters. Allow rule is sign is + . Each line starting with + means allow. After the sign there is : to delimit rule parameters. In the example we allow some access for the root user.
如前所述,每行都是一条规则。 规则的目的是允许或拒绝具有相关参数的访问。 允许规则的符号是+ 。 每行以+开头表示允许。 在标志之后有:分隔规则参数。 在示例中,我们允许root用户进行某些访问。
+ : root : 192.168.200.1 192.168.200.4 192.168.200.9
拒绝规则 (Deny Rule)
Deny rule is used to deny access with specified parameters. Deny rules tarts with- sign and delimited with: from the rule parameters. Following example rules denies access for the root account.
拒绝规则用于拒绝具有指定参数的访问。 从规则参数中拒绝带有-号的规则rules,并以:分隔。 以下示例规则拒绝对根帐户的访问。
- : root : ALL
只允许根访问 (Allow Only Root Access)
There are different type of access restrictions. One of them is only allowing root user to access to the server. In this rule root user can access from everywhere to the system.
有不同类型的访问限制。 其中之一是仅允许root用户访问服务器。 在此规则中,root用户可以从任何地方访问系统。
+ : root : ALL
指定允许的用户 (Specify Allowed User)
We can specify the user account which can access to the server. We will give the user ismail access right to the server from everywhere.
我们可以指定可以访问服务器的用户帐户。 我们将使用户ismail从任何地方都可以访问服务器。
+ : ismail : ALL
指定允许的组 (Specify Allowed Group)
While specifying access for the user name if there area lot of users those can access to the server can be a problem for definition and management. Acess.conf supports Linux user groups. These groups can be used to give access to the server. We assume we have a group named remoteacess and this group members can access to the server from anywhere.
在为用户名指定访问权限时(如果有很多用户可以访问服务器)可能是定义和管理的问题。 Acess.conf支持Linux用户组。 这些组可用于授予对服务器的访问权限。 我们假设有一个名为remoteacess的组,该组成员可以从任何地方访问服务器。
+ : @admins : ALL
指定允许的主机 (Specify Allowed Hosts)
Another useful option is setting hosts those can be connect to the system. Host names or IP addresses can be specified like below. In the example we only allow IP address 192.168.200.1 to connect to the system.
另一个有用的选项是设置可以连接到系统的主机。 可以如下指定主机名或IP地址。 在该示例中,我们仅允许IP地址192.168.200.1连接到系统。
+ : root : 192.168.200.1
指定允许的网络 (Specify Allowed Network)
Specifying IP ranges one by one is daunting task. We can use network and netmask specification do define networks to allow access. In the following example we allow root user access from network 10.0.0.0/24 or 10.0.0.0-255 with 10.0.0. expression.
一一指定IP范围是一项艰巨的任务。 我们可以使用网络和网络掩码规范来定义允许访问的网络。 在下面的例子中,我们允许root从网络用户访问10.0.0.0/24或10.0.0.0-255与10.0.0. 表达。
+ : root : 10.0.0.
拒绝仅根访问 (Deny Only Root Access)
Previous examples we have looked how to allow some users, groups, IP addresses and networks to the system. But security comes from deny operation. Up to new we will look how to deny users with specified parameter to access to the system. In this example user root can not access system remotely from anywhere.
在前面的示例中,我们研究了如何允许某些用户,组,IP地址和网络进入系统。 但是安全性来自拒绝操作。 到最新为止,我们将研究如何拒绝具有指定参数的用户访问系统。 在此示例中, root用户无法从任何地方远程访问系统。
- : root : ALL
指定拒绝的用户 (Specify Denied User)
We can specify user to deny access to the system. In this example user ismail can not access to the system from anywhere.
我们可以指定用户拒绝对系统的访问。 在此示例中,用户ismail无法从任何地方访问系统。
- : ismail : ALL
指定允许的组 (Specify Allowed Group)
As shown previous examples a Linux user group can be defined fo deny access to the system. In the example we will deny access for students group from anywhere.
如前面的示例所示,可以定义Linux用户组以拒绝访问系统。 在示例中,我们将拒绝从任何地方访问students组。
- : @students : ALL
指定拒绝的主机 (Specify Denied Hosts)
We can specify hosts to deny access to the system. We will use same syntax like allow rule but change the rule sign with - . In the example we deny access from 192.168.200.1 to the system.
我们可以指定主机以拒绝对系统的访问。 我们将使用与allow rule相同的语法,但使用-更改规则符号。 在示例中,我们拒绝从192.168.200.1到系统的访问。
- : root : 192.168.200.1
指定拒绝的网络 (Specify Denied Network)
We can specify denied network with - sign, username and the network address. In the example we will deny 10.0.0.0/24 from accessing with root user to the system.
我们可以使用-符号,用户名和网络地址指定拒绝的网络。 在该示例中,我们将拒绝10.0.0.0/24通过root用户访问系统。
- : root : 10.0.0.
异常定义 (Exception Definition)
Up to now we have specified and defined the users , host names, groups and networks. We have the ability to except these. In the example we allow all users access to the system except root . We can also specify group names to except.
到目前为止,我们已经指定并定义了用户,主机名,组和网络。 我们有能力排除这些。 在该示例中,我们允许除root之外的所有用户访问系统。 我们还可以将组名指定为except。
+ : ALL EXCEPT (root) : ALL
全部拒绝 (Deny All)
The readers who worked with firewalls knows the golden rule. After specifying different access rules the best practice is defining last rule as DENY ALL . This will make system very secure. This simply imply that I only allow those connections I defined and deny all others. Put this rule to the end of the rules in access.conf file.
使用防火墙的读者知道黄金法则。 指定不同的访问规则后,最佳做法是将最后一个规则定义为DENY ALL 。 这将使系统非常安全。 这仅表示我只允许我定义的那些连接,而拒绝所有其他连接。 将此规则放在access.conf文件中规则的末尾。
- : ALL : ALL
翻译自: https://www.poftut.com/access-conf-security-configuration-linux-unix/
Linux Access.conf安全配置的更多相关文章
- VMware Linux 下 Nginx 安装配置 - nginx.conf 配置 [负载两个 Tomcat] (三)
首先启动Nginx 1. 相关浏览 两个 Tomcat 配置: VMware Linux 下 Nginx 安装配置 - Tomcat 配置 (二) Nginx 安装配置启动: VMware Linu ...
- linux limits.conf 配置
转自:http://kerry.blog.51cto.com/172631/300784 limits.conf 文件实际是 Linux PAM(插入式认证模块,Pluggable Authentic ...
- Linux 桌面系统字体配置要略
字体显示效果测试 这一段是为了测试宋体字的显示效果,包括宋体里面自带的英文字体,“This is english,how does it look like?”.这一行是小字.后面几个字是加粗的宋体. ...
- Linux 桌面玩家指南:04. Linux 桌面系统字体配置要略
特别说明:要在我的随笔后写评论的小伙伴们请注意了,我的博客开启了 MathJax 数学公式支持,MathJax 使用$标记数学公式的开始和结束.如果某条评论中出现了两个$,MathJax 会将两个$之 ...
- Linux 各类设置、配置、使用技巧参考,Linux使用集锦
========== 参考格式 (新增记录时,复制粘贴在下)============= [日期]: <标题> 参考链接ref1: 参考链接ref2: 正文: ========== 参考格式 ...
- 3-nginx.conf参数配置
–#定义Nginx运行的用户和用户组 –user www www; –#nginx进程数,建议设置为等于CPU总核心数. –worker_processes8; –#全局错误日志定义类型,[ debu ...
- redis.conf 具体配置详解
redis.conf 具体配置详解 # redis 配置文件示例 # 当你需要为某个配置项指定内存大小的时候,必须要带上单位, # 通常的格式就是 1k 5gb 4m 等酱紫: # # 1k => ...
- Apache 中httpd.conf文件配置详解(转载)
httpd.conf文件配置详解 Apache的基本设置主要交由httpd.conf来设定管理,我们要修改Apache的相关设定,主要还是通过修改httpd.cong来实现.下面让我们来看看htt ...
- linux Apache CGI 安装配置
Apache 中的提交了一种利用扩展应用程序执行动态网页的机制. 称为Common Gateway Interface (通用网关接口)简称CGI. 本文假定已安装好linux(本文的linux版本为 ...
随机推荐
- 【MQ中间件】RabbitMQ -- SpringBoot整合RabbitMQ(3)
1.前言说明 前面一篇博客中提到了使用原生java代码进行测试RabbitMQ实现多种交换机类型的队列场景.但是在项目中我们一般使用SpringBoot项目,而且RabbitMQ天生对于Spring的 ...
- 自动化kolla-ansible部署ubuntu20.04+openstack-victoria之配置环境-05
自动化kolla-ansible部署ubuntu20.04+openstack-victoria之配置环境-05 欢迎加QQ群:1026880196 进行交流学习 #全部节点执行如下操作 1. 安装常 ...
- Docker下MySQL的安装
1 概述 本文讲述了如何利用Docker去安装MySQL,以及MySQL自定义配置文件的相关设置. 2 安装Docker 首先安装Docker并开启服务: systemctl start docker ...
- vue Element-ui 表格多选 修改选中行背景色
实现的效果: 整体思路方式: 1.给获取到的数据添加自定义的className 2.在点击行(row-click)和手动点击勾选框的事件(select-all)中获取到当前的row的className ...
- Java JFR 民间指南 - 事件详解 - jdk.ObjectAllocationOutsideTLAB
重新申请 TLAB 分配对象事件:jdk.ObjectAllocationOutsideTLAB 引入版本:Java 11 相关 ISSUES: JFR: RecordingStream leaks ...
- python3存储numpy格式的矩阵
技术背景 numpy在python中的地位是相当高的,即使是入门的python使用者也会经常看到这个库的使用.除了替代python自带的列表数据格式list之外,numpy的一大优势是其底层的高性能实 ...
- Python Basics with numpy (optional)
Python Basics with Numpy (optional assignment) Welcome to your first assignment. This exercise gives ...
- ES系列(四):http请求分发框架解析
上一篇讲解了es的网络通信模块实现过程,大致明白其工作原理.再总结一下,就是基于netty编程范式,形成es通信基础.从而,最终我们得到几个重要的handler: Netty4HttpPipelini ...
- 【Spring】 Spring如何解决循环依赖的问题?
https://mp.weixin.qq.com/s/FtbzTMxHgzL0G1R2pSlh-A 通常来说,如果问Spring内部如何解决循环依赖,一定是单默认的单例Bean中,属性互相引用的场景. ...
- 手机改 user模式为debug模式
logcat 是Android中一个命令行工具,可用于监控手机应用程序的log信息.网上相关的教学很多,这里只想把自己折腾 2 部手机(一个是三星S4 I9500 港水,Android 5.01,一个 ...