[SOLVED] Can't connect to SSH using private IP

EDIT: there is no problem. Private networks doesn't work between different datacenters.

I have 2 servers: drp1US and drp1UK. I want them to connect to each other using their private IPs. I can connect from UK => US, but when I try to connect from US => UK I get "connection refused".

This problem only happens when I try to connect using the private IP. If I try to connect using the public IP, I can connect without problems in both ways.

  • UK => US, public IP: works

  • UK => US, private IP: works

  • US => UK, public IP: works

US => UK, private IP: CONNECTION REFUSED

SSH server is listening on port 22:

root@uk:~# netstat -ltnp | grep sshd

tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 3525/sshd

tcp6 0 0 :::22 :::* LISTEN 3525/sshd

I can connect in every other port from US => UK using the private interface. Only port 22 returns connection refused.

root@us:~# telnet 192.168.199.225 80

Trying 192.168.199.225…

Connected to 192.168.199.225.

Escape character is '^]'.

root@us:~# telnet 192.168.199.225 22

Trying 192.168.199.225…

telnet: Unable to connect to remote host: Connection refused

I appreciate any information that can help me to solve this mistery.

0 Replies

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct