Error linking anope with unrealircd.

If your UnrealIRCd is up and running but you have a question about it, then use this forum.
(NOT for installation or connecting issues! Use the other forum instead.)

Moderator: Supporters

Post Reply
Dyluster
Posts: 8
Joined: Wed Apr 09, 2025 7:23 pm

Error linking anope with unrealircd.

Post by Dyluster »

Hi, after trying various methods for a while, I can't get the anope to link with unrealircd.
The error message is: Attempting to connect to uplink #1 201.46.113.40 (201.46.113.40/6667) with protocol UnrealIRCd 4+
Unable to connect to uplink #1 (201.46.113.40:6667): Connection refused


My unrealircd.conf

Code: Select all

/* Puerto IRC estándar 6667 */
listen {
	ip 127.0.0.1;
	port 6667;
}

/* Puerto IRC estándar 6697 */
listen {
	ip 127.0.0.1;
	port 6697;
	options { tls; }
}

/* Puerto especial solo para servidores SSL/TLS para vincular */
listen {
	ip 127.0.0.1;
	port 6667;
	
}

Code: Select all

link services.chatcomunidades.es
{
	incoming {
		mask *@201.46.113.40;
	}

	outgoing {
		bind-ip 127.0.0.1; /* o expli­citamente una IP */
		hostname services.chatcomunidades.es;
		port 6667;
		
	}

Code: Select all

ulines {
	services.chatcomunidades.es;
}
My services.conf

Code: Select all

define
{
	name = "services.host"
	value = "services.chatcomunidades.es"
}

Code: Select all

uplink
{


	/*
	 * The IP or hostname of the IRC server you wish to connect Services to.
	 * Usually, you will want to connect Services over 127.0.0.1 (aka localhost).
	 *
	 * NOTE: On some shell providers, this will not be an option.
	 */
	host = "201.46.113.40"

	/*
	 * Enable if Services should connect using IPv6.
	 */
	ipv6 = no

	/*
	 * Enable if Services should connect using SSL.
	 * You must have an SSL module loaded for this to work.
	 */
	ssl = no

	/*
	 * The port to connect to.
	 * The IRCd *MUST* be configured to listen on this port, and to accept
	 * server connections.
	 *
	 * Refer to your IRCd documentation for how this is to be done.
	 */
	port = 6667

	/*
	 * The password to send to the IRC server for authentication.
	 * This must match the link block on your IRCd.
	 *
	 * Refer to your IRCd documentation for more information on link blocks.
	 */
	password = "ghdhgfh4985/jdj)jsFW"
}
CrazyCat
Posts: 270
Joined: Thu Apr 28, 2005 1:05 pm
Location: France
Contact:

Re: Error linking anope with unrealircd.

Post by CrazyCat »

Well, you don't have any listen block on ip 201.46.113.40.
And I don't know how clients can connect to your unrealircd as it only listen on local ip.
Dyluster
Posts: 8
Joined: Wed Apr 09, 2025 7:23 pm

Re: Error linking anope with unrealircd.

Post by Dyluster »

Where should I add it? In the incoming block? Is it added the same way as the other listen blocks?
Dyluster
Posts: 8
Joined: Wed Apr 09, 2025 7:23 pm

Re: Error linking anope with unrealircd.

Post by Dyluster »

This message now appears to me with this change in unrealircd.conf

Attempting to connect to uplink #1 201.46.113.40 (201.46.113.40/6667) with protocol UnrealIRCd 4+
Successfully connected to uplink #1 201.46.113.40:6667
ERROR: Closing Link: services.chatcomunidades.es[ip-201-46-113-40.ipinversa.es] (Link denied (No link block found with your server name or link::incoming::mask did not match))


My unrealircd.conf

Code: Select all

/* Puerto IRC estándar 6667 */
listen {
	ip 201.46.113.40;
	port 6667;
}

/* Puerto IRC estándar 6697 */
listen {
	ip 201.46.113.40;
	port 6697;
	options { tls; }
}

/* Puerto especial solo para servidores SSL/TLS para vincular */
listen {
	ip 127.0.0.1;
	port 6667;
	options { tls; }
}

Code: Select all

link services.chatcomunidades.es
{
	incoming {
		mask 127.0.0.1;
	}

	password "ghdhgfh4985/jdj)jsFW";

	class servers;
}

ulines {
	services.chatcomunidades.es;
}

My services.conf

Code: Select all

{
	name = "services.host"
	value = "services.chatcomunidades.es"
}

Code: Select all

/*
	 * The IP or hostname of the IRC server you wish to connect Services to.
	 * Usually, you will want to connect Services over 127.0.0.1 (aka localhost).
	 *
	 * NOTE: On some shell providers, this will not be an option.
	 */
	host = "201.46.113.40"

	/*
	 * Enable if Services should connect using IPv6.
	 */
	ipv6 = no

	/*
	 * Enable if Services should connect using SSL.
	 * You must have an SSL module loaded for this to work.
	 */
	ssl = no

	/*
	 * The port to connect to.
	 * The IRCd *MUST* be configured to listen on this port, and to accept
	 * server connections.
	 *
	 * Refer to your IRCd documentation for how this is to be done.
	 */
	port = 6667

	/*
	 * The password to send to the IRC server for authentication.
	 * This must match the link block on your IRCd.
	 *
	 * Refer to your IRCd documentation for more information on link blocks.
	 */
	password = "ghdhgfh4985/jdj)jsFW"
}
Dyluster
Posts: 8
Joined: Wed Apr 09, 2025 7:23 pm

Re: Error linking anope with unrealircd.

Post by Dyluster »

The error has now been corrected, thank you.
Dyluster
Posts: 8
Joined: Wed Apr 09, 2025 7:23 pm

Re: Error linking anope with unrealircd.

Post by Dyluster »

The problem now is the SSL. It won't connect, with this error message:
Failed to connect - Connection refused


And I have this blocks set:

listen {
ip 127.0.0.1;
port 6667;

}


listen {
ip 127.0.0.1;
port 6697;
options { tls; }
}


I had connected before but now I can't connect either through 6697 or 6667 even after adding both blocks.
Dyluster
Posts: 8
Joined: Wed Apr 09, 2025 7:23 pm

Re: Error linking anope with unrealircd.

Post by Dyluster »

I've read that for SSL connections to work, you need to install an SSH certificate. I imagine that's why I'm not connecting even though I have the listen block written with 6697, although it still seems strange to me that I can't even connect with 6667 having written on unrealircd.conf

I've read about certbot, but nothing is installed. I don't know how to do any of that.

With another configuration, I managed to connect, but the bots didn't work. After the change the .conf, the bots worked, but now I can't connect to the server after disconnecting and reconnecting.
PeGaSuS
Official supporter
Posts: 118
Joined: Tue Jun 27, 2017 4:42 pm
Contact:

Re: Error linking anope with unrealircd.

Post by PeGaSuS »

Anope has an example of what to add and where, here.

But the follwoing configs should work, assuming that UnrealIRCd and Anope are on the same machine.

UnrealIRCd side

Code: Select all

listen {
	ip 127.0.0.1;
	port 7000;
	options {
        serversonly;
    }
}

link services.chatcomunidades.es
{
    incoming {
    	mask 127.0.0.1;
    }
    password "ghdhgfh4985/jdj)jsFW";
    class servers;
}

ulines {
	services.chatcomunidades.es;
}
Add the above to your unrealircd.conf (replace blocks where appropriated) and rehash UnrealIRCd.


Anope side

Code: Select all

define
{
	name = "services.host"
	value = "services.chatcomunidades.es"
}

uplink
{


	/*
	 * The IP or hostname of the IRC server you wish to connect Services to.
	 * Usually, you will want to connect Services over 127.0.0.1 (aka localhost).
	 *
	 * NOTE: On some shell providers, this will not be an option.
	 */
	host = "127.0.0.1"

	/*
	 * Enable if Services should connect using IPv6.
	 */
	ipv6 = no

	/*
	 * Enable if Services should connect using SSL.
	 * You must have an SSL module loaded for this to work.
	 */
	ssl = no

	/*
	 * The port to connect to.
	 * The IRCd *MUST* be configured to listen on this port, and to accept
	 * server connections.
	 *
	 * Refer to your IRCd documentation for how this is to be done.
	 */
	port = 7000

	/*
	 * The password to send to the IRC server for authentication.
	 * This must match the link block on your IRCd.
	 *
	 * Refer to your IRCd documentation for more information on link blocks.
	 */
	password = "ghdhgfh4985/jdj)jsFW"
}
Add the above to your services,conf (replace the blocks where appropriated) and start Anope.


Small advice: don't link servers over standard client ports, because it's easy to make mistakes and mess up things for clients and/or servers. Use different ports for clients and servers.
IRC Network: PTirc - GitHub: TehPeGaSuS - Help and support: #unreal-support
Dyluster
Posts: 8
Joined: Wed Apr 09, 2025 7:23 pm

Re: Error linking anope with unrealircd.

Post by Dyluster »

Thank you very much.

I have it like this, except that it doesn't usually connect to me on many occasions, and suddenly, for example, through IRSSI, it connects to 6697, but not normally on other clients or web clients adding the port 6697.

So, I don't need to install certbot for SSL?

Another question is whether it's possible to deny connections from sites other than my website. That is, I only want users to access the server from my website. Is there a way to deny other connections for people trying to access it from outside my website?
PeGaSuS
Official supporter
Posts: 118
Joined: Tue Jun 27, 2017 4:42 pm
Contact:

Re: Error linking anope with unrealircd.

Post by PeGaSuS »

So, I don't need to install certbot for SSL?
If you want to provide valid SSL/TLS certificates to your users you should follow the instructions on:
Another question is whether it's possible to deny connections from sites other than my website. That is, I only want users to access the server from my website. Is there a way to deny other connections for people trying to access it from outside my website?
You can't really limit it, because for the IRCd a IRC client is a IRC client.

You can limit connections from WEBIRC and WEBSOCKETS only, so others can't connect to those endpoints using their IRC clients. But you can't prevent someone from using their own TheLounge instance, e.g, to connect, unless you use use a ban version block.
IRC Network: PTirc - GitHub: TehPeGaSuS - Help and support: #unreal-support
Dyluster
Posts: 8
Joined: Wed Apr 09, 2025 7:23 pm

Re: Error linking anope with unrealircd.

Post by Dyluster »

Thank you very much for all. I'll look into those options :)

The server works perfectly for me with bots. The only thing that seems odd is that, for example, when I tried connect on IRCCloud, the other servers connected immediately, but on my SSL server, it connected on the fourth attempt automatically (when it doesn't connect, it keeps trying automatically until it connects and the previous three attempts showed the message: Failed to connect: Timed out.)

In another webchat like CGI:IRC, it never connects me by putting port 6697.

Why could this be?
zekirdek
Posts: 2
Joined: Tue Jul 14, 2015 11:23 am
Location: Turkey
Contact:

Re: Error linking anope with unrealircd.

Post by zekirdek »

Hi
I am sharing with you 100% working unrealircd.conf and services.conf files, just change the name, do not touch anything else
https://github.com/zchatorgx/ircd/bl.../services.conf (Anone services.conf)
https://github.com/zchatorgx/ircd/bl...nrealircd.conf (unrealircd.conf 6.1)
Join a special live interview with IRC creator Jarkko Oikarinen on May 16, 2025, to explore the origins of IRC and its impact on the future of communication technology. irc.zchat.org
https://web.zchat.org/#chat
Post Reply