Search code examples
windowsamazon-ec2telnetwindows-server-2012windows-firewall

Telnet / Security Groups


I'm in the middle of installing and configuring an XMPP server, using ejabberd on Windows server 2012, running on an EC2 box.

I have opened port 5222 within windows firewall, and added to the security group for the EC2 instance

Custom TCP Rule
TCP
5222
0.0.0.0/0
ejabberd_c2s

Custom TCP Rule
TCP
5222
::/0
ejabberd_c2s

My XMPP logins are not working, and so I've turned to telnet to try and debug - it sees that port 5222 is reporting as closed:

PS C:\WINDOWS\system32> telnet hostname.com 5222
Connecting To hostname.com...Could not open connection to the host, on port 5222: Connect failed

Any guidance or steps towards debugging would be appreciated!


Solution

  • The issue here was in ejabberd's default configuration of "::" as an IP to listen, which forced it to listen only to IPv6.

    By updating the ejabbed config to

    port: 5222
    ip: "0.0.0.0"
    module: ejabberd_c2s
    

    I was able to connect via telnet, and able to access the server using XMPP.