Loopback-Connection

Need help configuring your VPN? Just post here and you'll get that help.

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
sdfsdfsdf
OpenVpn Newbie
Posts: 11
Joined: Tue Nov 15, 2011 4:43 pm

Loopback-Connection

Post by sdfsdfsdf » Sun Nov 20, 2011 1:48 pm

Hey there. I want to setup a OpenVPN server, but it seems like sth is wrong. To figure out the issue I'd like to be able to test config locally. So I want to connect a Client to a server on the same PC - is this somehow possible?
Up to now it seems like "local out port" must be the same as "remote in port", which would mean that loopback is not possible?!

User avatar
Mimiko
Forum Team
Posts: 1564
Joined: Wed Sep 22, 2010 3:18 am

Re: Loopback-Connection

Post by Mimiko » Sun Nov 20, 2011 2:10 pm

It's possible, but you have to install two tun-adapters. And don't use lport on client.

sdfsdfsdf
OpenVpn Newbie
Posts: 11
Joined: Tue Nov 15, 2011 4:43 pm

Re: Loopback-Connection

Post by sdfsdfsdf » Sun Nov 20, 2011 3:28 pm

ok, but how do i setup a 2nd TAP-Adapter? and what is lport?

User avatar
Mimiko
Forum Team
Posts: 1564
Joined: Wed Sep 22, 2010 3:18 am

Re: Loopback-Connection

Post by Mimiko » Sun Nov 20, 2011 3:37 pm


sdfsdfsdf
OpenVpn Newbie
Posts: 11
Joined: Tue Nov 15, 2011 4:43 pm

Re: Loopback-Connection

Post by sdfsdfsdf » Sun Nov 20, 2011 3:54 pm

ah, so if there are lport and rport, why cant I just use a rport for destination an another lport for source? this should work for loopback?!
I wonder why http://wiki.openvpn.eu/index.php/Erster_Tunnel suggests a tap for first tunnel uasage - loking at Forum rules this seems to be a bad idea somehow (would be nice to know why)?!
The thread you linked is about fixing a tun, not about installing it, is it?!
edit: semms like "Add a new TAP-Win32 virtual ethernet adapter" doesnt exist in my start menus openvpn folger?!
Last edited by sdfsdfsdf on Sun Nov 20, 2011 4:07 pm, edited 1 time in total.

User avatar
Mimiko
Forum Team
Posts: 1564
Joined: Wed Sep 22, 2010 3:18 am

Re: Loopback-Connection

Post by Mimiko » Sun Nov 20, 2011 4:05 pm

the virtual adapter can be TUN or TAP by the command you use in config file.
When installing tun adapter you give it a name. So you can give another name.
Just don't use rport and lport in your config files for server and client.

sdfsdfsdf
OpenVpn Newbie
Posts: 11
Joined: Tue Nov 15, 2011 4:43 pm

Re: Loopback-Connection

Post by sdfsdfsdf » Sun Nov 20, 2011 4:09 pm

"When installing tun adapter" - well thats just the problem ^^ - In documentation it's said, that there should be a link in my start menu - which just is not there ;)
If you are using Windows, each OpenVPN configuration needs to have its own TAP-Win32 adapter. You can add additional adapters by going to Start Menu -> All Programs -> OpenVPN -> Add a new TAP-Win32 virtual ethernet adapter.

User avatar
Mimiko
Forum Team
Posts: 1564
Joined: Wed Sep 22, 2010 3:18 am

Re: Loopback-Connection

Post by Mimiko » Sun Nov 20, 2011 4:54 pm

The comand from start menu is for Microsoft's tun-adapter. The one used with openvpn must be started from a command line. Just browse to the tap driver folder and run:

Code: Select all

tapinstall install tap0
for adding a tap adapter 0, or tap1 for the following one.

sdfsdfsdf
OpenVpn Newbie
Posts: 11
Joined: Tue Nov 15, 2011 4:43 pm

Re: Loopback-Connection

Post by sdfsdfsdf » Sun Nov 20, 2011 5:32 pm

it diddnt work directly, bu i managed to fix it.

now the server/client works - I restarted with sample config.
But i wonder about is:

the client gets IP .6 (every time), but in ipp.txt its logged as

clientname,10.8.0.4

?!

User avatar
Mimiko
Forum Team
Posts: 1564
Joined: Wed Sep 22, 2010 3:18 am

Re: Loopback-Connection

Post by Mimiko » Sun Nov 20, 2011 6:07 pm

ipp.txt is not always updated imediatly upon client connected, its rather updated when client is disconnected.

Post Reply