Openfire is configured to not allow anonymous users to send data to remote domains

I’m trying to develop an Android client. I can log in anonymously on my local computer and chat in the rooms, but when I connect to my server with a different IP address from my mobile phone, I log in but it does not allow me to log in to the room. I get a warning that you cannot log in with an anonymous domain. This is the message I get from the log:

org.jivesoftware.openfire.spi.RoutingTableImpl - The anonymous user ‘6dc57f5a-ade5-47ec-b099-f897765050d4@192.168.1.20/6dc57f5a-ade5-47ec-b099-f897765050d4’ attempted to send data to ‘room1@conference.176.41.2.203/MSFR’, which is on a remote domain. Openfire is configured to not allow anonymous users to send data to remote domains.

Anonymous domain (Android Application)
I couldn’t find a section where I could give permission to log in to the room from the Admin panel. Do you have any ideas?

To protect against spam, Openfire by default does not allow anonymous accounts to send data to other XMPP domains.

This behaviour can be changed by setting the property xmpp.server.allow-anonymous-outbound-data to true.

Thank you guus. I applied the method and it worked, but now I get this warning. What should I do?

76.41.2.203 is my WANIP


Serve LOG:

2024.04.14 13:57:42.942 e[33mWARN e[m [S2SOutgoingPromise-2]: org.jivesoftware.openfire.net.SocketUtil - Unable to create a socket connection to XMPP domain ‘conference.76.41.2.203’ using remote host: conference.76.41.2.203:5269. Cause: conference.76.41.2.203 (a full stacktrace is logged on debug level)
2024.04.14 13:57:42.942 e[33mWARN e[m [S2SOutgoingPromise-2]: org.jivesoftware.openfire.net.SocketUtil - Unable to create a socket connection to XMPP domain ‘conference.76.41.2.203’: Unable to connect to any of its remote hosts.
2024.04.14 13:57:42.942 e[33mWARN e[m [S2SOutgoingPromise-2]: org.jivesoftware.openfire.session.LocalOutgoingServerSession[Create outgoing session for: {192.168.1.20 → conference.76.41.2.203}] - An exception occurred while creating a session. Closing connection.
java.lang.RuntimeException: Unable to create new session: Cannot create a plain socket connection with any applicable remote host.
** at org.jivesoftware.openfire.nio.NettySessionInitializer.init(NettySessionInitializer.java:103) ~[xmppserver-4.8.1.jar:4.8.1]**
** at org.jivesoftware.openfire.session.LocalOutgoingServerSession.createOutgoingSession(LocalOutgoingServerSession.java:262) ~[xmppserver-4.8.1.jar:4.8.1]**
** at org.jivesoftware.openfire.session.LocalOutgoingServerSession.authenticateDomain(LocalOutgoingServerSession.java:209) ~[xmppserver-4.8.1.jar:4.8.1]**
** at org.jivesoftware.openfire.server.OutgoingSessionPromise$PacketsProcessor.establishConnection(OutgoingSessionPromise.java:288) ~[xmppserver-4.8.1.jar:4.8.1]**
** at org.jivesoftware.openfire.server.OutgoingSessionPromise$PacketsProcessor.run(OutgoingSessionPromise.java:244) ~[xmppserver-4.8.1.jar:4.8.1]**
** at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]**
** at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]**
** at java.lang.Thread.run(Thread.java:1583) [?:?]**
2024.04.14 13:57:42.944 e[33mWARN e[m [S2SOutgoingPromise-2]: org.jivesoftware.openfire.session.LocalOutgoingServerSession[Authenticate local domain: ‘192.168.1.20’ to remote domain: ‘conference.76.41.2.203’] - Unable to authenticate: Fail to create new session.
2024.04.14 13:57:42.944 e[33mWARN e[m [S2SOutgoingPromise-2]: org.jivesoftware.openfire.server.OutgoingSessionPromise$PacketsProcessor - An exception occurred while trying to establish a connection for {192.168.1.20 → conference.76.41.2.203}
java.lang.Exception: Failed to create connection to remote server
** at org.jivesoftware.openfire.server.OutgoingSessionPromise$PacketsProcessor.establishConnection(OutgoingSessionPromise.java:301) ~[xmppserver-4.8.1.jar:4.8.1]**
** at org.jivesoftware.openfire.server.OutgoingSessionPromise$PacketsProcessor.run(OutgoingSessionPromise.java:244) ~[xmppserver-4.8.1.jar:4.8.1]**
** at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]**
** at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]**
** at java.lang.Thread.run(Thread.java:1583) [?:?]**

ah so… i get it sorry guys :slight_smile:

You appear to have used an IP address as your XMPP domain name. I strongly advise against that. It makes it almost impossible to get a TLS certificate that is usable for those names, for example.