Discussion:
[Vtun-Users] reconnect on dialup connection
Christof Warlich
2012-02-19 11:26:54 UTC
Permalink
Hi,

I've set up vtun on a UMTS dialup connection to be able to connect to my
mobile device being behind the carrier's NAT router. Everything works
fine after system startup, but when the connection terminates
temporarily, the tunnel doesn't work any more after connection
reestablishment. It looks like vtun doesn't notice neither the
connection shutdown nor its reestablishment.

Below is my configuration on both sides. Can anyone spot what I may do
wrong?

Thanks for help,

Chris

#Client:
options {
port 5000;
ifconfig /sbin/ifconfig;
route /sbin/route;
}

default {
compress no;
speed 0;
}

fritz {
passwd mypassword;
type tun;
timeout 60;
keepalive yes;
proto tcp;
persist yes;
up {
ifconfig "%% 10.0.0.2 netmask 255.255.255.0 up";
route "add 10.0.0.1 dev %%";
};
down {
ifconfig "%% down";
};
}

#Server:
options {
port 5000;
ifconfig /sbin/ifconfig;
route /sbin/route;
}

default {
compress no;
speed 0;
}

fritz {
passwd mypassword;
type tun;
timeout 60;
keepalive yes;
proto tcp;
persist yes;
up {
ifconfig "%% 10.0.0.1 netmask 255.255.255.0 up";
route "add 10.0.0.2 dev %%";
};
down {
ifconfig "%% down";
};
}
Christof Warlich
2012-02-19 11:12:37 UTC
Permalink
Hi,

I've set up vtun on a UMTS dialup connection to be able to connect to my
mobile device being behind the carrier's NAT router. Everything works
fine after system startup, but when the connection terminates
temporarily, the tunnel doesn't work any more after connection
reestablishment. It looks like vtun doesn't notice neither the
connection shutdown nor its reestablishment.

Below is my configuration on both sides. Can anyone spot what I may do
wrong?

Thanks for help,

Chris

#Client:
options {
port 5000;
ifconfig /sbin/ifconfig;
route /sbin/route;
}

default {
compress no;
speed 0;
}

fritz {
passwd mypassword;
type tun;
timeout 60;
keepalive yes;
proto tcp;
persist yes;
up {
ifconfig "%% 10.0.0.2 netmask 255.255.255.0 up";
route "add 10.0.0.1 dev %%";
};
down {
ifconfig "%% down";
};
}

#Server:
options {
port 5000;
ifconfig /sbin/ifconfig;
route /sbin/route;
}

default {
compress no;
speed 0;
}

fritz {
passwd mypassword;
type tun;
timeout 60;
keepalive yes;
proto tcp;
persist yes;
up {
ifconfig "%% 10.0.0.1 netmask 255.255.255.0 up";
route "add 10.0.0.2 dev %%";
};
down {
ifconfig "%% down";
};
}
Michael Rack
2012-02-20 09:05:31 UTC
Permalink
Hi!

On Server-Side add this option to the default section:

multi killold;

VTUN can only handle one connection to each host-profile.

When the connection does not disconnect properly (connection loose), the
vtun server does not close the connection and thinks, the client is
still connected. With "multi" you can tell VTUN to destroy the current
session and create a new one when a client is requesting for some one.


Liebe Grüße aus Freilassing,

Michael Rack
RSM Freilassing
--
RSM Freilassing Tel.: +49 8654 607110
Nocksteinstr. 13 Fax.: +49 8654 670438
D-83395 Freilassing www.rsm-freilassing.de
Post by Christof Warlich
Hi,
I've set up vtun on a UMTS dialup connection to be able to connect to my
mobile device being behind the carrier's NAT router. Everything works
fine after system startup, but when the connection terminates
temporarily, the tunnel doesn't work any more after connection
reestablishment. It looks like vtun doesn't notice neither the
connection shutdown nor its reestablishment.
Below is my configuration on both sides. Can anyone spot what I may do
wrong?
Thanks for help,
Chris
options {
port 5000;
ifconfig /sbin/ifconfig;
route /sbin/route;
}
default {
compress no;
speed 0;
}
fritz {
passwd mypassword;
type tun;
timeout 60;
keepalive yes;
proto tcp;
persist yes;
up {
ifconfig "%% 10.0.0.2 netmask 255.255.255.0 up";
route "add 10.0.0.1 dev %%";
};
down {
ifconfig "%% down";
};
}
options {
port 5000;
ifconfig /sbin/ifconfig;
route /sbin/route;
}
default {
compress no;
speed 0;
}
fritz {
passwd mypassword;
type tun;
timeout 60;
keepalive yes;
proto tcp;
persist yes;
up {
ifconfig "%% 10.0.0.1 netmask 255.255.255.0 up";
route "add 10.0.0.2 dev %%";
};
down {
ifconfig "%% down";
};
}
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Vtun-Users mailing list
https://lists.sourceforge.net/lists/listinfo/vtun-users
Christof Warlich
2012-02-20 16:43:36 UTC
Permalink
Hi Michael,

thanks for pointing me to this configuration option; it makes sense.
But unfortunately, when I either set "multi killold" or "multi no", the
client does not connect at all! It does however connect with either
"multi yes" (default?) or without setting multi.

Vtun says it is VTun ver 3.X 01/29/2012 on the client side and
VTun ver 3.X 06/20/2011 on the server side.

Cheers,

Christof
Post by Michael Rack
Hi!
multi killold;
VTUN can only handle one connection to each host-profile.
When the connection does not disconnect properly (connection loose), the
vtun server does not close the connection and thinks, the client is
still connected. With "multi" you can tell VTUN to destroy the current
session and create a new one when a client is requesting for some one.
Liebe Grüße aus Freilassing,
Michael Rack
RSM Freilassing
bishop
2012-02-21 03:07:38 UTC
Permalink
Christof,

What happens when you initiate the connection to the server? Your
client config says
type tun;
and
ifconfig ".... netmask .."

.. which doesn't work: netmask is for ether(tap). And, also, 'type' is
ignored in the client.

So, since we have a config, let's look at the logging and behaviour. I
think we may have corrected one error only to find another. If so, it's
one less to fix ;-)

- bish
Post by Christof Warlich
Hi Michael,
thanks for pointing me to this configuration option; it makes sense.
But unfortunately, when I either set "multi killold" or "multi no", the
client does not connect at all! It does however connect with either
"multi yes" (default?) or without setting multi.
Vtun says it is VTun ver 3.X 01/29/2012 on the client side and
VTun ver 3.X 06/20/2011 on the server side.
Cheers,
Christof
Post by Michael Rack
Hi!
multi killold;
VTUN can only handle one connection to each host-profile.
When the connection does not disconnect properly (connection loose), the
vtun server does not close the connection and thinks, the client is
still connected. With "multi" you can tell VTUN to destroy the current
session and create a new one when a client is requesting for some one.
Liebe Grüße aus Freilassing,
Michael Rack
RSM Freilassing
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Vtun-Users mailing list
https://lists.sourceforge.net/lists/listinfo/vtun-users
Christof Warlich
2012-02-23 17:09:53 UTC
Permalink
Hi bish,
Post by bishop
Christof,
What happens when you initiate the connection to the server? Your
client config says
type tun;
and
ifconfig ".... netmask .."
.. which doesn't work: netmask is for ether(tap). And, also, 'type'
is ignored in the client.
I'm really confused now - to me, "ether" sounds like the barebone
ethernet below IP, while a netmask is an IP property ...
Post by bishop
So, since we have a config, let's look at the logging and behaviour.
I think we may have corrected one error only to find another. If so,
it's one less to fix ;-)
- bish
You are right, I most likely still have a configuration error, although
things do work after reboot. Unfortunately, the Vtun man pages are quite
terse, so it is difficult for a beginner to assembe a good configuration
to start with.

Like I said, I need the tunel to talk to a mobile behind the carrier's
NAT, and as I have to pay for every tranferred byte, I'd prefer a
solution with minimal traffic.

Can anyone point me to some more elaborate documentation or examples for
Vtun, or suggest a working configuration with minimal (or even no?) idle
traffic?

Thanks for helping,

Chris
bishop
2012-02-24 01:25:13 UTC
Permalink
Post by Christof Warlich
Hi bish,
Post by bishop
Christof,
What happens when you initiate the connection to the server? Your
client config says
type tun;
and
ifconfig ".... netmask .."
.. which doesn't work: netmask is for ether(tap). And, also, 'type'
is ignored in the client.
I'm really confused now - to me, "ether" sounds like the barebone
ethernet below IP, while a netmask is an IP property ...
Tunnels are not broadcast devices; they are point to point. If you
want a tap device, then you should use one; otherwise, consider
something like
ifconfig "%% 10.1.2.1 pointopoint 192.168.0.21 mtu 1450";

Don't use either endpoint's ethX interface address for this or your
route table will hate you!
Post by Christof Warlich
Post by bishop
So, since we have a config, let's look at the logging and behaviour.
I think we may have corrected one error only to find another. If so,
it's one less to fix ;-)
- bish
You are right, I most likely still have a configuration error, although
things do work after reboot.
I can't see how things are working after a reboot -- except through
short coincidence! No worries, though -- when it's fixed it'll work for
longer.

When you have your log files, cut out the relevant portions, and feel
free to drop them in my private mailbox.

- bish

Continue reading on narkive:
Loading...