Can I use it to FIX my internet connection?

Guus Sliepen guus at tinc-vpn.org
Sun Feb 19 11:01:05 CET 2012


On Sat, Feb 18, 2012 at 10:18:16AM -0500, Donald Pearson wrote:

> Oh I never meant for the script to retrieve that information.  That's
> something you look up first and define directly in the script.

True, but in the future I might want to add some pre-canned tinc-up/down
scripts to tinc that do this without the user having to edit them first.

> But I did find this with some googling.
> 
> @For /f "tokens=3" %%* in (
> 'route.exe print ^|findstr "\<0.0.0.0\>"'
> ) Do @Set "DefaultGateway=%%*"
> 
> You can then call %DefaultGateway%.

Oh, that's great, thanks!

> So the only other piece you would need for this to be more universal is a
> way to determine what the remote Tinc server's WAN IP is.  You could
> possibly write something that would read the hostfile, in which case you
> would execute this script with a hostfile input, do something similar to
> the snippet above to extract the remote hostname or IP and set that to
> maybe RemoteTinc.  Or maybe there's a more direct way in tinc-up?
> 
> So..    route ADD %RemoteTinc% MASK 255.255.255.255 %DefaultGateway%

Tinc does know the remote node's WAN IP, and this is already exposed as
%REMOTEADDRESS%.

-- 
Met vriendelijke groet / with kind regards,
     Guus Sliepen <guus at tinc-vpn.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://www.tinc-vpn.org/pipermail/tinc/attachments/20120219/007fd8ad/attachment.pgp>


More information about the tinc mailing list