V
V
Vanes Ri_Lax2021-07-16 22:56:26
Java
Vanes Ri_Lax, 2021-07-16 22:56:26

Why is the program not visible from the outside?

Good afternoon, I wrote a program, uploaded it to the server, OpenJRE 11 is running there.
My program is a simple web socket server.
I run the program on the server, I try to connect to it from the outside, as if there is no access to the program ...
Here is the code that starts the server itself:

WebSocketServer webSocketServer = new WSServer(
                    new InetSocketAddress(Settings.WS_HOST_VALUE, Settings.WS_PORT_VALUE)
            );
            webSocketServer.run();

I connect via ssh, there I type the command:
netstat -ntlp | grep LISTEN
Writes:
tcp        0      0 (мой ip):8887      0.0.0.0:*               LISTEN      20355/java

The service https://portscaner.ru writes that such a port is open.
iptables -L
Gives me this:
Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
vreitech, 2021-07-17
@fzfx

you didn't enter your IP. if this IP is from the range of one of the private subnets, then it is not accessible from the Internet.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question