torproject / nyx

Command-line monitor for Tor.
https://nyx.torproject.org/
GNU General Public License v3.0
123 stars 26 forks source link

Nyx is not showing any inbound connections #34

Closed Quakerelay closed 3 years ago

Quakerelay commented 3 years ago

Hi,

Running Tor 0.4.5.1-alpha here. I've installed Nyx with Python's pip3 installer.

Tor currently has around 2300 inbound and 2300 outbound connections (checked with netstat -p).

When I run nyx I don't see any inbound connections at all: Connections (2412 outbound, 1 control)

When I switch the resolver to netstat I get this: Connections (5130 outbound, 1 control)

I also tried shutting down the relay and restarting it but that didn't fix the issue.

Tor is build with: ./configure --disable-module-dirauth --prefix=/usr --sysconfdir=/etc --localstatedir=/var --mandir=/usr/man --libdir=/usr/lib64 --docdir=/usr/doc/tor-0.4.5.1-alpha --with-tor-user=tor --with-tor-group=tor --build=x86_64-slackware-linux

Quakerelay commented 3 years ago

New info:

I wasn't aware of that 0.4.5.1-alpha now binds to ipv6 automatically so I had these lines on torrc: ORPort myipv4address:53 ORPort [myipv6address]:53

... so obviously Tor binds to myip:port

I switched it to just "ORPort 53" and Tor now binds to 0.0.0.0:53 and [::]:53 and Nyx is showing inbound connections normally: Connections (1413 inbound, 1123 outbound, 11 circuit, 1 control)

So, it was kind of my mistake. However, could this be still considered a bug?

atagar commented 3 years ago

Hi Quakerelay, thanks for running a relay!

By configuring an ORPort address nyx could no longer determine if it was for localhost or not...

https://gitweb.torproject.org/stem.git/tree/stem/control.py#n1392

Patches welcome if know of a better method of determining if an address is local or not.