I have a jump server and I want to put it behind a VPN, I do not want to deploy a separate VPN server and put my jump server behind it. I thought of installing OpenVPN directly onto my jump server and allow connections to it only through VPN client.

I have installed OpenVPN and OpenVPN access server in it, I could see the server is healthy from the access server UI. Now how can I provide access to the VPN server only through a VPN?

I know this is a bit confusing and I didn't put it well, my apologies.

Appreciate any humble help.

  • I wonder how I managed to answer this question. There's not a word about SSH. Did you mean just SSH access or some other access too? – Tomasz Jun 12 at 20:09
  • For now, I am only configuring it for ssh. What if I have to do for all other access? any directions? I ready to go read. – Vignesh SP Jun 12 at 20:13
  • I just updated my answer to cover wider. You might also use a firewall, which might be easier or more difficult, depending on your skills. – Tomasz Jun 12 at 20:15
  • Thanks again, I will take it further from here :) – Vignesh SP Jun 12 at 20:22

For SSH access, just limit the SSHD to a certain address. There should be a line like:


in you SSHD config file, probably /etc/ssh/sshd_config. Change to your VPN server's VPN IP, uncomment the line, save the file, relaod SSHD and there you go.

For services other than SSH, you have to do a similar thing with them.

Using firewall control instead is another option. You can also apply both.

  • VPN server's IP is a public one, everyone can hit the public IP even if I change the sshd's listen address right? sorry I'm a newbie playing with aws for learning purpose. – Vignesh SP Jun 12 at 19:43
  • @VigneshSP I don't have any VPN server at the moment, but if you run ip a on the server, you should see its VPN IP, as far as I can remember. It should have two IPs then. – Tomasz Jun 12 at 19:49
  • yo it worked, thanks a lot :) – Vignesh SP Jun 12 at 20:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.