CentOS 7에서 원격 VPN 로그인 IP 주소 제한

CentOS 7에서 원격 VPN 로그인 IP 주소 제한

에 대한 설치 에서 사용자가 올바른 사용자 이름과 비밀번호로 연결해야 할 뿐만 아니라 특정 OpenSSH. 목록 ? 이것이 가능합니까 ? 제안된 솔루션의 요구 사항으로 다른 유형의 자격 증명을 추가할 수 있습니까?authenticationIP addressCentOS 7web serverVPNauthorized IP addressesOpenSSH

나는 읽었다이 게시물, 그러나 단순히 비인가 IP를 차단하는 것이 아니라 비인가 IP로부터의 접근을 보고하는 접근 방식으로 보입니다.

가능하다면 자유 소프트웨어에 집중하고 싶습니다.

답변1

바라보다 man sshd_config:

 AllowUsers
         This keyword can be followed by a list of user name patterns, separated by
         spaces.  If specified, login is allowed only for user names that match one of
         the patterns.  Only user names are valid; a numerical user ID is not recog‐
         nized.  By default, login is allowed for all users.  If the pattern takes the
         form USER@HOST then USER and HOST are separately checked, restricting logins
         to particular users from particular hosts.  The allow/deny directives are
         processed in the following order: DenyUsers, AllowUsers, DenyGroups, and
         finally AllowGroups.

         See PATTERNS in ssh_config(5) for more information on patterns.

그리고 man ssh_config:

PATTERNS
     A pattern consists of zero or more non-whitespace characters, ‘*’ (a wildcard that
     matches zero or more characters), or ‘?’ (a wildcard that matches exactly one charac‐
     ter).  For example, to specify a set of declarations for any host in the “.co.uk” set
     of domains, the following pattern could be used:

           Host *.co.uk

     The following pattern would match any host in the 192.168.0.[0-9] network range:

           Host 192.168.0.?

     A pattern-list is a comma-separated list of patterns.  Patterns within pattern-lists
     may be negated by preceding them with an exclamation mark (‘!’).  For example, to
     allow a key to be used from anywhere within an organisation except from the “dialup”
     pool, the following entry (in authorized_keys) could be used:

           from="!*.dialup.example.com,*.example.com"

관련 정보