Firewall configuration for Red5/SIP

G’day everyone,

I’m experiencing issues with red5 video chat and desktop sharing while in WAN.

OpenFire 3.7.1

Kraken 1.1.3.beta3

Sip phone 1.0.6 (not AsteriskIM) points to local Asterisk server.

iptables on the Openfire server (ScientificLinux 6.1)

-A INPUT -p tcp -i eth0 --dport 843 -j ACCEPT

-A INPUT -p tcp -i eth0 --dport 5222 -j ACCEPT

-A INPUT -p tcp -i eth0 --dport 1935 -j ACCEPT

-A INPUT -p tcp -i eth0 --dport 9191 -j ACCEPT

iptables on the router (CentOs 6.1)

-A INPUT -p tcp -i eth0 --dport 843 -j ACCEPT -m comment --comment “OpenFire Flash”

-A INPUT -p tcp -i eth0 --dport 5222 -j ACCEPT -m comment --comment “OpenFire SSL”

-A INPUT -p tcp -i eth0 --dport 1935 -j ACCEPT -m comment --comment “OpenFire RM”

-A PREROUTING -d 79.104.9.122/32 -p tcp -m tcp --dport 843 -j DNAT --to-destination 10.1.50.21:7070 -m comment --comment “OpenFire”

-A PREROUTING -d 79.104.9.122/32 -p tcp -m tcp --dport 1935 -j DNAT --to-destination 10.1.50.21:5222 -m comment --comment “OpenFire”

-A PREROUTING -d 79.104.9.122/32 -p tcp -m tcp --dport 5222 -j DNAT --to-destination 10.1.50.21:5223 -m comment --comment “OpenFire”

LAN

DNS for LAN has both A and PTR for openfire server, resolvable by all clients internaly.

On the LAN cleints are able to chat, send files, call through Asterisk (outside calls are of bad quality, but that’s the issue for another thread:), start video chats.

WAN

So the client on the outside can use XMPP, connect to Kraken plugin.

But

  1. SIP extention says “Failed to start phone”

  2. Red5 unable to start video chat or share desktop (This program cannot display the webpage error)

  3. Unable to transfer files (“there was an error during file transfer” sign).

Which additional ports should I open to use video and sip features?

For file transfer feature I assume I need to open and forward tcp/udp ports 7777.

I really appreciate the help with these issues and will post my experience with installing/configuring OpenFire, which may help future users.