Solved

Setting up Red hat linux VPN

Posted on 2013-11-01
5
552 Views
Last Modified: 2013-12-05
I am trying to setup a red hat Linux server to connect to a windows server running sql server; I want to establish a vpn so DBAs can remotely connect to the windows machine.

Can you help me determine the right VPN client to use and also provide me with the right configuration steps and correct commands to use to set this up.

Thanks,
0
Comment
Question by:redkasote
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 34

Expert Comment

by:Seth Simmons
ID: 39618211
what are you trying to connect to?  do you have rras setup somewhere or do you have some other software/appliance?
0
 

Author Comment

by:redkasote
ID: 39618228
I don't have any software setup or rras. I attempted to intall pptp as a VPN client but wasn't successfull. I am trying to connect to a windows server from a red hat box.
0
 
LVL 13

Expert Comment

by:Daniel Helgenberger
ID: 39618651
Please note, you do not necessarily need a VPN for your setup but can do the same thing maybe better and much easier with ssh port redirection:
1. the client connects to the ssh server
2. the client opens a random port on its own loopback terminated on the servers SQL port
3. access to the loopback port is forwarded through the ssh tunnel to the server's SQL port.
4. the SQL client accesses the the SQL server via its own loopback interface

If you cannot achieve this, for instance because you have no terminated/direct connection to the windows server from your redhat client, I would recommend OpenVPN. This is quite easy to setup and very secure. Binaries are readily available for both OS's.
0
 

Author Comment

by:redkasote
ID: 39618675
I am able to ping the sql server from the red hat machine, is that a direct connection? I started to setup openVPN but there aren't any properly put together steps online. I wasn't sure if I had to setup the openVPN server steps as well or just skip to the client. The steps I was referring to went through server configuration and then client setup.

Are you able to give me the steps to setup both solutions or direct me to where I can see good instructions.  Thanks.
0
 
LVL 13

Accepted Solution

by:
Daniel Helgenberger earned 500 total points
ID: 39619885
Please have a look at this tutorial, to setup OpenSSH on windows:
http://comptb.cects.com/1264-install-configure-ssh-on-windows

If this is configured and setup correctly, then initialize an SSH port forward on your linux client like this example (please change it to your needs):
ssh -N -L31433:localhost:1433 user@winserver &
# Lets test this:
telnet localhost:31433

Open in new window

Explanation:
This assumes, you have a valid user named 'user' on your windows server named 'winserver' and MS SQL running on tcp/1433 on 'winserver'. Please change these settings to your needs.

The port I used, 31433, is random, you can use any other port you like. High port numbers are used commonly (since they require no su rights and do not interfere with other services).

Then, change your connection settings in your Linux application to access the SQL server via localhost:31433
Further, I use -N, this prohibits remote command execution, and & to run this process in the background. The telnet command is just a quick test if the tunnel is up. You should not get a timeout, though any other error is fine in this case.

Note, if this works, you can easily setup xinetd to establish the connection on demand or use a custom service to have it always open. Also, use ssh-keys so services can connect to your windows SSH server, as covered in the HowTo. Also, as a security precaution, you should setup a port forward/guest only user with no remote command execution permissions on your windows server.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question