Frequently changing IP addresses

Guus Sliepen guus at tinc-vpn.org
Sat May 8 16:47:39 CEST 2010


On Fri, May 07, 2010 at 10:45:45PM +0100, Stewart Watson wrote:

> I am a user of openVPN and am keen to explore tinc to help with a specific
> problem.
> 
> My example - I have 10 computers all connected to internet via mobile
> broadband and public apns. all wan ip addresses are dynamic and change often
> - there is no machine or point with a static ip. I am not allowed to use any
> third party services like dyndns. I want each computer to continue to be
> able to talk to the other even if they go down one by one. 
> 
> is this even possible and can tinc help maintain connectivity over networks
> where ip addresses are constantly changing, without any static point(s)?

Yes, as long as it never happens that all nodes are offline or all nodes get a
new IP address at the same moment.

1. Ensure all nodes have each other's host config files with their public keys.
2. In each host's tinc.conf file, ConnectTo all other nodes.
3. Copy the attached host-up file to the same directory as the tinc.conf file,
   and ensure it is executable.

The attached host-up script will update the host config files when other hosts
change their addresses. It keeps the last three known addresses around. You can
also add your own Address statement which will not get erased or modified, it
distinguishes the automatically added Address statements by the two spaces
before and after the = sign.

I hope this will do what you want. I plan to make this functionality part of
tinc itself, but that might take some time.

-- 
Met vriendelijke groet / with kind regards,
     Guus Sliepen <guus at tinc-vpn.org>
-------------- next part --------------
#!/bin/sh

FILE=/etc/tinc/$NETNAME/hosts/$NODE
TMP=$FILE.tmp

[ -f $FILE ] || exit 0
fgrep -q "Address  =  $REMOTEADDRESS" $FILE && exit 0

fgrep -v "Address  =  " $FILE >$TMP
echo "Address  =  $REMOTEADDRESS" >>$TMP
fgrep "Address  =  " $FILE | head -2 >>$TMP
mv $TMP $FILE
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://www.tinc-vpn.org/pipermail/tinc/attachments/20100508/928168d2/attachment.pgp>


More information about the tinc mailing list