Go Back   { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Linux > Linux Networking

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-08-2008, 07:51 PM
Geoff Lane
 
Posts: n/a
OpenVPN tun adapter

I made my first connection using openVPN on my local network.

I used one XP machine as a server and an Ubuntu machine as the client,
all went fine and I was able to connect a VNC viewer on both machines to
view the other.

Connection was made by command line.

Trying exactly the same connection the following day my Linux machine
keeps telling me the address is in use; network tools shows a tun0
adapter but if I try to configure it I get the message that it doesn't
exist.

Is there a command that I need to issue to clear any cache?

Geoff Lane
Reply With Quote
  #2 (permalink)  
Old 07-09-2008, 06:09 PM
Robert Harris
 
Posts: n/a
Re: OpenVPN tun adapter

Geoff Lane wrote:
> I made my first connection using openVPN on my local network.
>
> I used one XP machine as a server and an Ubuntu machine as the client,
> all went fine and I was able to connect a VNC viewer on both machines to
> view the other.
>
> Connection was made by command line.
>
> Trying exactly the same connection the following day my Linux machine
> keeps telling me the address is in use; network tools shows a tun0
> adapter but if I try to configure it I get the message that it doesn't
> exist.
>
> Is there a command that I need to issue to clear any cache?
>
> Geoff Lane


If it tells you that the address is in use, that is probably because you
have an instance of openvpn already running.

Robert
Reply With Quote
  #3 (permalink)  
Old 07-10-2008, 05:50 PM
Geoff Lane
 
Posts: n/a
Re: OpenVPN tun adapter

Robert Harris wrote:

>> Trying exactly the same connection the following day my Linux machine
>> keeps telling me the address is in use; network tools shows a tun0
>> adapter but if I try to configure it I get the message that it doesn't
>> exist.
>>
>> Is there a command that I need to issue to clear any cache?


> If it tells you that the address is in use, that is probably because you
> have an instance of openvpn already running.


Being very new to openVPN I am not fully familiar with the 'start and
stop' procedure.

I am initially running just a point to point connection from the command
line.

On the windows machine F4 cancels and I assumed as I shut down the Linux
machine that openvpn client would have been cancelled anyway.

Geoff Lane

Reply With Quote
  #4 (permalink)  
Old 07-11-2008, 08:39 AM
Chris Davies
 
Posts: n/a
Re: OpenVPN tun adapter

Geoff Lane <datemasde.t1m@gishpuppy.com> wrote:
> On the windows machine F4 cancels and I assumed as I shut down the Linux
> machine that openvpn client would have been cancelled anyway.


That's not the case unless you've configured OpenVPN to do so. It's
probably still running, in which case firing in the WinXP side of the
connection will allow it to reestablish the link.

If you want to be sure then post your OpenVPN configuration here
(both sides), ensuring that you XXX out any reference to certificates,
usernames, and passwords (if any). You may want to obfuscate public IP
addresses or hostnames, too, within reason.

Chris
Reply With Quote
  #5 (permalink)  
Old 07-11-2008, 09:12 PM
Geoff Lane
 
Posts: n/a
Re: OpenVPN tun adapter

Chris Davies wrote:

> If you want to be sure then post your OpenVPN configuration here
> (both sides), ensuring that you XXX out any reference to certificates,
> usernames, and passwords (if any). You may want to obfuscate public IP
> addresses or hostnames, too, within reason.


I just used the command line as follows;

Server

openvpn --dev tun --ifconfig 10.0.0.1 10.0.0.2


Client

openvpn --remote 'local network address' --dev tun --ifconfig 10.0.0.2
10.0.0.1

Geoff Lane
Reply With Quote
  #6 (permalink)  
Old 07-18-2008, 02:27 PM
Chris Davies
 
Posts: n/a
Re: OpenVPN tun adapter

Geoff Lane <datemasde.t1m@gishpuppy.com> wrote:
> I just used the command line as follows;


> Server
> openvpn --dev tun --ifconfig 10.0.0.1 10.0.0.2


> Client
> openvpn --remote 'local network address' --dev tun --ifconfig 10.0.0.2
> 10.0.0.1


You need to separate out the network addresses of the client and server
from the openvpn addresses for the client and server.

If the server is 10.0.0.1 and the client is 10.0.0.2, then you need to
use different IP addresses for the openvpn link. (However, since they're
on the same network it may well not work usefully.)

Server:
openvpn -dev tun --ifconfig 192.168.0.2 192.168.0.1

Client
openvpn -dev tun --ifconfig 192.168.0.1 192.168.0.2 --remote 10.0.0.1


Geoff Lane <datemasde.t1m@gishpuppy.com> wrote:
> Trying exactly the same connection the following day my Linux machine
> keeps telling me the address is in use [...]


If you've got "connection in use" and a visible tun adapter then it's
likely the openvpn server is still running:

ps -ef | grep openvpn

If that shows nothing, try using lsof to see which process is using it:

lsof | grep tun

Chris
Reply With Quote
Reply

  { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Linux > Linux Networking


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 02:40 PM.


Powered by vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
© 1999-2008 mindfrost82.com v11.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109