Oh, I just hit reply and completely ignored the missing tahoe-dev list address, 
sorry for that. New attemp...

Regards,
Anders



Vidarebefordrat brev:

> Från: Anders Genell <anders.gen...@gmail.com>
> Datum: 17 juli 2013 18:11:56 CEST
> Till: Daira Hopwood <davidsa...@leastauthority.com>
> Ämne: Re: [tahoe-dev] Friendnet tub.location and tub.port
> 
> Ok, here goes. Avert you eyes or look through a mirror if you don't want to 
> turn to stone...
> 
> 
> #!/bin/sh
> #ip_update.sh
> #tahoe.conf IP update
> 
> tahoe_bin=/opt/allmydata-tahoe-1.10.0/bin/tahoe
> tahoe_path=/mnt/tahoe/tahoe-daemon/.tahoe
> tahoe_conf=$tahoe_path/tahoe.cfg
> ipupdate_log=$tahoe_path/logs/ip_update.log
> 
> my_ip=`wget -O - http://ipecho.net/plain`
> tahoe_ip=`grep tub.location $tahoe_conf | cut -f2 -d= | cut -f1 -d:`
> 
> if [ "$my_ip" != "" ] ; then
>  if [ "$my_ip" != "$tahoe_ip" ] ; then
>  ( echo ",s/$tahoe_ip/$my_ip/g" && echo w ) | ed - $tahoe_conf
>  echo `date` "$tahoe_conf updated with $my_ip IP address" >> $ipupdate_log
>  su - tahoe-daemon -c ''$tahoe_bin' restart '$tahoe_path/''
>  fi
> fi
> 
> 
> 
> 
> We rely on one singe external ip lookup site, but I suppose more could be 
> added and compared...
> 
> Regards,
> Anders
> 
> 
> 17 jul 2013 kl. 16:27 skrev Daira Hopwood <davidsa...@leastauthority.com>:
> 
>> On 12/07/13 10:48, Anders Genell wrote:
>>> Dear list!
>>> 
>>> I posted a related question recently and got som useful answers, but I am 
>>> still somewhat confused as to what is required concerning incoming wan 
>>> access for friendnet nodes. 
>>> 
>>> Our original idea was to just set tub.port on all nodes and make sure that 
>>> port was forwarded through any routers/firewalls along the way. We would 
>>> then expect the introducer to detect the IPs of incoming connections from 
>>> nodes and announce each node with that IP combined with the corresponding 
>>> port number, as set in each node's tub.port. It would however seem like we 
>>> actually need to specifically set the tub.location IP address of each node 
>>> for the nodes to "see" eachother. Without it all nodes see the introducer, 
>>> and the introducer sees all nodes but the nodes don't see eachother. 
>>> 
>>> There have been suggestions here to let the introducer(s) handle IPs, and 
>>> if I understand correctly that would work in more or less the way we 
>>> assumed it already did?
>>> 
>>> Right now we have uglyhacked a script to update the tahoe.cfg file and 
>>> restart the node whenever the IP changes, by regularly checking e.g. 
>>> myexternalip.com. Most nodes will run on Raspberry Pi hardware so a bash 
>>> script is sufficient, but a bit of python should make it more platform 
>>> independent, I suppose. 
>>> 
>>> My question is, should we need to set both tub.location and tub.port?
>>> Should we need to uglyhack to update IP alternatively use som dyndns 
>>> equivalent?
>>> The introducer detects incoming IPs anyway, couldn't that be reported back 
>>> to the node?
>> 
>> Can you post the uglyhack script so that we can see precisely what it does,
>> and whether it would be worth Tahoe-LAFS doing something equivalent
>> automatically?
>> 
>> Yes, the introducer could report IPs back to the node; that is
>> https://tahoe-lafs.org/trac/tahoe-lafs/ticket/50 .
>> 
>> -- 
>> Daira Hopwood ⚥
>> 
_______________________________________________
tahoe-dev mailing list
tahoe-dev@tahoe-lafs.org
https://tahoe-lafs.org/cgi-bin/mailman/listinfo/tahoe-dev

Reply via email to