Client and Server on same machine?

This forum is for admins who are looking to build or expand their OpenVPN setup.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
jerryk1234
OpenVpn Newbie
Posts: 3
Joined: Sat Nov 06, 2010 2:29 am

Client and Server on same machine?

Post by jerryk1234 » Wed Dec 22, 2010 4:12 am

Hello,

I have successfully implemented an openvpn server on my home linux box. I have a satellite Linux box at my business in another town. Way cool!

Now, I'd like to define another VPN, with the satellite box acting as its server. Reason is that I need to do windows file sharing for my staff there, but I DON"T want them on my central VPN with access to the stuff in my house.

Can this be done? I'm thinking one would start two openvpn's, one using a "server.conf", and the other one "client.conf". Or possibly make two complete independant directories in /etc.

- Jerry Kaidor

User avatar
gladiatr72
Forum Team
Posts: 194
Joined: Mon Dec 13, 2010 3:51 pm
Location: Lawrence, KS

Re: Client and Server on same machine?

Post by gladiatr72 » Wed Dec 22, 2010 6:19 pm

Hi, Jerry.

Yes. It is very possible. How this is started is dependent on your startup scripts. for instance, with Debian + derivatives you actually have a file: /etc/default/openvpn with a variable, AUTOSTART where you can specify which configurations you want to execute. This gives a little more flexibility than the init script that comes with ovpn and is included with the redhat RPM (which will start an openvpn instance for any .conf files in /etc/openvpn)

Be sure to use the nobind option in the client configuration at your satellite location. This will prevent the client instance from opening port 1194 leaving it available for the server instance (and who wants a port dangling open when it will never be used, anyway?)

Regards,
Stephen
[..]I used to think it was awful that life was so unfair. [...]Wouldn't it be much worse if life were fair, and all the terrible things that happen to us come because we actually deserve them? -Marcus Cole

Post Reply