Does not listen port 53
jkman2 opened this issue · 5 comments
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
This is where it stops.
ssize_t insize = recvmsg(listenSocket, &msg, 0);
Does the same happen if you run non sudo on port 5353?
Can you attach gdb and get a strack trace?
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.
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
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'.