ejabberd - Comments for "ACL for all user" https://www.ejabberd.im/forum/28585/acl-all-user en I copied your config to my https://www.ejabberd.im/forum/28585/acl-all-user#comment-67161 <p>I copied your config to my ejabberd 16.09 server. First I adapted the served hosts and certfile. Then I had to define the IP address as IPv6, because you configured the 5222 listener to be IPv6:</p> <pre> vpn: ip: - "::FFFF:127.0.0.1" </pre><p>Then finally I am able to login with a client from the same machine that the server:</p> <pre> (ejabberd@localhost)1&gt; 17:34:29.738 [info] (#Port&lt;0.19422&gt;) Accepted connection ::FFFF:127.0.0.1:35111 -&gt; ::FFFF:127.0.0.1:5222 17:34:35.502 [info] ({socket_state,gen_tcp,#Port&lt;0.19422&gt;,&lt;0.485.0&gt;}) Accepted authentication for user2 by undefined from ::FFFF:127.0.0.1 17:34:35.590 [info] ({socket_state,gen_tcp,#Port&lt;0.19422&gt;,&lt;0.485.0&gt;}) Opened session for user2@localhost/tka1 </pre><p> In your case, maybe you are using an ejabberd version from a few months ago, which still don't support that 'ip' option?</p> Thu, 27 Oct 2016 15:32:00 +0000 badlop comment 67161 at https://www.ejabberd.im badlop wrote: Your case is https://www.ejabberd.im/forum/28585/acl-all-user#comment-67158 <div class="quote-msg"> <div class="quote-author"><em>badlop</em> wrote:</div> <p>Your case is very similar, simply put ip in the list. For example, this allows c2s connections from your vpn list (the ones with IP in the 127.0.0.1/8 range), and denies everything else:</p> <pre> acl: vpn: ip: - "127.0.0.0/8" access_rules: c2s: - allow: vpn - deny </pre><p> Or a more short version that works in recent ejabberd versions:</p> <pre> access_rules: c2s: - allow: - ip: "127.0.0.1/8" - deny </pre></div> <p>Do you mean<br /> all:deny<br /> or just "deny"?<br /> I got folowing error </p> <div class="codeblock"><code>2016-10-26 18:21:15.765 [info] &lt;0.455.0&gt;@ejabberd_listener:accept:333 (#Port&lt;0.7157&gt;) Accepted connection ::FFFF:111.221.44.148:55806 -&gt; ::FFFF:46.165.219.131:5222<br />2016-10-26 18:21:17.785 [info] &lt;0.470.0&gt;@ejabberd_c2s:wait_for_feature_request:740 ({socket_state,p1_tls,{tlssock,#Port&lt;0.7157&gt;,#Port&lt;0.7158&gt;},&lt;0.469.0&gt;}) Accepted authentication for modem by ejabberd_auth_internal from ::FFFF:111.221.44.148<br />2016-10-26 18:21:18.578 [error] &lt;0.470.0&gt;@acl:match_acl:339 Wrong ACL expression: {ip,{{111,221,44,148},32}}<br />Check your config file and reload it with the override_acls option enabled<br />2016-10-26 18:21:18.578 [error] &lt;0.470.0&gt;@acl:match_acl:339 Wrong ACL expression: {ip,{{111,221,44,148},32}}<br />Check your config file and reload it with the override_acls option enabled<br />2016-10-26 18:21:18.578 [error] &lt;0.470.0&gt;@acl:match_acl:339 Wrong ACL expression: {ip,{{111,221,44,148},32}}<br />Check your config file and reload it with the override_acls option enabled<br />2016-10-26 18:21:18.578 [error] &lt;0.470.0&gt;@acl:match_acl:339 Wrong ACL expression: {ip,{{111,221,44,148},32}}<br />Check your config file and reload it with the override_acls option enabled<br />2016-10-26 18:21:18.578 [info] &lt;0.470.0&gt;@ejabberd_c2s:wait_for_session:1141 ({socket_state,p1_tls,{tlssock,#Port&lt;0.7157&gt;,#Port&lt;0.7158&gt;},&lt;0.469.0&gt;}) Forbidden session for modem@xmpp.rajaapi.net/maryamuzzamani</code></div> <p>my ejabberd.yml<br /> <noindex><a href="http://pastebin.com/HCpjd1bD" title="http://pastebin.com/HCpjd1bD" rel="nofollow" >http://pastebin.com/HCpjd1bD</a></noindex></p> Wed, 26 Oct 2016 18:24:13 +0000 kripul comment 67158 at https://www.ejabberd.im Your case is very similar, https://www.ejabberd.im/forum/28585/acl-all-user#comment-67149 <p>Your case is very similar, simply put ip in the list. For example, this allows c2s connections from your vpn list (the ones with IP in the 127.0.0.1/8 range), and denies everything else:</p> <pre> acl: vpn: ip: - "127.0.0.0/8" access_rules: c2s: - allow: vpn - deny </pre><p> Or a more short version that works in recent ejabberd versions:</p> <pre> access_rules: c2s: - allow: - ip: "127.0.0.1/8" - deny </pre> Mon, 24 Oct 2016 10:59:00 +0000 badlop comment 67149 at https://www.ejabberd.im