LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-25-2016, 04:25 AM   #1
ZZII
Member
 
Registered: Dec 2014
Location: house
Distribution: Fedora Cinnamon 30
Posts: 61

Rep: Reputation: Disabled
Minecraft Forge server "no route to host"


Dell Optiplex 780
Intel Core 2 Duo E7500
2x2 GB DDR3 RAM
2x500 GB HDDs RAID0
CentOS 6.7 basic server
X and default GNOME installed (runlevel 3 I believe)
Minecraft server 1.7.10
Forge 10.13.4.1558
24 mods installed

If I try to connect to the server from my desktop using the LAN IP I get "No route to host" and if I use the public IP according to IPChicken I get "Connection timed out"

My network:
Code:
Telstra Technicolor TG799vac modem
                  |
TP-Link TL-WA801ND wireless repeater
                  |
        D-Link DIR-645 router
                  |
         ------------------
        |                  |
     desktop             server
     (Mint)             (CentOS)
The modem, router and server are all port forwarded. (25565 TCP and UDP)

(completely separate problem to my previous thread, which is now solved.)

Thank-you in advance.
 
Old 01-26-2016, 05:32 AM   #2
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,766
Blog Entries: 23

Rep: Reputation: 411Reputation: 411Reputation: 411Reputation: 411Reputation: 411
okay, how do you "connect"? Via ping? Try a ping, tell us what that brings. Next, what is the Class of the IP addresses? If they are in a separate class, chances are they cannot connect...
Consider this:
Quote:
Workstation - 192.168.1.5-255.255.255.0
Server - 10.0.0.5-255.255.255.0
No way you'll get access to the server...
So, output the IFconfig and check the IP address, do that on both machines.
Consider, however, that the IP address has to be the same class as your devices...the D-link router as first...I assume that it has an internal IP address like 192.168.1.1...that means all hosts in the network should (ideally) have addresses that begin with 192.168.1 and have an address from 2 upwards...like 192.168.1.2 for the server and 192.168.1.3 for the workstation...
Good luck...
Melissa
 
Old 01-26-2016, 06:41 AM   #3
ZZII
Member
 
Registered: Dec 2014
Location: house
Distribution: Fedora Cinnamon 30
Posts: 61

Original Poster
Rep: Reputation: Disabled
By connect I mean using the Minecraft client. My inet is 192.168.0.100 and the server's is 192.168.0.121

I tried connecting to the server in Minecraft using 192.168.0.121 as well as the server's public IP from IPChicken. I'll try some pings.

Code:
x@KUALUS ~ $ ping 192.168.0.121
PING 192.168.0.121 (192.168.0.121) 56(84) bytes of data.
64 bytes from 192.168.0.121: icmp_seq=1 ttl=64 time=0.260 ms
64 bytes from 192.168.0.121: icmp_seq=2 ttl=64 time=0.248 ms
64 bytes from 192.168.0.121: icmp_seq=3 ttl=64 time=0.251 ms
64 bytes from 192.168.0.121: icmp_seq=4 ttl=64 time=0.251 ms
64 bytes from 192.168.0.121: icmp_seq=5 ttl=64 time=0.250 ms
64 bytes from 192.168.0.121: icmp_seq=6 ttl=64 time=0.251 ms
64 bytes from 192.168.0.121: icmp_seq=7 ttl=64 time=0.251 ms
64 bytes from 192.168.0.121: icmp_seq=8 ttl=64 time=0.251 ms
^Z
[3]+  Stopped                 ping 192.168.0.121
x@KUALUS ~ $ ping 121.219.235.60                                  <-- Public IP from IPChicken
PING 121.219.235.60 (121.219.235.60) 56(84) bytes of data.
64 bytes from 121.219.235.60: icmp_seq=1 ttl=64 time=2.81 ms
64 bytes from 121.219.235.60: icmp_seq=2 ttl=64 time=2.70 ms
64 bytes from 121.219.235.60: icmp_seq=3 ttl=64 time=1.82 ms
64 bytes from 121.219.235.60: icmp_seq=4 ttl=64 time=1.85 ms
64 bytes from 121.219.235.60: icmp_seq=5 ttl=64 time=24.7 ms
64 bytes from 121.219.235.60: icmp_seq=6 ttl=64 time=1.98 ms
^Z
[4]+  Stopped                 ping 121.219.235.60
How do I check to make sure I have set up port forwarding with iptables? Perhaps I have not done that properly. I know the router and modem are clearly port forwarding correctly as you can see in the menus for them. (the port is 25565)
 
Old 01-26-2016, 06:55 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Connecting from the client to the server does not require port forwarding by the router or MODEM. That allows teh internet to connect to your server which you may not want yet.

You need to open the port in the server's firewall. You can do that easily by using system-config-firewall. If not already installed you can do that via yum. Must be root to use the configuration tool.
 
Old 01-26-2016, 07:02 AM   #5
ZZII
Member
 
Registered: Dec 2014
Location: house
Distribution: Fedora Cinnamon 30
Posts: 61

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
Connecting from the client to the server does not require port forwarding by the router or MODEM. That allows teh internet to connect to your server which you may not want yet.

You need to open the port in the server's firewall. You can do that easily by using system-config-firewall. If not already installed you can do that via yum. Must be root to use the configuration tool.
In my experience Minecraft servers always require port 25565 to be port forwarded. I could never connect to a particular friend's unless he did so.

There's a lot of options to enable in system-config-firewall. None seem to be what I want or allow a custom entry. How can I ensure I port forward TCP and UDP 25565?

I sorta know what I'm doing, but I sorta don't. All I know is that port-forwarding must be done, and it must be TCP and UDP port 25565.
 
Old 01-26-2016, 07:21 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
It will be custom port entry.
 
Old 01-26-2016, 07:40 AM   #7
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
How many times is NAT done on this network? Two? Three? NAT has to be done once. Having three NAT capable devices does not mean the feature must be enabled in all of them.
 
Old 01-26-2016, 08:33 AM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
The steps are:
customize->forward->add

Then add the desired port/protocol.
 
Old 01-26-2016, 02:04 PM   #9
tramsch
Member
 
Registered: May 2014
Distribution: Gentoo, RHEL, Mint
Posts: 35

Rep: Reputation: 6
Hi ZZII,

can you give us the output of the following from server and client:
Code:
$ ifconfig -a
$ route
and this only from the server, while minecraft server is running:
Code:
$ netstat -tulpen
?

kind regards
Florian
 
Old 01-26-2016, 05:59 PM   #10
ZZII
Member
 
Registered: Dec 2014
Location: house
Distribution: Fedora Cinnamon 30
Posts: 61

Original Poster
Rep: Reputation: Disabled
Sorry, just read your post again michaelk, it was late and I misread it when I replied. So I disable any port forwarding rules I created on the router and modem, correct? (Just so you know, there is a reason for my odd network setup)

There's no "forward" option in system-config-firewall. It goes from "DNS" to "FTP" with nothing in between, and it isn't at the start or end.

On my desktop:
(There's a lot of network devices)

Code:
x@KUALUS ~ $ ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:1b:11:51:83:4a  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth1      Link encap:Ethernet  HWaddr d8:cb:8a:70:f0:f1  
          inet addr:192.168.0.100  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::dacb:8aff:fe70:f0f1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7699 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7607 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:6759610 (6.7 MB)  TX bytes:1051607 (1.0 MB)
          Interrupt:16 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:1308 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1308 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:125553 (125.5 KB)  TX bytes:125553 (125.5 KB)

vmnet1    Link encap:Ethernet  HWaddr 00:50:56:c0:00:01  
          inet addr:192.168.149.1  Bcast:192.168.149.255  Mask:255.255.255.0
          inet6 addr: fe80::250:56ff:fec0:1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:193 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

vmnet8    Link encap:Ethernet  HWaddr 00:50:56:c0:00:08  
          inet addr:172.16.135.1  Bcast:172.16.135.255  Mask:255.255.255.0
          inet6 addr: fe80::250:56ff:fec0:8/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:193 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

x@KUALUS ~ $ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.0.1     0.0.0.0         UG    0      0        0 eth1
172.16.135.0    *               255.255.255.0   U     0      0        0 vmnet8
192.168.0.0     *               255.255.255.0   U     1      0        0 eth1
192.168.149.0   *               255.255.255.0   U     0      0        0 vmnet1
And here's for the server:
Code:
[x@OPTIPLEX ~]$ ifconfig -a
eth0      Link encap:Ethernet  HWaddr B8:AC:6F:1C:46:38  
          inet addr:192.168.0.121  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::baac:6fff:fe1c:4638/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3173 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2838 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:3610267 (3.4 MiB)  TX bytes:293258 (286.3 KiB)
          Interrupt:21 Memory:fe6e0000-fe700000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:156 errors:0 dropped:0 overruns:0 frame:0
          TX packets:156 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:11560 (11.2 KiB)  TX bytes:11560 (11.2 KiB)

[x@OPTIPLEX ~]$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     *               255.255.255.0   U     0      0        0 eth0
link-local      *               255.255.0.0     U     1002   0        0 eth0
default         192.168.0.1     0.0.0.0         UG    0      0        0 eth0
Code:
[root@OPTIPLEX x]# netstat -tulpen
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       User       Inode      PID/Program name   
tcp        0      0 0.0.0.0:42888               0.0.0.0:*                   LISTEN      29         14203      1981/rpc.statd      
tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN      0          13922      1916/rpcbind        
tcp        0      0 0.0.0.0:6000                0.0.0.0:*                   LISTEN      0          16758      2629/X              
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      0          15244      2304/sshd           
tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN      0          14486      2053/cupsd          
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      0          15442      2383/master         
tcp        0      0 :::25565                    :::*                        LISTEN      500        26485      3116/java           
tcp        0      0 :::111                      :::*                        LISTEN      0          13927      1916/rpcbind        
tcp        0      0 :::6000                     :::*                        LISTEN      0          16757      2629/X              
tcp        0      0 :::51541                    :::*                        LISTEN      29         14211      1981/rpc.statd      
tcp        0      0 :::22                       :::*                        LISTEN      0          15253      2304/sshd           
tcp        0      0 ::1:631                     :::*                        LISTEN      0          14485      2053/cupsd          
tcp        0      0 ::1:25                      :::*                        LISTEN      0          15444      2383/master         
udp        0      0 0.0.0.0:819                 0.0.0.0:*                               0          13921      1916/rpcbind        
udp        0      0 0.0.0.0:111                 0.0.0.0:*                               0          13919      1916/rpcbind        
udp        0      0 127.0.0.1:885               0.0.0.0:*                               0          14191      1981/rpc.statd      
udp        0      0 0.0.0.0:39414               0.0.0.0:*                               29         14199      1981/rpc.statd      
udp        0      0 0.0.0.0:631                 0.0.0.0:*                               0          14489      2053/cupsd          
udp        0      0 :::51630                    :::*                                    29         14207      1981/rpc.statd      
udp        0      0 :::819                      :::*                                    0          13926      1916/rpcbind        
udp        0      0 :::111                      :::*                                    0          13924      1916/rpcbind
"x" replaces my username.

By the way, I'm using my desktop to see if I can connect, just as testing. If I can, then I will see if others can connect as well.

Last edited by ZZII; 01-26-2016 at 06:01 PM.
 
Old 01-26-2016, 06:04 PM   #11
ZZII
Member
 
Registered: Dec 2014
Location: house
Distribution: Fedora Cinnamon 30
Posts: 61

Original Poster
Rep: Reputation: Disabled
So sorry, I found "forward", I was looking in the list and didn't see it right there...

Okay, so I think I set it up correctly, but there were a lot of options to select. It works through the local IP, but using the public gives connection refused.

Here's netstat again in case it has changed:
Code:
[root@OPTIPLEX x]# netstat -tulpen
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       User       Inode      PID/Program name   
tcp        0      0 0.0.0.0:42888               0.0.0.0:*                   LISTEN      29         14203      1981/rpc.statd      
tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN      0          13922      1916/rpcbind        
tcp        0      0 0.0.0.0:6000                0.0.0.0:*                   LISTEN      0          16758      2629/X              
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      0          15244      2304/sshd           
tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN      0          14486      2053/cupsd          
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      0          15442      2383/master         
tcp        0      0 :::25565                    :::*                        LISTEN      500        26485      3116/java           
tcp        0      0 :::111                      :::*                        LISTEN      0          13927      1916/rpcbind        
tcp        0      0 :::6000                     :::*                        LISTEN      0          16757      2629/X              
tcp        0      0 :::51541                    :::*                        LISTEN      29         14211      1981/rpc.statd      
tcp        0      0 :::22                       :::*                        LISTEN      0          15253      2304/sshd           
tcp        0      0 ::1:631                     :::*                        LISTEN      0          14485      2053/cupsd          
tcp        0      0 ::1:25                      :::*                        LISTEN      0          15444      2383/master         
udp        0      0 0.0.0.0:819                 0.0.0.0:*                               0          13921      1916/rpcbind        
udp        0      0 0.0.0.0:111                 0.0.0.0:*                               0          13919      1916/rpcbind        
udp        0      0 127.0.0.1:885               0.0.0.0:*                               0          14191      1981/rpc.statd      
udp        0      0 0.0.0.0:39414               0.0.0.0:*                               29         14199      1981/rpc.statd      
udp        0      0 0.0.0.0:631                 0.0.0.0:*                               0          14489      2053/cupsd          
udp        0      0 :::51630                    :::*                                    29         14207      1981/rpc.statd      
udp        0      0 :::819                      :::*                                    0          13926      1916/rpcbind        
udp        0      0 :::111                      :::*                                    0          13924      1916/rpcbind

Last edited by ZZII; 01-26-2016 at 06:14 PM.
 
Old 01-27-2016, 03:10 AM   #12
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
I may have confused you a bit. Forwarding in the router is required for accessing outside from your public ip not local.
 
Old 01-27-2016, 03:22 AM   #13
ZZII
Member
 
Registered: Dec 2014
Location: house
Distribution: Fedora Cinnamon 30
Posts: 61

Original Poster
Rep: Reputation: Disabled
Okay I port forwarded everything and it works using the public IP. I had already tried this and it did not work, but that was because the modem had to have destination IP set to the IP of the wireless repeater. (Not 192.168.0.121)

Thank-you so much all for your help. Hopefully others can connect now.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh works outbound, but i get "no route to host" err inbound kline Linux - Software 6 12-10-2012 03:35 PM
FTP server "No Route to Host" KinnowGrower Linux - Server 10 08-05-2008 10:38 PM
shorewall routing issue: "no route to host" from dmz spargonaut Linux - Networking 0 06-07-2007 10:09 AM
a/p connected, route correct, ping router: "Destination Host Unreachable". DebianEtch shinyblue Linux - Wireless Networking 1 08-29-2006 09:34 PM
Permanently set "route add" -host and default gw sacants Linux - Newbie 1 07-18-2003 04:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration