UnrealIRCd 4.0.4 & Anope 2.0.3

The UnrealIRCd team does not officially provide support for any services packages that you may be using or want to use. This forum is provided so the community can help each other with services issues.

Moderator: Supporters

Locked
bot
Posts: 2
Joined: Sun Jul 03, 2016 9:57 am

UnrealIRCd 4.0.4 & Anope 2.0.3

Post by bot »

Hi everyone,

always been a bit of lurker around here I have not used UnrealIRCD for many years however a time has come where I wish to get involved again and start using.

I am having some issues trying to link Anope to UnrealIRCD (UnrealIRCd 4.0.4 & Anope 2.0.3)

the error I am getting appears to be very generic.

unrealircd.conf

Code: Select all

link services.3xploits.xyz { /* edit this line */
 incoming {
 mask *;
 };
 outgoing {
 bind-ip *;
 hostname 127.0.0.1; /* edit this line */
 port 5421;
 options { ssl; };
 };
 password "test"; /* edit this line */
 class servers;
 };

 ulines {
 services.3xploit.xyz; /* edit this line */
 };
services.conf

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 = "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 = yes

        /*
         * 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 = 5421

        /*
         * 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 = "test"
}

./services -debug -nofork

Code: Select all

[Jul 03 05:54:25.772689 2016] Debug: Attempting to connect to uplink #1 127.0.0.1 (127.0.0.1), port 5421
[Jul 03 05:54:25.773105 2016] Debug: Successfully connected to uplink #1 127.0.0.1:5421
[Jul 03 05:54:25.773151 2016] Debug: Sent: :00B PASS :test
[Jul 03 05:54:25.773197 2016] Debug: Sent: :00B PROTOCTL NICKv2 VHP UMODE2 NICKIP SJOIN SJOIN2 SJ3 NOQUIT TKLEXT ML
[Jul 03 05:54:25.773314 2016] Debug: Sent: :00B PROTOCTL EAUTH=services.3xploits.xyz,,,Anope-2.0.3
[Jul 03 05:54:25.773349 2016] Debug: Sent: :00B PROTOCTL SID=00B
[Jul 03 05:54:25.773383 2016] Debug: Sent: :00B SERVER services.3xploits.xyz 1 :Services for IRC Networks
[Jul 03 05:54:26.274649 2016] Debug: Lost connection from uplink #1 (127.0.0.1:5421): Connection reset by peer

I hope all the above information supports my question, if anymore information is required please let me know, thank you all for your help! :)
bot
Posts: 2
Joined: Sun Jul 03, 2016 9:57 am

Re: UnrealIRCd 4.0.4 & Anope 2.0.3

Post by bot »

I have also noticed this in the -debug -nofork

Code: Select all

[Jul 03 09:52:11.357504 2016] Debug: Trying to load module: os_oline
[Jul 03 09:52:11.360195 2016] Debug: Error while loading os_oline: Your IRCd does not support OMODE.
wondering if this is causing the issue?
Syzop
UnrealIRCd head coder
Posts: 2112
Joined: Sat Mar 06, 2004 8:57 pm
Location: .nl
Contact:

Re: UnrealIRCd 4.0.4 & Anope 2.0.3

Post by Syzop »

UnrealIRCd doesn't connect to services, services always connect to UnrealIRCd. So you can remove the outgoing part of your link block:

Code: Select all

link services.3xploits.xyz { /* edit this line */
 incoming {
 mask *;
 };
 password "test"; /* edit this line */
 class servers;
};
..this is just a simplification. It doesn't 'fix' anything.


Then.. from your services log file I see it's connecting to 127.0.0.1 on port 5421, using SSL.
My best bet would be that your UnrealIRCd is indeed listening on port 5421 but the port is not an SSL port. An SSL/non-SSL mismatch always results in mysterious errors.

So check your listen { } block in your unrealircd.conf for port 5421, and make sure it has ssl enabled in there.
foon08
Posts: 1
Joined: Mon Oct 17, 2016 3:04 am

Re: UnrealIRCd 4.0.4 & Anope 2.0.3

Post by foon08 »

Did you figure this out. I am having the exact same issue. any value
Jellis
Posts: 10
Joined: Tue Nov 29, 2016 4:45 pm

Re: UnrealIRCd 4.0.4 & Anope 2.0.3

Post by Jellis »

Same problem here - Latest Unreal and latest Anope as of today (29/11/2016).

Edit: this ONLY applies with SSL connection, without SSL all works fine (just to mention that to be clear).
Last edited by Jellis on Tue Nov 29, 2016 4:57 pm, edited 1 time in total.
Syzop
UnrealIRCd head coder
Posts: 2112
Joined: Sat Mar 06, 2004 8:57 pm
Location: .nl
Contact:

Re: UnrealIRCd 4.0.4 & Anope 2.0.3

Post by Syzop »

Strange, what exact problem?
Could you paste:
1) your link { } block in unrealircd.conf for the services server (this is in unrealircd)
2) your uplink { } block in services.conf (this is in anope)

We run 4.0.8 with latest anope on irc.unrealircd.org fine without problems.
Jellis
Posts: 10
Joined: Tue Nov 29, 2016 4:45 pm

Re: UnrealIRCd 4.0.4 & Anope 2.0.3

Post by Jellis »

I've setup a complete new VPS today because I had the problem yesterday, did a complete new build and config of unreal and anope without any problems. Edited a completely new set of config files going trough the example config line by line. All works great, besides linking SSL.

Edit:

[ircd@aw05 unrealircd]$ ./unrealircd start
Starting UnrealIRCd
_ _ _ ___________ _____ _
| | | | | |_ _| ___ \/ __ \ | |
| | | |_ __ _ __ ___ __ _| | | | | |_/ /| / \/ __| |
| | | | '_ \| '__/ _ \/ _` | | | | | / | | / _` |
| |_| | | | | | | __/ (_| | |_| |_| |\ \ | \__/\ (_| |
\___/|_| |_|_| \___|\__,_|_|\___/\_| \_| \____/\__,_|
v4.0.8.4

using PCRE2 10.22 2016-07-29
using TRE 0.8.0 (BSD)
using OpenSSL 1.0.1e-fips 11 Feb 2013
using libcurl/7.51.0 OpenSSL/1.0.1e zlib/1.2.7 c-ares/1.12.0

Loading IRCd configuration..
Configuration loaded without any problems.
Loading tunefile..
Initializing SSL..
Dynamic configuration initialized.. booting IRCd.
UnrealIRCd is now listening on the following addresses/ports:
IPv4: *:5569(SSL), *:6697(SSL), *:6667
IPv6: *:5569(SSL), *:6697(SSL), *:6667
UnrealIRCd started.
[ircd@aw05 bin]$ ./services
Anope 2.0.4, build #2, compiled 21:06:48 Nov 28 2016
Using configuration file conf/services.conf
Attempting to connect to uplink #1 IPHERE (IPHERE), port 5569
Successfully connected to uplink #1 IPHERE:5569
Lost connection from uplink #1 (IPHERE:5569): Connection reset by peer
[ircd@aw05 bin]$

Connecting to client port ssl 6697 works (as IRC client).
Syzop
UnrealIRCd head coder
Posts: 2112
Joined: Sat Mar 06, 2004 8:57 pm
Location: .nl
Contact:

Re: UnrealIRCd 4.0.4 & Anope 2.0.3

Post by Syzop »

Ah my edit crossed your post. But you already posted the most useful information.
Your services are connecting to port 5569 and in UnrealIRCd port 5569 has SSL enabled.
This means you need to do one of these (but not both!):

Edit your services.conf and change the uplink { } block to connect to a non-SSL port:

Code: Select all

port = 6667
That's all.

-OR-

Edit your services.conf and change the uplink { } block to use SSL.
Change:

Code: Select all

ssl = no
to:

Code: Select all

ssl = yes
and also edit modules.example.conf to enable one of the ssl modules, by changing for example:

Code: Select all

#module
{
        name = "m_ssl_openssl"
To:

Code: Select all

module
{
        name = "m_ssl_openssl"
I tend to use the first solution when both UnrealIRCd and anope run on the same machine as there is no real reason to use SSL/TLS in such a case. You should really NOT use it if not running on the same machine, though.

Post edited slightly and swapped solution #1 and #2 for clarity
Jellis
Posts: 10
Joined: Tue Nov 29, 2016 4:45 pm

Re: UnrealIRCd 4.0.4 & Anope 2.0.3

Post by Jellis »

Thank you for your quick response. I do get them linked using NON-SSL ports, only the notice when linking, you should use SSL appears even I do know there is no use using SSL on the same VPS, this is just a test scenario to deploy and all servers run different boxes. To say it in other words, I actually DO need SSL.

Uncommenting (using)
module m_ssl_gnutls OR module m_ssl_openssl (I know not to use both) do not work.
I have both openssl and openssl-devel, gnutls and gnutls installed (certtools etc.) and even made certificated with both of them when using openssl or gnutls.
I am starting to believe this is an Anope issue however, since the log output of anope states

Using openssl (first choise, but try'd the other one anyway)

Code: Select all

[Nov 29 17:41:06 2016] Anope 2.0.4 starting up
[Nov 29 17:41:06 2016] Loading modules...
[Nov 29 17:41:06 2016] Error while loading os_oline: Your IRCd does not support OMODE.
[Nov 29 17:41:06 2016] lib/modules/m_ssl_openssl.so: cannot open shared object file: No such file or directory
[Nov 29 17:41:06 2016] Using IRCd protocol unreal4
[Nov 29 17:41:06 2016] Loading databases...
[Nov 29 17:41:06 2016] Tied oper AccessWeb to type Services Root
[Nov 29 17:41:06 2016] Databases loaded
[Nov 29 17:41:06 2016] Attempting to connect to uplink #1 51.254.38.199 (51.254.38.199), port 5569
[Nov 29 17:41:06 2016] Successfully connected to uplink #1 51.254.38.199:5569
[Nov 29 17:41:07 2016] Lost connection from uplink #1 (51.254.38.199:5569): Connection reset by peer
[Nov 29 17:41:07 2016] Unable to connect to any uplink
Using gnutls:

Code: Select all

[Nov 29 18:23:58 2016] Anope 2.0.4 starting up
[Nov 29 18:23:58 2016] Loading modules...
[Nov 29 18:23:58 2016] Error while loading os_oline: Your IRCd does not support OMODE.
[Nov 29 18:23:58 2016] lib/modules/m_ssl_gnutls.so: cannot open shared object file: No such file or directory
[Nov 29 18:23:58 2016] Using IRCd protocol unreal4
[Nov 29 18:23:58 2016] Loading databases...
[Nov 29 18:23:58 2016] Tied oper AccessWeb to type Services Root
[Nov 29 18:23:58 2016] Databases loaded
[Nov 29 18:23:58 2016] Attempting to connect to uplink #1 51.254.38.199 (51.254.38.199), port 5569
[Nov 29 18:23:58 2016] Successfully connected to uplink #1 51.254.38.199:5569
[Nov 29 18:23:58 2016] Lost connection from uplink #1 (51.254.38.199:5569): Connection reset by peer
[Nov 29 18:23:58 2016] Unable to connect to any uplink
It appears those modules do not get loaded in Anope, the file list of the modules is:

Code: Select all

[ircd@aw05 modules]$ ls
bahamut.so        cs_ban.so       cs_set_misc.so      enc_bcrypt.so  hs_off.so       m_sasl.so         ngircd.so       ns_recover.so    os_ignore.so     os_reload.so
botserv.so        cs_clone.so     cs_set.so           enc_md5.so     hs_on.so        ms_cancel.so      nickserv.so     ns_register.so   os_info.so       os_session.so
bs_assign.so      cs_drop.so      cs_status.so        enc_none.so    hs_request.so   ms_check.so       ns_access.so    ns_resetpass.so  os_jupe.so       os_set.so
bs_autoassign.so  cs_enforce.so   cs_statusupdate.so  enc_old.so     hs_set.so       ms_del.so         ns_ajoin.so     ns_set_misc.so   os_kick.so       os_shutdown.so
bs_badwords.so    cs_entrymsg.so  cs_suspend.so       enc_sha1.so    hybrid.so       ms_ignore.so      ns_alist.so     ns_set.so        os_kill.so       os_stats.so
bs_botlist.so     cs_flags.so     cs_sync.so          enc_sha256.so  inspircd12.so   ms_info.so        ns_cert.so      ns_status.so     os_list.so       os_svs.so
bs_bot.so         cs_getkey.so    cs_topic.so         fantasy.so     inspircd20.so   ms_list.so        ns_drop.so      ns_suspend.so    os_login.so      os_sxline.so
bs_control.so     cs_info.so      cs_unban.so         gl_global.so   m_dnsbl.so      ms_read.so        ns_getemail.so  ns_update.so     os_logsearch.so  os_update.so
bs_info.so        cs_invite.so    cs_updown.so        global.so      m_dns.so        ms_rsend.so       ns_getpass.so   operserv.so      os_mode.so       plexus.so
bs_kick.so        cs_kick.so      cs_xop.so           greet.so       memoserv.so     ms_sendall.so     ns_group.so     os_akill.so      os_modinfo.so    ratbox.so
bs_set.so         cs_list.so      db_flatfile.so      help.so        m_helpchan.so   ms_send.so        ns_identify.so  os_chankill.so   os_module.so     unreal4.so
chanserv.so       cs_log.so       db_old.so           hostserv.so    m_httpd.so      ms_set.so         ns_info.so      os_config.so     os_news.so       unreal.so
charybdis.so      cs_mode.so      db_redis.so         hs_del.so      m_proxyscan.so  ms_staff.so       ns_list.so      os_defcon.so     os_noop.so       webcpanel.so
cs_access.so      cs_register.so  db_sql_live.so      hs_group.so    m_redis.so      m_xmlrpc_main.so  ns_logout.so    os_dns.so        os_oline.so
cs_akick.so       cs_seen.so      db_sql.so           hs_list.so     m_rewrite.so    m_xmlrpc.so       ns_maxemail.so  os_forbid.so     os_oper.so
[ircd@aw05 modules]$
I am going to check now If this problem isn't caused by compiling Anope possibly without SSL support, wich would solve this topic if it does but makes at least me look me a bit stupid :)
Jellis
Posts: 10
Joined: Tue Nov 29, 2016 4:45 pm

Re: UnrealIRCd 4.0.4 & Anope 2.0.3

Post by Jellis »

I'm out of ideas, I recompiled Anope, I also had and have openssl, openssl-devel installed on my system. The ssl modules are just not there from the latest Anope source? Still back to 1 :)
Syzop
UnrealIRCd head coder
Posts: 2112
Joined: Sat Mar 06, 2004 8:57 pm
Location: .nl
Contact:

Re: UnrealIRCd 4.0.4 & Anope 2.0.3

Post by Syzop »

Once you know, let us know.. may be useful to others, even though most people run services on the same machine and don't use SSL.

I read something in anope about an 'extras' script that needs to be ran? see anope's 'docs/INSTALL'
Jellis
Posts: 10
Joined: Tue Nov 29, 2016 4:45 pm

Re: UnrealIRCd 4.0.4 & Anope 2.0.3

Post by Jellis »

Thanks for pointing me in the right direction. Reading INSTALL fully it appears ssl modules are disabled by default now running ./extras in source.

Code: Select all

m_ldap.cpp                = disabled
m_ldap_authentication.cpp = disabled
m_ldap_oper.cpp           = disabled
m_mysql.cpp               = disabled
m_regex_pcre.cpp          = disabled
m_regex_posix.cpp         = disabled
m_regex_tre.cpp           = disabled
m_sql_authentication.cpp  = disabled
m_sql_log.cpp             = disabled
m_sql_oper.cpp            = disabled
m_sqlite.cpp              = disabled
m_ssl_gnutls.cpp          = disabled
m_ssl_openssl.cpp         = disabled
stats                     = disabled
I'll go ahead and at least enable m_ssl_openssl and get back here ASAP with the outcome. Bare with me.
Jellis
Posts: 10
Joined: Tue Nov 29, 2016 4:45 pm

Re: UnrealIRCd 4.0.4 & Anope 2.0.3

Post by Jellis »

Code: Select all

[ircd@aw05 bin]$ ./services
Anope 2.0.4, build #6, compiled 19:09:44 Nov 29 2016
Using configuration file conf/services.conf
Attempting to connect to uplink #1 51.254.38.199 (51.254.38.199), port 5569
Successfully connected to uplink #1 51.254.38.199:5569
Successfully linked, launching into background...
[ircd@aw05 bin]$
All works great after enabling mod_ssl_openssl.cpp with ./extras script, then go to build directory, build it again.
After that possibly modules.example.conf is renewed again, so you again need to uncomment module mod_ssl_openssl to be used.

After that, all works perfect. Thanks Syzop to pointing me in the exact direction needed and to basically have solved this issue (at least for me).
Jellis
Posts: 10
Joined: Tue Nov 29, 2016 4:45 pm

Re: UnrealIRCd 4.0.4 & Anope 2.0.3

Post by Jellis »

I hope someone corrects me if I'm wrong but in operserv config file (operserv.example.conf) I commented module os_oline to make the error

Code: Select all

Error while loading os_oline: Your IRCd does not support OMODE.
go away out of my Anope services log file. Please correct me if I'm wrong but I think this is because:

A.) UnrealIRCd doesn't support mode OLINE (add IRCOp trough services)
B.) Profile unreal4 is new to Anope and still needs work on their part

Either way, this error does not make the services not connect (like I feel some people are thinking) and can be resolved like this, still hope to get some idea if it is A or B however.
Locked