Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not listen port 53 #51

Closed
jkman2 opened this issue Dec 5, 2017 · 5 comments · Fixed by #84
Closed

Does not listen port 53 #51

jkman2 opened this issue Dec 5, 2017 · 5 comments · Fixed by #84

Comments

@jkman2
Copy link

jkman2 commented Dec 5, 2017

Fresh Lbuntu 17.10 install in Virtual box. No error on compilation.

I run
sudo ./dnsseed -h dnsseed -n localhost -m test. -p 53
...
Starting 4 DNS threads for dnsseed on localhost (port 53).......done
...

but
nslookup dnsseed localhost
;; connection timed out; no server could be reached

@jkman2
Copy link
Author

jkman2 commented Dec 5, 2017

This is where it stops.
ssize_t insize = recvmsg(listenSocket, &msg, 0);

@jonasschnelli
Copy link
Contributor

Does the same happen if you run non sudo on port 5353?
Can you attach gdb and get a strack trace?

@jkman2
Copy link
Author

jkman2 commented Dec 6, 2017

UDP port 5353 is already in use. TCP port 5353 is closed. 5353 is default port for multicast DNS.
netcat -z -v -u localhost 5353
Connection to localhost 5353 port [udp/mdns] succeeded!

If I use port 5555 or 50 dnsseed opens that UDP port.

Port 50 works with sudo.
netcat -z -v -u localhost 50
Connection to localhost 50 port [udp/re-mail-ck] succeeded!

UFW is inactive.
sudo ufw status
Status: inactive

Iptables is empty.

@jkman2
Copy link
Author

jkman2 commented Dec 6, 2017

I need to learn how to use GDB.

Eg. port 5555 or 55 is listened only by IPv6. Port 53 will not appear in netstat list.

netstat -plnu
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           -                   
udp        0      0 0.0.0.0:5355            0.0.0.0:*                           -                   
udp        0      0 0.0.0.0:57611           0.0.0.0:*                           -                   
udp        0      0 127.0.0.53:53           0.0.0.0:*                           -                   
udp        0      0 0.0.0.0:68              0.0.0.0:*                           -                   
udp6       0      0 :::5353                 :::*                                -                   
udp6       0      0 :::5355                 :::*                                -                   
udp6       0      0 :::43253                :::*                                -                   
udp6       0      0 :::5555                 :::*        

If I run
sudo netcat -l -u 53

Port 53 is working OK.
netcat -z -v -u localhost 53
Connection to localhost 53 port [udp/domain] succeeded!

Additional info...

If I run dnsseed on port 55 and make a redirect
sudo iptables -t nat -A OUTPUT -o lo -p udp --dport 53 -j REDIRECT --to-port 55
it works

 nslookup seedtest localhost
Server:		127.0.0.53
Address:	127.0.0.53#53

Name:	seedtest
Address: 62.210.253.10
Name:	seedtest
Address: 109.69.78.107
Name:	seedtest

but this brakes the sever's dns.

 nslookup google.com

;; Warning: query response not set
Server:		127.0.0.53
Address:	127.0.0.53#53

** server can't find google.com: REFUSED

@jkman2
Copy link
Author

jkman2 commented Dec 7, 2017

systemd-resolved is added to Ubuntu 16.10 ->. 127.0.0.53:53 causes problems.

I think bitcoin seeder need to be binded to listen only specified IP address like '-b 10.0.2.15'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants