need help installing openVPN

This is a discussion on need help installing openVPN within the Linux Security forums, part of the System Security and Security Related category; Ok I am going to take the plunge and try installing openVPN and try getting it to work. If anybody ...


Go Back   Usenet Forums > System Security and Security Related > Linux Security

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-23-2005
Proteus
 
Posts: n/a
Default need help installing openVPN

Ok I am going to take the plunge and try installing openVPN and try
getting it to work. If anybody can help me along I would really appreciate
it. I printed out the HOW-TO install guide from http://openvpn.net and
will do my best. A little hand-holding would be appreciate, I know enought
to be dangerous. I use Mandriva LE2005, been using Linux for several
years. As I use wifi with my laptop out and about at cafes, I want to set
up a VPN between my wifi laptop and a home PC running a VPN server program.

I have urpmi setup, so I am first going to try installing openVPN on both
my laptop and Desktop (to serve VPN).


Reply With Quote
  #2 (permalink)  
Old 11-23-2005
Tauno Voipio
 
Posts: n/a
Default Re: need help installing openVPN

Proteus wrote:
> Ok I am going to take the plunge and try installing openVPN and try
> getting it to work. If anybody can help me along I would really appreciate
> it. I printed out the HOW-TO install guide from http://openvpn.net and
> will do my best. A little hand-holding would be appreciate, I know enought
> to be dangerous. I use Mandriva LE2005, been using Linux for several
> years. As I use wifi with my laptop out and about at cafes, I want to set
> up a VPN between my wifi laptop and a home PC running a VPN server program.
>
> I have urpmi setup, so I am first going to try installing openVPN on both
> my laptop and Desktop (to serve VPN).


There are many different ways of setting up OpenVPN.

My recommendation is:

- tunneling at network layer (use tun0, not tap0),
- a separate RFC1918 subnet for the VPN (e.g. 192.168.x.y)
- UDP transport on the standard port (1194),
- SSL encryption and key exchange

An option to public-key SSL is to use pre-shared keys.

The details are in OpenVPN documentation.

HTH

--

Tauno Voipio
tauno voipio (at) iki fi

Reply With Quote
  #3 (permalink)  
Old 11-23-2005
Proteus
 
Posts: n/a
Default Re: need help installing openVPN

On Wed, 23 Nov 2005 20:57:00 +0000, Tauno Voipio wrote:
....
> There are many different ways of setting up OpenVPN.
> My recommendation is:
> - tunneling at network layer (use tun0, not tap0),


ok i will be sure to go with tun0

> - a separate RFC1918 subnet for the VPN (e.g. 192.168.x.y)


Not sure what that is, but my router has been set up as 192.168.1.1 as
gateway, 255.255.255.0 subnet mask, and thus my main PC is 192.168.1.100
-- so I hope that is ok to go with for now? (see below)

> - UDP transport on the standard port (1194),


yes I will go with UPD and 1194

> - SSL encryption and key exchange

...

Ok I got openvpn installed using urpmi, it was quite easy, now for the
hard part, configuring it. It looks do-able though, I am actually rather
excited to get it installed!

Can I still leave my home cable router home PC LAN setting as
192.168.1.1 as the local address (gateway) with 255.255.255.0 subnet mask
(so that my main PC is 192.169.1.100, etc)-- or do I need to change my
router LAN network to something else? In the openVPN documentation
on setting it up, it talks about "Numbering Private subnets", where
10.0.0.0 / 10.255.255.255.255 (10/8 prefix, whatever that means) is
reserved block of IP address space for private interent protocols. The doc
says "The best solution is to avoid using 10.0.0.0/24 or 192.168.0.0/24
LAB network addresses. Instead, use something that has a lower probability
of being used in a Wifi cafe, etc. The best candidates are subnets in the
middle of the vast 10.0.0.0/8 netblcok (for example 10.66.77.0/24)" I
want to have my router set up correctly first, then I think I will be able
to configure the config files with a little help.


Reply With Quote
  #4 (permalink)  
Old 11-24-2005
Llanzlan Klazmon
 
Posts: n/a
Default Re: need help installing openVPN

Proteus <proteus@uselessemail.net> wrote in
news:pan.2005.11.23.21.14.48.136311@uselessemail.n et:

> On Wed, 23 Nov 2005 20:57:00 +0000, Tauno Voipio wrote:
> ...
>> There are many different ways of setting up OpenVPN.
>> My recommendation is:
>> - tunneling at network layer (use tun0, not tap0),

>
> ok i will be sure to go with tun0
>
>> - a separate RFC1918 subnet for the VPN (e.g. 192.168.x.y)

>
> Not sure what that is, but my router has been set up as 192.168.1.1 as
> gateway, 255.255.255.0 subnet mask, and thus my main PC is 192.168.1.100
> -- so I hope that is ok to go with for now? (see below)


The subnet for the VPN must not conflict with the subnet being used for
ethX to talk to your your router or any other local subnets. The VPN uses
tun0 as though it were a real interface. Think of it as a "wire" running
between tun0 on one PC to the tun0 on the other. Each end of the "wire"
needs an ip address on the same subnet so you can route packets over the
tunnel. These are usually set up as a private RFC subnet but must not
conflict with any other private RFC subnets you are using. The Open VPN
Server can supply the address to the client as part of the process of
bringing up the tunnel which is actually established via ethX's ip
address. e.g you could have:


tun0 of the server could be 192.168.250.1/24
tun0 at the client gets assigned 192.168.250.x where x not= 1

You can route other subnets over the VPN tunnel via pushroutes in the
OpenVPN config or just add the routes after the VPN is established.

>
>> - UDP transport on the standard port (1194),

>
> yes I will go with UPD and 1194
>
>> - SSL encryption and key exchange

> ..
>
> Ok I got openvpn installed using urpmi, it was quite easy, now for the
> hard part, configuring it. It looks do-able though, I am actually rather
> excited to get it installed!
>
> Can I still leave my home cable router home PC LAN setting as
> 192.168.1.1 as the local address (gateway) with 255.255.255.0 subnet
> mask (so that my main PC is 192.169.1.100, etc)-- or do I need to change
> my router LAN network to something else?


Leave your PC lan and router setup alone. Just choose the VPN subnet so it
doesn't conflict with anything you already have.

> In the openVPN documentation
> on setting it up, it talks about "Numbering Private subnets", where
> 10.0.0.0 / 10.255.255.255.255 (10/8 prefix, whatever that means) is
> reserved block of IP address space for private interent protocols. The
> doc says "The best solution is to avoid using 10.0.0.0/24 or
> 192.168.0.0/24 LAB network addresses. Instead, use something that has a
> lower probability of being used in a Wifi cafe, etc. The best candidates
> are subnets in the middle of the vast 10.0.0.0/8 netblcok (for example
> 10.66.77.0/24)" I want to have my router set up correctly first, then I
> think I will be able to configure the config files with a little help.


Again, don't touch your router config. As long as normal internet access
is working, leave it alone. The only thing is if the router has a firewall
on it - you will have to make sure udp port 1194 is allowed through to get
the VPN tunnel established. The traffic actually carried over the VPN just
looks like udp port 1194 packets containing gobbledegook (because the real
data packets are encrypted and packeged up inside the UDP 1194 packets).

Klazmon
Reply With Quote
  #5 (permalink)  
Old 11-24-2005
Proteus
 
Posts: n/a
Default Re: need help installing openVPN

On Thu, 24 Nov 2005 17:17:29 +1300, Llanzlan Klazmon wrote:
....
> Again, don't touch your router config. As long as normal internet access
> is working, leave it alone. The only thing is if the router has a firewall
> on it - you will have to make sure udp port 1194 is allowed through to get
> the VPN tunnel established. The traffic actually carried over the VPN just
> looks like udp port 1194 packets containing gobbledegook (because the real
> data packets are encrypted and packeged up inside the UDP 1194 packets).



Thank you Klazmon for the clarification, this is all strange to me, but I
am feeling like I WILL get it working, and then I can help others how to
do it too in the future. Ok I am only going to set up the UDP port and
port forwarding and such on my hardware router, I will not alter my
router's LAN and subnet mask settings. Thanksgiving today, so I will work
more on setting up the VPN later today and tomorrow. Thanks all for the
help thus far!


Reply With Quote
  #6 (permalink)  
Old 11-25-2005
Nick Craig-Wood
 
Posts: n/a
Default Re: need help installing openVPN

Llanzlan Klazmon <Klazmon@llurdiaxorb.govt> wrote:
> The subnet for the VPN must not conflict with the subnet being used for
> ethX to talk to your your router or any other local subnets.


I tend to use OpenVPN as a point to point link, like this (with
pre-shared keys), and add exactly the routes I want. I re-use the IP
address of the internal network on the tun interface (no need for a
different one).

My local network is 172.16.x.y, the remote network is 172.17.x.y and this
connects the two gateway machines together.

vpnX.conf ------------------------------------------------------------
#
# OpenVPN configuration file
# using a pre-shared static key.
#

# Use a fixed name tun device.
dev tun-X

# remote end - comment this out if the other end is dynamic IP
#remote 1.2.3.4

# local, remote IPs of the tunnel
ifconfig 172.16.0.1 172.17.0.1

# Start routes
up ./vpnX.up

# Our pre-shared static key
secret vpnX.key

# Port number to use
port 12221

# Compress
comp-lzo

# Send a UDP ping to remote once every N seconds to keep stateful
# firewall connection alive. iptables has a 3 minute timeout on UDP
# by default so 1 minute should be adequate here
; ping 60

# Verbosity level.
# 0 -- quiet except for fatal errors.
# 1 -- mostly quiet.
# 5 -- medium output, good for normal operation.
# 8 -- verbose, good for troubleshooting
verb 5

# VOIP
passtos
------------------------------------------------------------

vpnX.up ------------------------------------------------------------
#!/bin/bash
route add -net 172.17.0.0 netmask 255.255.0.0 gw $5
------------------------------------------------------------

I've found OpenVPN to be by far the most reliable and easy to setup VPN!
--
Nick Craig-Wood <nick@craig-wood.com> -- http://www.craig-wood.com/nick
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:45 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0