1

I have set up a hidden service. This is not a web server. Can I check whether this service is reachable, similarly to checking whether a port on a specific IP address is open (e.g with https://www.yougetsignal.com/tools/open-ports/)?

Furthermore, the server running tor hidden service is behind a router. I do not need to set any port forwarding on the router in order for the hidden service to work, right?

1

You can check if service is reachable by connecting to it.

Yes, you do not need to open any ports or have public IP to host hidden service. Only requirements are to be able to connect to tor network and have clocks correctly set.

  • I could now connect. The problem was lying somewhere else. To convince myself that the service was working I did setup a minimal nginx web server and added a HiddenServicePort to redirect the hidden service to the web server. I could connect to it with the tor browser, so I knew the service was working. – Ben2209 Aug 27 '18 at 7:39
0

The code must be in "Listen" state for others to connect to it. Use the "netstat" command and look for ports "listening". I wonder if "bind()" (https://linux.die.net/man/2/bind) can be used to check if a service is "listening". The states allowed is restricted, the client must hit a server with an Internet service "listening". Otherwise it is not available or "busy". The Windows sockets "linger" - are half-made and can be used from the zoombie "WAIT" state. See https://linux.die.net/man/2/socket

This is all, you can use regular file "read()" and "write()" and "close()" now. "lenght" is the buffer size of the application, outvalue is number of bytes in the packet, so "len=read(sd,buff,len);" is all and 0 means that something has happened like a disconnect, and "errno" holds the code.

These "services" are no announced anywhere.

Connections in all "Wait" states can be removed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.