diff --git a/profile/jabber/etc/jabber/ejabberd.yml b/profile/jabber/etc/jabber/ejabberd.yml
index 6706b1e..3bad236 100644
--- a/profile/jabber/etc/jabber/ejabberd.yml
+++ b/profile/jabber/etc/jabber/ejabberd.yml
@@ -58,6 +58,35 @@ acl:
   local: 
     user_regexp: 
       - ""
+#?pkg(ejabberd)>=20.04#
+access_rules: 
+  announce: 
+    - allow: admin
+  c2s: 
+    - deny: blocked
+    - allow
+  configure: 
+    - allow: admin
+  local:
+    - allow: local
+  muc: 
+    - allow
+  muc_admin: 
+    - allow: admin
+  pubsub_createnode: 
+    - allow
+  register: 
+    - allow
+host_config: 
+  "localhost": 
+    access: 
+      c2s: 
+        - allow: admin
+        - deny
+      register: 
+        - deny
+#pkg#
+#?pkg(ejabberd)<20.04#
 access: 
   announce: 
     admin: allow
@@ -91,6 +120,7 @@ host_config:
         all: deny
       register: 
         all: deny
+#pkg#
 language: "en"
 modules: 
   mod_adhoc: []
@@ -122,7 +152,12 @@ modules:
   mod_pubsub: 
     access_createnode: pubsub_createnode
     plugins: 
+#?pkg(ejabberd)>=20.04#
+      - "flat"
+#pkg#
+#?pkg(ejabberd)<20.04#
       - "default"
+#pkg#
       - "pep"
   mod_register: 
     welcome_message: 
diff --git a/pym/cl_ldap.py b/pym/cl_ldap.py
index 00279a2..f07b3e4 100644
--- a/pym/cl_ldap.py
+++ b/pym/cl_ldap.py
@@ -1836,6 +1836,7 @@ This command is not allowed."))
             return self.dialogYesNo(message)
 
     def createJabberCertificate(self):
+        hostname = self.clVars.Get("sr_jabber_host")
         # создаем сертификат если есть используем прежний
         if not os.path.exists("/etc/jabber/ssl.pem"):
             if os.path.exists("/etc/jabber/self-cert.sh"):
@@ -1846,6 +1847,7 @@ This command is not allowed."))
                                      "Automatically-generated ejabberd SSL key",
                                               userName="jabber",
                                               groupName="jabber",
+                                              sslCommonName=hostname,
                                               certFile="/etc/jabber/ssl.pem",
                                               genDH=True):
                     return False
