Page 1 of 1
Loopback-Connection
Posted: Sun Nov 20, 2011 1:48 pm
by sdfsdfsdf
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?!
Re: Loopback-Connection
Posted: Sun Nov 20, 2011 2:10 pm
by Mimiko
It's possible, but you have to install two tun-adapters. And don't use lport on client.
Re: Loopback-Connection
Posted: Sun Nov 20, 2011 3:28 pm
by sdfsdfsdf
ok, but how do i setup a 2nd TAP-Adapter? and what is lport?
Re: Loopback-Connection
Posted: Sun Nov 20, 2011 3:37 pm
by Mimiko
Re: Loopback-Connection
Posted: Sun Nov 20, 2011 3:54 pm
by sdfsdfsdf
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?!
Re: Loopback-Connection
Posted: Sun Nov 20, 2011 4:05 pm
by Mimiko
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.
Re: Loopback-Connection
Posted: Sun Nov 20, 2011 4:09 pm
by sdfsdfsdf
"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.
Re: Loopback-Connection
Posted: Sun Nov 20, 2011 4:54 pm
by Mimiko
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:
for adding a tap adapter 0, or tap1 for the following one.
Re: Loopback-Connection
Posted: Sun Nov 20, 2011 5:32 pm
by sdfsdfsdf
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
?!
Re: Loopback-Connection
Posted: Sun Nov 20, 2011 6:07 pm
by Mimiko
ipp.txt is not always updated imediatly upon client connected, its rather updated when client is disconnected.