zoukankan      html  css  js  c++  java
  • 配置ssh远程访问策略

    假如有两个域,一个是example.com(172.25.0.0/16),一个是my133t.org(172.24.0.0/16)

    要求:从域group3.example.com能ssh远程访问两个虚拟机,而在域my133t.org中客户端不能远程访问两个虚拟机

    第一步:

    首先要在两台虚拟机开启enforcing模式,打开vi  /etc/selinux/config

    SELINUX=enforcing 

    SELINUX=targeted

    第二步:

    在虚拟机的/etc/hosts.allow和/etc/hosts.deny配置

    hosts.allow里写入:sshd:172.25.0

    hosts.deny里写入:sshd:172.24.0

    关于:/etc/hosts.allow   /etc/hosts/deny文件

    这是两个控制远程访问的配置文件,可以控制ip段允许或者拒绝访问某个服务,通常是ssh服务;当hosts.allow和 host.deny相冲突时,以hosts.allow设置为准。linux 系统会先检查/etc/hosts.deny规则,再检查/etc/hosts.allow规则,如果有冲突 按/etc/hosts.allow规则处理

  • 相关阅读:
    HTML标签(二)
    HTML 表单
    HTML列表
    HTML表格
    Critical Section Problems
    Stack, Queue and Priority Queue
    Introduction to Dynamic Set
    Introduction to Divide-and-Conquer
    Sorting Algorithms Overview
    Python学习笔记(三)数据类型
  • 原文地址:https://www.cnblogs.com/wangnengwu/p/6829790.html
Copyright © 2011-2022 走看看