2.2 Using JOH in Standalone Mode

Configuring johd to work in standalone mode is pretty straightforward: all you have to do is give it an address (or addresses) to listen on and instruct it to open these addresses in ‘HTTP’ class. In a simplest case, the following command will do:

 
johd -c HTTP

It will instruct johd to listen on port 80 on all configured network interfaces. To select a particular address or addresses to listen on, use the ‘-l’ option, as described in the previous section.

It is important to configure your ‘/etc/hosts.allow’ to control accesses to the incoming HTTP port and outgoing Jabber connections. For example, the two lines below allow access to HTTP from anywhere and grant anybody the right to request any Jabber servers:

 
johd: ALL
johd/jabber@ALL: ALL

As a more complex example, the entries below allow access to HTTP from anywhere and limit the use of Jabber servers to 208.68.163.220 and 192.168.10.1. The use of 208.68.163.220 is granted to anybody, and the use of 192.168.10.1 is allowed only for clients coming from IP addresses in the range 192.168.0.1 — 192.168.0.254.

 
johd: ALL
johd/jabber@208.68.163.220: ALL
johd/jabber@192.168.10.1: 192.168.10.0/24