[Solved] Connecting to a local network Raspberry Pi


See:

tcp6       0      0 127.0.0.1:8890    :::*      LISTEN      1743/java  

Your web server listens only on localhost address (127.0.0.1). This way it couldn’t be accessed from anywhere but localhost.

And your nmap scan shows the same: the only remotely accessible port is 22.

To access this service remotely you have to bind web server to any non-local address belonging to this raspberry pi (192.168.1.8) or to “any address” 0.0.0.0, as SSH service is bound.

How to do this is written in the manual of your web server. Probably, you have to start is with a “-d” param, i.e.

standalone.sh -b=0.0.0.0
standalone.sh -Djboss.bind.address=0.0.0.0

or something like this.

In listener setup code this looks like

“localhost” have to be replaced with some public name. This could be “0.0.0.0” or “192.168.1.8”. We also can

cat "192.168.1.8 somename" >> /etc/hosts

and then use somename:

Undertow server = Undertow.builder() .addHttpListener(8890, "somename")

7

solved Connecting to a local network Raspberry Pi