You are not logged in.

#1 2016-07-13 15:27:28

IndianSpongebob
Member
Registered: 2016-07-13
Posts: 13

Running a server for Minetest

I am trying to run a minetest server from my computer but I'm unable to connect it from another computer connected to the internet in the different network. I'm running the minetest server using minetestserver and it gives the following output :

2016-07-13 20:45:22: WARNING[Main]: Couldn't find a locale directory!
2016-07-13 20:45:22: [Main]: Automatically selecting world at [/root/.minetest/worlds/world]
2016-07-13 20:45:22: WARNING[Main]: NodeDefManager: Ignoring CONTENT_IGNORE redefinition
2016-07-13 20:45:22: ACTION[Main]:         .__               __                   __   
2016-07-13 20:45:22: ACTION[Main]:   _____ |__| ____   _____/  |_  ____   _______/  |_ 
2016-07-13 20:45:22: ACTION[Main]:  /     \|  |/    \_/ __ \   __\/ __ \ /  ___/\   __\
2016-07-13 20:45:22: ACTION[Main]: |  Y Y  \  |   |  \  ___/|  | \  ___/ \___ \  |  |  
2016-07-13 20:45:22: ACTION[Main]: |__|_|  /__|___|  /\___  >__|  \___  >____  > |__|  
2016-07-13 20:45:22: ACTION[Main]:       \/        \/     \/          \/     \/        
2016-07-13 20:45:22: ACTION[Main]: World at [/root/.minetest/worlds/world]
2016-07-13 20:45:22: ACTION[Main]: Server for gameid="minetest" listening on 0.0.0.0:30000.

I didn't know what else to show so here's an output of a command from a similar question :

Executing

netstat -na | grep 30000

outputs

udp        0      0 0.0.0.0:30000           0.0.0.0:*

Also, I've configured my router to forward service port 30000 to internal port 30000 and IP address 192.168.0.102 for all protocols. I'm not sure if I'm doing that right though. What should I try now?

Offline

#2 2016-07-13 16:24:22

JohnBobSmith
Member
From: Canada
Registered: 2014-11-29
Posts: 804

Re: Running a server for Minetest

I'm not a network expert, but I would try to make sure you don't have firewalls, on your server or otherwise, that could be blocking the connection(s). Also, why is your server running as root???

2016-07-13 20:45:22: ACTION[Main]: World at [/root/.minetest/worlds/world]

I have no experience with minetest, but running you server as root seems like a really, really bad idea! Especially if its network facing!

I wish I could be more useful sad but good luck!


I am diagnosed with bipolar disorder. As it turns out, what I thought was my greatest weakness is now my greatest strength.

Everyday, I make a conscious choice to overcome my challenges and my problems. It's not easy, but its better than the alternative...

Offline

#3 2016-07-13 16:45:48

Morn
Member
Registered: 2012-09-02
Posts: 886

Re: Running a server for Minetest

minetestserver from the official repos contains a .service file that runs the server as the minetest user, so you should definitely use that.

https://git.archlinux.org/svntogit/comm … s/minetest

Offline

#4 2016-07-13 17:03:16

IndianSpongebob
Member
Registered: 2016-07-13
Posts: 13

Re: Running a server for Minetest

JohnBobSmith wrote:

I'm not a network expert, but I would try to make sure you don't have firewalls, on your server or otherwise, that could be blocking the connection(s). Also, why is your server running as root???

2016-07-13 20:45:22: ACTION[Main]: World at [/root/.minetest/worlds/world]

I have no experience with minetest, but running you server as root seems like a really, really bad idea! Especially if its network facing!

I wish I could be more useful sad but good luck!

I was running it as a non-root user first and it was not working so I thought I'd give it a try. And as for the firewall, I'm not sure where to check for that.

Offline

#5 2016-07-13 17:10:43

Morn
Member
Registered: 2012-09-02
Posts: 886

Re: Running a server for Minetest

I would start netcat on the server and have it listen on the MT port. Then try to reach it from outside.

Also, are you sure you are getting the correct IP address of your router? Are you using DynDNS or something similar? If you try to connect to the wrong IP address it will not work of course.

Offline

#6 2016-07-14 04:30:33

IndianSpongebob
Member
Registered: 2016-07-13
Posts: 13

Re: Running a server for Minetest

Morn wrote:

Also, are you sure you are getting the correct IP address of your router? Are you using DynDNS or something similar? If you try to connect to the wrong IP address it will not work of course.

I'm using the public IP address of my laptop which is connected to the router. Is that what I'm supposed to do?

Offline

#7 2016-07-14 10:13:57

Morn
Member
Registered: 2012-09-02
Posts: 886

Re: Running a server for Minetest

As you wrote in your first post, your server is NAT'ted and has IPv4 address 192.168.0.102 behind your router, so you cannot use that address to contact it from the Internet.

You need to get the router's public IP address, as you can see it e.g. at http://whatsmyuseragent.com/. Or use a dynamic DNS service to make discovering your router's current IPv4 address easier (it may change from time to time, depending on your ISP).

Or your could use IPv6 I guess, that is not NAT'ted at all, so your laptop's internal address should be the same as its public address.

Last edited by Morn (2016-07-14 10:15:06)

Offline

#8 2016-07-14 10:19:11

IndianSpongebob
Member
Registered: 2016-07-13
Posts: 13

Re: Running a server for Minetest

Morn wrote:

As you wrote in your first post, your server is NAT'ted and has IPv4 address 192.168.0.102 behind your router, so you cannot use that address to contact it from the Internet.

You need to get the router's public IP address, as you can see it e.g. at http://whatsmyuseragent.com/. Or use a dynamic DNS service to make discovering your router's current IPv4 address easier (it may change from time to time, depending on your ISP).

Or your could use IPv6 I guess, that is not NAT'ted at all, so your laptop's internal address should be the same as its public address.

Yes, I am using that IP address but it's showing "Connection timed out" message when I try to connect with it from the minetest. Also, I tried the ping that address and it's not working either (should that be working?).

Offline

#9 2016-07-14 10:37:35

Morn
Member
Registered: 2012-09-02
Posts: 886

Re: Running a server for Minetest

Yes, ping should work. Or as I said, run netcat on the server port to see if anything happens when you connect: "nc -l -u -p 30000"

Maybe you could use traceroute to find out how far your packets get. Also, log into  the router's web interface, it probably has a firewall log somewhere that you can access.

Last edited by Morn (2016-07-14 10:39:29)

Offline

#10 2016-07-14 10:52:05

Morn
Member
Registered: 2012-09-02
Posts: 886

Re: Running a server for Minetest

P.S. Actually it looks like ping would not work: http://serverfault.com/questions/309357 … cific-port

But you can use netcat to "ping" a port like this (from the same page):

nc -vz google.com 80

Offline

#11 2016-07-14 11:49:58

IndianSpongebob
Member
Registered: 2016-07-13
Posts: 13

Re: Running a server for Minetest

Morn wrote:

Yes, ping should work. Or as I said, run netcat on the server port to see if anything happens when you connect: "nc -l -u -p 30000"

Maybe you could use traceroute to find out how far your packets get. Also, log into  the router's web interface, it probably has a firewall log somewhere that you can access.

I should be able to connect to the server from the same machine, right?

I started listening on the 30001 port and sent packets using netcat from the same machine using my local IP in the network (192.168.0.102) and it worked. But when I used my public IP it doesn't show anything. I don't have access to another machine right now so I also tried portchecktool.com but it shows "No route to host".

I couldn't find relevant logs in my router's web interface. But there is one SPI firewall in the router is enabled. By the way, thanks for all the help.

Offline

#12 2016-07-14 12:52:23

Morn
Member
Registered: 2012-09-02
Posts: 886

Re: Running a server for Minetest

Maybe you should ask in the minetest IRC channel or forum for more help with this. I'm a bit out of ideas on how to debug this now. You need to talk to people who run public MT servers :-)

Offline

#13 2016-07-14 12:55:12

IndianSpongebob
Member
Registered: 2016-07-13
Posts: 13

Re: Running a server for Minetest

I will do that. Thanks again for the help.

Offline

#14 2016-07-14 13:15:45

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: Running a server for Minetest

IndianSpongebob wrote:

I started listening on the 30001 port and sent packets using netcat from the same machine using my local IP in the network (192.168.0.102) and it worked. But when I used my public IP it doesn't show anything. I don't have access to another machine right now so I also tried portchecktool.com but it shows "No route to host".

That's because your router doesn't support NAT loopback (hardly any consumer routers do).

http://serverfault.com/questions/55611/ … airpin-nat


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#15 2016-07-14 13:18:49

IndianSpongebob
Member
Registered: 2016-07-13
Posts: 13

Re: Running a server for Minetest

slithery wrote:
IndianSpongebob wrote:

I started listening on the 30001 port and sent packets using netcat from the same machine using my local IP in the network (192.168.0.102) and it worked. But when I used my public IP it doesn't show anything. I don't have access to another machine right now so I also tried portchecktool.com but it shows "No route to host".

That's because your router doesn't support NAT loopback (hardly any consumer routers do).

http://serverfault.com/questions/55611/ … airpin-nat

Okay, thanks. But the portalchecktool.com still should have worked, right?

Offline

#16 2016-07-14 17:23:34

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: Running a server for Minetest

It should have done, yes.

Are you certain that your ISP isn't blocking any ports and you've configured your router correctly?

You mention trying on ports 30000 and 30001, did you remember to edit the rules on your router when you changed this? Check out http://portforward.com/ for router-specific instructions if you're unsure.

Last edited by Slithery (2016-07-14 17:29:34)


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#17 2016-07-15 05:36:12

IndianSpongebob
Member
Registered: 2016-07-13
Posts: 13

Re: Running a server for Minetest

slithery wrote:

It should have done, yes.

Are you certain that your ISP isn't blocking any ports and you've configured your router correctly?

You mention trying on ports 30000 and 30001, did you remember to edit the rules on your router when you changed this? Check out http://portforward.com/ for router-specific instructions if you're unsure.

Yes, I have indeed configured my router correctly but I'm not sure if my ISP is blocking incoming connections or not. When I do traceroute from another machine to my public IP it doesn't really reach my address but ends at some other address; when I do traceroute to google.com or any other website from my server machine, I can see that all requests go through an IP from the same network. Does that mean my ISP is blocking incoming connections?

Offline

#18 2016-07-15 08:35:23

Morn
Member
Registered: 2012-09-02
Posts: 886

Re: Running a server for Minetest

Perhaps they are only blocking UDP traffic. Traceroute apparently also uses UDP on Linux by default.

So maybe you could install Apache and check if you can at least access the Apache test page on TCP port 80.

Also, the MT server instructions (http://wiki.minetest.com/wiki/Setting_up_a_server) say that both TCP and UDP need to be forwarded.

Offline

Board footer

Powered by FluxBB