Server-to-Server problem

Hello Ignite Realtime community

I started a project to replace the IM MSN solution for Openfire/Spark solution inthe matrix and on a branch of the company I work for.Istarted testing creating two identical servers in the same network the I followedthis steps:

  1. I created two Ubuntu Server 12.04.1 LTS x86 (servmess, servmess1);

  2. I Installed java openjdk-7-jre: apt-get install openjdk-7-jre;

  3. I installed and I configurated openfire_3_7_1.tar.gz as follows:

  • tar -xzvf openfire_3_7_1.tar.gz
  • mv openfire /usr/bin
  • I changed the file openfired(check it attached),I copied it to the /etc/init.d and I included the reference to this file in /etc/rc.local to starts automatically.
  • I created a simple firewall with explicit INPUTand OUTPUT permission to port 5269 on both servers;
  • I manually set static IP and DNS name server in DHCPand DNS server (Windows Server 2008) for both servers;
  • I manually configured the server names in the /etc/hosts fileon each server Ubuntu(servmess, servmess1) referencing one another;
  • I configurated Openfire to ensure matching domain name with the DNS name;
  1. I created users on eachserver and installed sparkon some computers Windows XP / 7 for testing positive for both servers, ie Openfire / Spark works.

  2. I Tested if the communication between servmess-servmess1-servmess works with telnet in each of the servers as follows:

root@ServMess:~# telnetservmess1 5269

Trying 192.168.0.34…

Connected to ServMess1.

Escape character is’^]’.


root@ServMess:~# telnetservmess 5269

Trying 192.168.0.35…

Connected to ServMess.

Escape character is’^]’.

Despite the success of the installation and configuration of servers and individual success in establishing communication between Ubuntu servers (servmess and servmess1), the Openfire servers does not recognize each other.

My questions are:

  1. Howto properly configure the server for Openfire they recognize each other?

  2. InstallingServmess1 the branch, setting the FORWARD to port 5269 on the router andcreating a NAT rule as follows in Firewall of Ubuntu, the servers willcommunicate Openfire?

iptables-tnat-A PREROUTING-p tcp - dport 5269-j DNAT - to <IP_INTERNET>

Regards,

-------------------(portuguese) ------------------------

Olá caros amigos dacomunidade Ignite Realtime

Iniciei um projeto desubstituição dos IM MSN para solução Openfire/Spark na matriz e em uma filialda empresa em que trabalho.

Iniciei os testescriando dois servidores identicos na mesma network e segui os seguintes passos:

  1. Criei dois servidores Ubuntu 12.04.1 LTS x86 (servmess,servmess1);

  2. Instalei o java openjdk-7-jre: apt-get installopenjdk-7-jre;

  3. Instalei e configurei o openfire_3_7_1.tar.gzda seguinte forma:

  • tar -xzvf openfire_3_7_1.tar.gz
  • mv openfire /usr/bin
  • eu alterei do arquivo openfired (veja está emanexo), eu o copiei para a pasta /etc/init.d além de incluir a referência aeste arquivo no arquivo /etc/rc.local para que seja iniciado automaticamente.
  • criei um firewall simples com permissão explicitade INPUT e OUTPUT para a porta 5269 em ambos os servidores;
  • defini o IP static e nome DNS no servidor DHCPe DNS da rede (Windows server 2008) para ambos os servidores
  • defini manualmente os nomes dos servidores noarquivo /etc/hosts em cada um dos servidores Ubuntu (servmess, servmess1) referenciandoum ao outro;
  • configuração do openfire garantindo acorrespondência do domain com o nome DNS;
  1. Criei usuários em cada um dosservidores e instalei o spark em alguns computadores Windows XP/7 para testescom resultado positivo para ambos os servidores, ou seja, Openfire/Sparkfunciona.

  2. Testei a comunicaçãoservmess-servmess1-servmess com telnet em cada um dos servidores como se segue:

root@ServMess:~# telnetservmess1 5269

Trying 192.168.0.34…

Connected to ServMess1.

Escape character is’^]’.


root@ServMess:~# telnetservmess 5269

Trying 192.168.0.35…

Connected to ServMess.

Escape character is’^]’.

Apesar do sucesso dainstalação e configuração individual dos servidores e do sucesso em estabelecercomunicação entre os servidores Ubuntu (servmess e servmess1), os servidoresOpenfire não se reconhecem.

As minhas perguntas são:

  1. Como configurar corretamente o servidorOpenfire para que eles se reconheçam?
  2. Instalando o Servmess1 na filial, configurandoo FORWARD para a porta 5269 no Router e criando uma regra NAT como se segue noFirewall do Ubuntu, os servidores Openfire se comunicarão?

iptables -t nat -APREROUTING -p tcp --dport 5269 -j DNAT–to <IP_INTERNET>

abraços