Here is an interesting little problem I am having. Kudos to anyone who can clue me in to an answer:
Background: All my droplets are Ubuntu 14.04 All are based in San Francisco All up to date and running fine for at least a month
The problem: Recently I set up OpenVPN on a droplet, and connect to that vpn from home. Works great for the last week. No problems with the VPN or droplet or home network. I keep the VPN connected at all times for various reasons.
Yesterday I needed to ssh in to another droplet (webserver), but encountered this error:
ssh_exchange_identification: read: Connection reset by peer
If I disconnect from the VPN, I can ssh in fine to that droplet.
I tried a few other droplets I manage, and some of them will ssh fine while on the VPN, and some will not. The common factor for the non-connecting ones seems to be the subnet of the droplet: 255.255.240.0 which is the same subnet of the droplet that I have OpenVPN running on.
So, in summary: Droplets that have the same subnet of my VPN server will not allow me to connect while I am connected to the VPN.
Droplets on a different subnet will connect fine.
Are there some rules I can add to my VPN config that will allow me to ssh to droplets within the same subnet?
Thanks in advance!!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
This question was answered by @sierracircle:
Found a solution:
on the droplets I am trying unsuccessfully to ssh into:
add the IP address of the VPN server to /etc/hosts.allow like this:
sshd: my.vpn.ip.addressno need to restart anything…I can now ssh to my droplets when connected to the VPN, even if the droplets have the same subnet
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.