0
votes

I am running a java application on a remote server that opens port 7462 for a telnet connection to issue simple commands. I have established a VPN connection (using openvpn) between my local machine and the remote server, but cannot telnet from my local machine to port 7462. The IP address of my vpn server is 10.8.0.1. I am also running postfix on my remote server and am able to telnet to port 25 without any issues. The following commands yield the below results:

On my local machine:

$ telnet 10.8.0.1 25
Trying 10.8.0.1...
Connected to 10.8.0.1.
Escape character is '^]'.
220 xxxxx.com ESMTP Postfix (Debian/GNU)
quit
221 2.0.0 Bye
Connection closed by foreign host.
$ telnet 10.8.0.1 7462
Trying 10.8.0.1...
Connected to 10.8.0.1.
Escape character is '^]'.
Connection closed by foreign host.
$

On the remote server:

$ netstat -plnt | grep -P "7462|25"
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      -               
tcp        0      0 10.8.0.1:7462           0.0.0.0:*               LISTEN      6463/java       
tcp6       0      0 :::25                   :::*                    LISTEN      -
$ telnet 10.8.0.1 7462
Trying 10.8.0.1...
Connected to 10.8.0.1.
Escape character is '^]'.
exit
OK Goodbye
Connection closed by foreign host.

An iptables -L command on both the local and remote machine show that I have no firewall rules established and I have not specifically configured any routes.

I can't figure out why I can connect to the remote server's port 25 from my local machine, but not port 7462. From the remote server though I can connect to port 7462 using the 10.8.0.1 IP address. I'd be happy to provide any additional information and thanks in advance for you help

-Nathan

I figured out my problem. The application was limiting the IP addresses that could connect on the 7462 port and it was a configuration item that needed to be set (default was just localhost). I feel a little silly for such a simple answer, but thanks for the suggestions!

1
Just because you don't have any firewall on each computer doesn't mean there isn't any between them. Check with your network admin if you're not sure of the network topology. - 1ace
The output on local says it was connected. But your java server subsequently closed the connection. Your log files might reveal the cause. From local machine if you run nc -z 10.8.0.1 7462, it will show success connection. And the return value will be 0. - alvits

1 Answers

0
votes

I figured out my problem. The application was limiting the IP addresses that could connect on the 7462 port and it was an (obscure) configuration item that needed to be set (default was just localhost). I feel a little silly for such a simple answer, but thanks for the suggestions!