Unable to connect using external address.

If you hit any installation issues or cannot connect to your freshly installed UnrealIRCd then this forum is for you.

Moderator: Supporters

Post Reply
xin
Posts: 1
Joined: Wed Mar 07, 2018 8:00 pm

Unable to connect using external address.

Post by xin » Wed Mar 07, 2018 8:39 pm

uname -a

Code: Select all

Linux sys 4.13.0-kali1-686-pae #1 SMP Debian 4.13.10-1kali2 (2017-11-08) i686 GNU/Linux
./unrealircd version

Code: Select all

UnrealIRCd-4.0.17 build 4.0.17
./unrealircd start

Code: Select all

using PCRE2 10.30 2017-08-14
  using TRE 0.8.0 (BSD)
  using OpenSSL 1.1.0g  2 Nov 2017

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: *:6900(SSL), *:6697(SSL), *:6667
IPv6: *:6900(SSL), *:6697(SSL), *:6667
UnrealIRCd started.
weechat -v: 1.9.1

/connect network (locally)

Code: Select all

14:15 -- irc: connecting to server */6667...
	  │14:15 -- irc: connected to */6667 (::1)
          │14:15 -- irc.network.com: *** Looking up your hostname...
          │14:15 -- irc.network.com: *** Found your hostname
          │14:15 -- Welcome to the network IRC Network x!x@localhost
          │14:15 -- Your host is irc.network.com, running version UnrealIRCd-4.0.17
          │14:15 -- This server was created Sun Feb 25 2018 at 08:00:49 CST
          │14:15 -- irc.network.com UnrealIRCd-4.0.17 iowrsxzdHtIDZRqpWGTSB lvhopsmntikraqbeIzMQNRTOVKDdGLPZSCcf
          │14:15 -- UHNAMES NAMESX SAFELIST HCN MAXCHANNELS=10 CHANLIMIT=#:10 MAXLIST=b:60,e:60,I:60 MAXNICKLEN=30 NICKLEN=30 CHANNELLEN=32 TOPICLEN=307 KICKLEN=307 AWAYLEN=307 :are supported by this server
          │14:15 -- MAXTARGETS=20 WALLCHOPS WATCH=128 WATCHOPTS=A SILENCE=15 MODES=12 CHANTYPES=# PREFIX=(qaohv)~&@%+ CHANMODES=beI,kLf,l,psmntirzMQNRTOVKDdGPZSCc NETWORK=network CASEMAPPING=ascii
          │         EXTBAN=~,SOcaRrnqj ELIST=MNUCT :are supported by this server
          │14:15 -- STATUSMSG=~&@%+ EXCEPTS INVEX CMDS=USERIP,STARTTLS,KNOCK,DCCALLOW,MAP :are supported by this server
          │14:15 -- Clk-886F30F0 :is now your displayed host
          │14:15 -- There are 1 users and 0 invisible on 1 servers
          │14:15 -- I have 1 clients and 0 servers
          │14:15 -- 1 3 :Current local users 1, max 3
          │14:15 -- 1 1 :Current global users 1, max 1
          │14:15 -- MOTD File is missing
          │14:15 -- User mode [+iwx] by x
/connect network (using the external IP address)

Code: Select all

14:21 -- irc: connecting to server x.x.x.x/6667... 
	  │14:22 -- irc: disconnected from server
It hangs on connecting.
Now let's try changing the listen block:

Code: Select all

 listen {
         ip x.x.x.x;                                                                                                                        
         port 6667;
};
./unrealircd start

Code: Select all

Loading IRCd configuration..
Configuration loaded without any problems.
Loading tunefile..
Initializing SSL..
Dynamic configuration initialized.. booting IRCd.
Error binding stream socket to IP x.x.x.x port 6667 - :Cannot assign requested address
Failed to bind to x.x.x.x:6667
Could not listen on all specified addresses/ports. See errors above. Please fix your listen { } blocks and/or make sure no other programs are listening on the same port.
netstat -l

Code: Select all

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 localhost:5939          0.0.0.0:*               LISTEN     
udp        0      0 0.0.0.0:bootpc          0.0.0.0:*                          
raw6       0      0 [::]:ipv6-icmp          [::]:*                  7          
I've read that some servers that are hosted locally should only be able to be connected to locally, which makes sense, but I had a friend of my try to connect using my IP address. He too was left hanging on "irc: connecting to server x.x.x.x/6667...".

Syrax
Posts: 5
Joined: Fri Feb 16, 2018 1:52 pm

Re: Unable to connect using external address.

Post by Syrax » Thu Mar 08, 2018 2:52 pm

type

Code: Select all

netstat -plunt
You need to put your shell/VPS ip on listen block

and check if unrealircd is listening on that IP and port
it should be something like

Code: Select all

x.x.x.x:6667        0.0.0.0:*                   LISTEN      PID/unrealircd
check if another program is running on port 6667

Code: Select all

netstat -plnt | grep ':6667'
check if you have openned port 6667 on iptables

Code: Select all

cat /etc/sysconfig/iptables

Gottem
Posts: 168
Joined: Fri Aug 19, 2016 5:26 pm
Location: NL

Re: Unable to connect using external address.

Post by Gottem » Thu Mar 08, 2018 3:22 pm

Syrax wrote:
Thu Mar 08, 2018 2:52 pm
You need to put your shell/VPS ip on listen block
He has a server on his LAN it seems, it's not a shell.

@OP: There's a sticky thread in this board that links to a troubleshooting plan on the wiki. The relevant bit is about your router/firewall. It does this little magical thing called Network address translation to make sure an IP like 192.168.1.100 (which is a private IP and therefore not publicly usable) becomes something like 104.74.88.61 (which is routable) when communicating over the internet. In turn, you need to tell your router to accept connections on a certain port and forward them to another device on your private network.

Also, you can't have a local server listen on your public IP because the OS is not even aware of said IP -- meaning your listen IP must be directly attached to one of the server's network interfaces.
If you like my modules, pls consider donating (through PayPal) or becoming a monthly Patron ;];]

Post Reply