Puppet Class: security_baseline::rules::common::sec_telnet

Defined in:
manifests/rules/common/sec_telnet.pp

Summary

Ensure telnet server is not enabled (Scored)

Overview

The telnet-server package contains the telnet daemon, which accepts connections from users from other systems via the telnet protocol.

Rationale: The telnet protocol is insecure and unencrypted. The use of an unencrypted transmission medium could allow a user with access to sniff network traffic the ability to steal credentials. The ssh package provides an encrypted session and stronger security.

Examples:

class security_baseline::rules::common::sec_telnet {
    enforce => true,
    message => 'Test',
    log_level => 'info'
}

Parameters:

  • enforce (Boolean) (defaults to: true)

    Enforce the rule or just test and log

  • message (String) (defaults to: '')

    Message to print into the log

  • log_level (String) (defaults to: '')

    The log_level for the above message



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'manifests/rules/common/sec_telnet.pp', line 29

class security_baseline::rules::common::sec_telnet (
  Boolean $enforce = true,
  String $message = '',
  String $log_level = ''
) {
  if($enforce) {

    ensure_resource('service', ['telnet.socket'], {
      ensure => 'stopped',
      enable => false
    })

  } else {

    if($facts['security_baseline']['services_enabled']['srv_telnet.socket'] == 'enabled') {
      echo { 'telnet':
        message  => $message,
        loglevel => $log_level,
        withpath => false,
      }
    }
  }
}