hi there i started using tinc a few month ago after i got tired of openvpn. everythings runs fine now. the meshrouting stuff is wonderfull for layily people like me ;) now i came to an point i got stuck. when i swtich to loglevel 5 i see lines like Node storemuc (84.153.6.9 port 655) became reachable hey - cool, every node has the ip-address if every other node. so i added a hostfile of 2 dynamic-ip clients, left out the Address-entry and added a a connectTo line in tinc.conf but ... No address specified for storemuc now, is it possible to connect dynamic clients? the ip-address is known, i see it in the debug-log. if not, whishlist ... pahaps Address=? or somethink like that, so the tinc can use the real-ip it got from other nodes?
You should not add a ConnectTo line on the server (static IP), only add it on the client system (dynamic IP). Ivo ----- Original Message ----- From: "lizard" <lizard op furcon.de> To: <tinc op tinc-vpn.org> Sent: Saturday, March 21, 2009 4:05 PM Subject: dynamic-ip clients?> hi there > i started using tinc a few month ago after i got tired of openvpn. > everythings runs fine now. the meshrouting stuff is wonderfull for > layily people like me ;) > now i came to an point i got stuck. > when i swtich to loglevel 5 i see lines like > > Node storemuc (84.153.6.9 port 655) became reachable > > hey - cool, every node has the ip-address if every other node. > so i added a hostfile of 2 dynamic-ip clients, left out the > Address-entry and added a a connectTo line in tinc.conf > but ... > > No address specified for storemuc > > now, is it possible to connect dynamic clients? the ip-address is known, > i see it in the debug-log. if not, whishlist ... pahaps Address=? or > somethink like that, so the tinc can use the real-ip it got from other > nodes? > > _______________________________________________ > tinc mailing list > tinc op tinc-vpn.org > http://www.tinc-vpn.org/cgi-bin/mailman/listinfo/tinc
no no ... client1 <---> server <---> client2 client[12] are dynamic, server is static i want to connect client1 to client2 so i can switchoff the serve without affacting the rest of the vpn. On Sat, 2009-03-21 at 18:55 +0100, Ivo Smits wrote:> You should not add a ConnectTo line on the server (static IP), only add it > on the client system (dynamic IP).
I would suggest then a static domain name that will follow your dynamic IP. dyndns.org is one free provider of that service On Sat, Mar 21, 2009 at 6:55 PM, lizard <lizard at furcon.de> wrote:> no no ... > client1 <---> server <---> client2 > > client[12] are dynamic, server is static > i want to connect client1 to client2 so i can switchoff the serve > without affacting the rest of the vpn. > > On Sat, 2009-03-21 at 18:55 +0100, Ivo Smits wrote: > > You should not add a ConnectTo line on the server (static IP), only add > it > > on the client system (dynamic IP). > > > _______________________________________________ > tinc mailing list > tinc at tinc-vpn.org > http://www.tinc-vpn.org/cgi-bin/mailman/listinfo/tinc >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.tinc-vpn.org/pipermail/tinc/attachments/20090321/ee63da5e/attachment.htm
On Sat, Mar 21, 2009 at 04:05:28PM +0100, lizard wrote:> hey - cool, every node has the ip-address if every other node. > so i added a hostfile of 2 dynamic-ip clients, left out the > Address-entry and added a a connectTo line in tinc.conf > but ... > > No address specified for storemuc > > now, is it possible to connect dynamic clients? the ip-address is known, > i see it in the debug-log. if not, whishlist ... pahaps Address=? or > somethink like that, so the tinc can use the real-ip it got from other > nodes?Well, you could create a host-up script (in the same directory as the tinc-up script) containing the following: #!/bin/sh file=/etc/tinc/$NETNAME/hosts/$NODE grep -Fq "Address = $REMOTEADDRESS" $file && exit 0 echo "Address = $REMOTEADDRESS" >> $file If a node becomes reachable, this script will check if the address which that node currently has is already in the host config file, if not it will add it. -- Met vriendelijke groet / with kind regards, Guus Sliepen <guus at tinc-vpn.org> -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: Digital signature Url : http://www.tinc-vpn.org/pipermail/tinc/attachments/20090322/a72389db/attachment.pgp
NICE HACK! completed the script so only the last ip is in config thanks! #!/bin/sh file=/etc/tinc/$NETNAME/hosts/$NODE echo $file grep -Fq "#dynamic" $file || exit 0 grep -Fq "Address = $REMOTEADDRESS" $file && exit 0 grep -Fv "#dynamic" $file > $file.new echo "Address = $REMOTEADDR On Sun, 2009-03-22 at 21:07 +0100, Guus Sliepen wrote:> Well, you could create a host-up script (in the same directory as the tinc-up > script) containing the following:[...]
erf - again, this time with complete paste :) #!/bin/sh file=/etc/tinc/$NETNAME/hosts/$NODE echo $file grep -Fq "#dynamic" $file || exit 0 grep -Fq "Address = $REMOTEADDRESS" $file && exit 0 grep -Fv "#dynamic" $file > $file.new echo "Address = $REMOTEADDRESS #dynamic" >> $file.new mv $file.new $file lizard wrote:> NICE HACK! > completed the script so only the last ip is in config > thanks!
On Mon, Mar 23, 2009 at 12:05:07PM +0100, lizard wrote:> erf - again, this time with complete paste :) > > #!/bin/sh > file=/etc/tinc/$NETNAME/hosts/$NODE > echo $file > grep -Fq "#dynamic" $file || exit 0 > grep -Fq "Address = $REMOTEADDRESS" $file && exit 0 > grep -Fv "#dynamic" $file > $file.new > echo "Address = $REMOTEADDRESS #dynamic" >> $file.new > mv $file.new $fileComments can only start at the beginning of a line, so putting #dynamic at the end of the line might not work. You can vary whitespace if you want to distinguish between manual and dynamic Addresses. To top you, the following script that remembers the last 3 dynamic addresses and does not overwrite the host config file when something goes wrong: #!/bin/sh file=/etc/tinc/$NETNAME/hosts/$NODE grep -Fq "Address = $REMOTEADDRESS" $file && exit 0 grep -Fv "Address = " $file > $file.new &&\ echo "Address = $REMOTEADDRESS" >> $file.new &&\ grep -Fm 2 "Address = " $file >> $file.new &&\ mv $file.new $file -- Met vriendelijke groet / with kind regards, Guus Sliepen <guus at tinc-vpn.org> -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: Digital signature Url : http://www.tinc-vpn.org/pipermail/tinc/attachments/20090323/abde2079/attachment.pgp