فهرست منبع

Add an option for ssh server to avoid remote host dns look up (usefull for IPv6)

Emmanuel Bouthenot 11 سال پیش
والد
کامیت
2ae30ddc3e
2فایلهای تغییر یافته به همراه7 افزوده شده و 0 حذف شده
  1. 1 0
      group_vars/all
  2. 6 0
      roles/common/templates/ssh/sshd_config.j2

+ 1 - 0
group_vars/all

@@ -30,6 +30,7 @@ with_smtp_aliases: False
 with_ssh: True
 ssh_port: 2222
 ssh_ecdsa_key: True
+ssh_usedns: True
 
 http_auth_admin_password: seVDetGvSs7nA # openssl passwd -crypt adm123in
 

+ 6 - 0
roles/common/templates/ssh/sshd_config.j2

@@ -30,6 +30,12 @@ HostKey /etc/ssh/ssh_host_ecdsa_key
 #Privilege Separation is turned on for security
 UsePrivilegeSeparation yes
 
+{% if not ssh_usedns %}
+# Enable/Disable reverse DNS check
+# Avois long lag in case of IPv6 connection with no reverse configured
+UseDns no
+{% endif %}
+
 # Lifetime and size of ephemeral version 1 server key
 KeyRegenerationInterval 3600
 ServerKeyBits 768