LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-19-2021, 11:31 PM   #1
Klaipedaville
Member
 
Registered: Mar 2013
Posts: 106

Rep: Reputation: Disabled
Connect to Debian VPS box via VPN Issue


Hello all,

I am kinda stuck with an usual issue (or is it usual?). Let me explain.

I have two Debian VPS boxes. The first one is a pure VPN (OpenVpn) and the second one is my regular server with emails, websites and stuff like that. I also have a machine "at home" that can easily connect to these two boxes.

Now I need to connect like this:
my machine at home to -> my VPS that runs VPN only and then to -> my regular VPS server.

I thought it would be easy, but I was mistaken. I allowed my VPN's static IP address through my firewall (iptables) on my regular VPS server but I didn't work. I flushed all the iptables just to see if it helps but.. it still doesn't work (it always times out, I use ssh keys to connect). I can only connect to either my VPS that runs my VPN only or to my regular VPS, but my route of home->VPN->regular VPS just doesn't work. How can I possibly do it? These two VPS boxes are working fine: My VPS with VPN is working perfectly well and my regular VPS is also working perfectly well. I would be really grateful for any pointers / suggestions / advices at all. Many thanks in advance!

Last edited by Klaipedaville; 07-20-2021 at 12:36 AM.
 
Old 07-20-2021, 06:28 AM   #2
Klaipedaville
Member
 
Registered: Mar 2013
Posts: 106

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Klaipedaville View Post
Hello all,

I am kinda stuck with an usual issue (or is it usual?). Let me explain.

I have two Debian VPS boxes. The first one is a pure VPN (OpenVpn) and the second one is my regular server with emails, websites and stuff like that. I also have a machine "at home" that can easily connect to these two boxes.

Now I need to connect like this:
my machine at home to -> my VPS that runs VPN only and then to -> my regular VPS server.

I thought it would be easy, but I was mistaken. I allowed my VPN's static IP address through my firewall (iptables) on my regular VPS server but I didn't work. I flushed all the iptables just to see if it helps but.. it still doesn't work (it always times out, I use ssh keys to connect). I can only connect to either my VPS that runs my VPN only or to my regular VPS, but my route of home->VPN->regular VPS just doesn't work. How can I possibly do it? These two VPS boxes are working fine: My VPS with VPN is working perfectly well and my regular VPS is also working perfectly well. I would be really grateful for any pointers / suggestions / advices at all. Many thanks in advance!
Let me answer my own question. Not sure why it works this way but it works. I simply allowed "password logins" and it all started working perfectly well. It connects using ssh keys anyway without any password prompts but.. nonetheless allowing password logins in ssh solved the issue (I had it turned off earlier). Hope it will help someone too.
 
  


Reply

Tags
iptables, netwoking, openvpn, routing table, vpn


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to connect a netbook via cable via PC via UMTS-stick to the internet JZL240I-U Linux - Software 9 06-03-2015 11:45 AM
[SOLVED] Windows7 VPN clients behind Debian Gateway can not connect to Draytek VPN neopandid Linux - Server 3 08-31-2012 11:34 PM
How do I connect a single windows machine to an Ubuntu 10.04 box via vpn or similar? 2legit2quit Linux - Newbie 2 01-29-2012 09:41 PM
Logging into a debian primary domain controller via windows xp pro via windows VPN dr5419 Linux - Newbie 15 12-11-2008 04:48 PM
Where can I download UML VPS or Xen VPS to make a virtual private server? abefroman Linux - Software 3 12-09-2005 10:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration