Can not ssh via VPN

Issues related to configuring your network
Post Reply
Igor2003
Posts: 5
Joined: 2021/01/28 18:17:16

Can not ssh via VPN

Post by Igor2003 » 2021/01/28 18:28:43

Hi guys,

I have just installed 7.8.2003 and trying to figure out how to allow ssh connection via VPN (putty)
I can connect locally from my network
Let's say my network is 10.1.0.0/16 and my VPN is 10.212.143.0/24
I have played with hosts.allow allowing ssh: ALL, etc... no success

What makes me really frustrated is that I managed to connect several times and then I got "connection refused" again
Moreover, rarely I get ssh "connection refused" even when I'm connecting from local network

I've wasted 4 hours on this today, pls help... sounds like routing issue. BTW, I stopped firewalld so it is not a firewall issue

User avatar
TrevorH
Site Admin
Posts: 33216
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Can not ssh via VPN

Post by TrevorH » 2021/01/28 18:48:39

First of all, 7.8 is out of date and has been since the release of 7.9 nearly 4 months ago. You should yum update to get to 7.9.2009 ASAP.

The description of the problem sounds most like a duplicate ip address on your local network so you are not connecting (randomly) to the machine you think you are. By default, firewalld is used as the firewall on CentOS 7 and it comes preconfigured to allow ssh on port 22 from anywhere. The ssh daemon is likewise configured to allow connections from anywhere using any authentication mechanism.

As far as I know, hosts.allow etc are not used in CentOS 7 though I may be misremembering that and it might only have come in with 8.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Igor2003
Posts: 5
Joined: 2021/01/28 18:17:16

Re: Can not ssh via VPN

Post by Igor2003 » 2021/01/28 19:03:58

Dear Trevor

First of all, you were absolutely right. It was an IP conflict. Thank you so much for the input!
I have also updated the server to 7.9.2009
Thanks a lot!

Post Reply