The <allow/> and <deny/> Tags
You can control at the IP address and network level who can connect to
your Jabber server with the
<allow/> and
<deny/> tags.
The default (when no tags are specified) is to allow connections from
everywhere. If you use <allow/>
tags, then connections will be allowed only from the
addresses or networks specified. If you use
<deny/> tags, then connections
will be denied from those addresses or networks specified. If you have
both <allow/> and
<deny/>
tags, the intersection of addresses between the two tag sets will
be denied. In other words,
<deny/> overrides
<allow/>.
The tags wrap individual IP addresses, which are specified using the
<ip/> tag, or network
addresses, which are specified using the
<ip/> tag in combination
with the <mask/> netmask
tag. Example 4-22
shows connections to a Jabber server being limited to
hosts from two internal networks with the exception of one particular IP
address,
and a specific host on the Internet.
<allow> <ip>192.168.10.0</ip> <mask>255.255.255.0</mask> </allow> <allow> <ip>192.168.11.0</ip> <mask>255.255.255.0</mask> </allow> <allow> <ip>195.82.105.244</ip> </allow> <deny> <ip>192.168.11.131</ip> </deny>
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access