You are not logged in.

#1 2015-09-15 17:55:14

quandasim
Member
Registered: 2015-03-05
Posts: 5

[SOLVED] network port question

hello
i have vultr vps with archlinux and i started open transport tycon dedicated server on port archrulez.org:3979 
everything works fine except server advertising. after some time, when the server is not used (it runs but without players) the server disapear from public server list (both ingame and web page).
i asked on openttd forum ( https://www.tt-forums.net/viewtopic.php?f=31&t=73691 ) and someone sugested, that the problem is in firewal and that udp port is blocked. i dont have any firewall or iptable installed, but when i tried nmap command i got answer, that nmap canot determine if the port is open or filtered.

(nmaping from vps)

sudo nmap -sU -p 3979 archrulez.org

Starting Nmap 6.47 ( [url]http://nmap.org[/url] ) at 2015-09-15 19:47 CEST
Nmap scan report for archrulez.org (108.61.179.153)
Host is up.
rDNS record for 108.61.179.153: virtualmagi.virtualmagi.local
PORT     STATE         SERVICE
3979/udp open|filtered unknown

Nmap done: 1 IP address (1 host up) scanned in 2.05 seconds

on my home computer i tried same openttd server, whch listened on all interfaces, but the result was same:

sudo nmap -sU -p 3979 localhost
[sudo] password for quandasim: 

Starting Nmap 6.47 ( [url]http://nmap.org[/url] ) at 2015-09-15 19:37 CEST
Nmap scan report for localhost (127.0.0.1)
Host is up.
Other addresses for localhost (not scanned): 127.0.0.1
rDNS record for 127.0.0.1: localhost.localdomain
PORT     STATE         SERVICE
3979/udp open|filtered unknown

when i try probe tcp port, then the answer is open.

so how can i determine if the udp port is open or not? and why is the answer open/filtered when i try nmap localhost?


thanks for answer and sorry for my bad english;)

Last edited by quandasim (2015-09-16 22:34:47)

Offline

#2 2015-09-15 21:46:15

nixpunk
Member
Registered: 2009-11-23
Posts: 271

Re: [SOLVED] network port question

quandasim wrote:

so how can i determine if the udp port is open or not?

To simply test UDP (or TCP) connectivity, you can use netcat (first stop whatever is listening on 3979):

On server side:

nc -ul 3979 # -u for UDP, -l for listen

On client side:

nc -u <server_IP> 3979

Now type some text in either terminal and you should see the same echoed back in the other.  If you don't, something is blocking the port.

Offline

#3 2015-09-15 21:58:28

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: [SOLVED] network port question

First, please learn to use code tags.

Second, stop using nmap ot test your local machine. Check the output of `ss` to confirm the process is listening on the ports you need:

ss -tunlp | column -t | grep 3979

And to confirm iptables is not configured:

iptables-save

Offline

#4 2015-09-16 22:07:20

quandasim
Member
Registered: 2015-03-05
Posts: 5

Re: [SOLVED] network port question

thanks for reply

i tried the nc command but without success, i tried:

on server:

nc -l 1234

on server in another gnu screen window:

nc -u 127.0.0.1 1234
dfsfs
read(net): Connection refused

any idea what i doing wrong?


when i tried the ss command i got:

ss -tunlp | column -t | grep 3979
udp    UNCONN  0       0       108.61.179.153:3979                 *:*           users:(("openttd",pid=26733,fd=9))
tcp    LISTEN  0       1       108.61.179.153:3979                 *:*           users:(("openttd",pid=26733,fd=7))
quandasim ~ $iptables-save
quandasim ~ $

iptables save comand dont write anything so i think it means that i dont havy any iptables rules.


edit:
i'm dumb, i tried connect to udp port but the server listened on tcp, so now with these sommand it works perfectly:

server:

nc -l -p 1234
asdadasf

looks like i must use the -p option for port

client:

nc 127.0.0.1 1234
asdadasf

so with this i can check if the 3979 port is accesible from my home machine (i do that later after i shutdown the openttd server)

thanks a lot for your help guys;)

Last edited by quandasim (2015-09-16 22:32:36)

Offline

Board footer

Powered by FluxBB