Re: [Freedombox-discuss] Avahi

2014-03-21 Thread Petter Reinholdtsen
[Jens Thiele]
> you can announce ssh/sftp via avahi and it will show up in f.e. nautlius
> network folder like this: (assuming there is a user fbx with its home in
> /home/fbx and the home is the place you would like to announce)

Seem like a good idea, if we are going to use avahi.  I added a few
service definitions (domain, xmpp-server, sftp-ssh) to the
freedombox-setup git repository.  Please have a look. :)

-- 
Happy hacking
Petter Reinholdtsen

___
Freedombox-discuss mailing list
Freedombox-discuss@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/freedombox-discuss


Re: [Freedombox-discuss] Avahi

2014-03-21 Thread Tim Retout
On 20 Mar 2014 14:22, "Petter Reinholdtsen"  wrote:
> These are all avahi and rsyslog related messages since the last boot.
> Do not see anything obvious there, I must admit.

For the record, I can't see anything there either.  I have seen occasional
problems in my own testing when the IP address changes, but nothing so
obvious as it just stopping to work.

I think there must be a cache of lookups to avoid flooding the network with
UDP packets - maybe if a lookup gets tried while the box is rebooting, the
wrong thing gets cached for a while? If it happens again, I would be
interested in distinguishing between the lookup failing vs.
succeeding-but-wrong-ip. You can generally work this out from "ping" output.

Meanwhile, I have been digging into issues with avahi and IPv6. Upstream
releases have slowed over the last few years. :(

I found that Windows Vista and up have LLMNR, a similar protocol, and there
are unapplied Avahi patches to add support. Older Windows support NetBIOS -
this also pretty much works out of the box if you install samba on the
freedombox, but without the ".local" extension, and it's IPv4-only. And
Linux machines need to edit nsswitch.conf if they are to look up those
names.

Still found nothing for Android yet. :(

Tim
___
Freedombox-discuss mailing list
Freedombox-discuss@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/freedombox-discuss

Re: [Freedombox-discuss] Avahi

2014-03-20 Thread Jens Thiele
Petter Reinholdtsen  writes:

> [Petter Reinholdtsen]
>> I agree that avahi/mdns would be very useful, and will change
>> freedombox-setup to pull in avahi-daemon, avahi-utils and libnss-mdns
>> on the freedombox.
>
> This is now in place, and freshly built images (or upgraded images)
> will get avahi-daemon installed by default.

didn't look at the current code and don't know if the freedom box does
run sshd at all - but anyway:

you can announce ssh/sftp via avahi and it will show up in f.e. nautlius
network folder like this: (assuming there is a user fbx with its home in
/home/fbx and the home is the place you would like to announce)

# announce sftp via avahi (for simple access via gnome/nautilus)
# see also:
# http://wiki.xbmc.org/index.php?title=Avahi_Zeroconf
cat <<"EOF" > etc/avahi/services/sftp-ssh.service




  %h

  
_sftp-ssh._tcp
22
path=/home/fbx
u=fbx
  



EOF

___
Freedombox-discuss mailing list
Freedombox-discuss@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/freedombox-discuss


Re: [Freedombox-discuss] Avahi

2014-03-20 Thread Jens Thiele
Petter Reinholdtsen  writes:

> And this work for a while, when using a virtual machine on my wheezy
> laptop.  But just a few minutes after the freedombox was booted (or
> avahi-daemon restarted), the freedombox.local mDNS name is no longer
> known.  Anyone know what is going on here?

likely not the case here but i see this with wireless interfaces and
enabled power saving

___
Freedombox-discuss mailing list
Freedombox-discuss@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/freedombox-discuss


Re: [Freedombox-discuss] Avahi

2014-03-20 Thread Petter Reinholdtsen
[Tim Retout]
> Hm, your client machine needs libnss-mdns, and avahi-daemon needs to
> be running on the freedombox...

This is all in place already.

> if the daemon stops responding, the address will no longer work. It
> would be worth checking the logs, perhaps?

These are all avahi and rsyslog related messages since the last boot.
Do not see anything obvious there, I must admit.

Mar 20 10:12:19 freedombox rsyslogd: [origin software="rsyslogd" 
swVersion="7.4.8" x-pid="1393" x-info="http://www.rsyslog.com";] start
Mar 20 10:12:19 freedombox avahi-daemon[1510]: Found user 'avahi' (UID 102) and 
group 'avahi' (GID 105).
Mar 20 10:12:19 freedombox avahi-daemon[1510]: Successfully dropped root 
privileges.
Mar 20 10:12:19 freedombox avahi-daemon[1510]: avahi-daemon 0.6.31 starting up.
Mar 20 10:12:19 freedombox avahi-daemon[1510]: Successfully called chroot().
Mar 20 10:12:19 freedombox avahi-daemon[1510]: Successfully dropped remaining 
capabilities.
Mar 20 10:12:19 freedombox avahi-daemon[1510]: No service file found in 
/etc/avahi/services.
Mar 20 10:12:19 freedombox avahi-daemon[1510]: Joining mDNS multicast group on 
interface eth0.IPv6 with address fe80::5054:ff:fe0e:ac2f.
Mar 20 10:12:19 freedombox avahi-daemon[1510]: New relevant interface eth0.IPv6 
for mDNS.
Mar 20 10:12:19 freedombox avahi-daemon[1510]: Joining mDNS multicast group on 
interface eth0.IPv4 with address 192.168.122.215.
Mar 20 10:12:19 freedombox avahi-daemon[1510]: New relevant interface eth0.IPv4 
for mDNS.
Mar 20 10:12:19 freedombox avahi-daemon[1510]: Network interface enumeration 
completed.
Mar 20 10:12:19 freedombox avahi-daemon[1510]: Registering new address record 
for fe80::5054:ff:fe0e:ac2f on eth0.*.
Mar 20 10:12:19 freedombox avahi-daemon[1510]: Registering new address record 
for 192.168.122.215 on eth0.IPv4.
Mar 20 10:12:19 freedombox avahi-daemon[1510]: Registering HINFO record with 
values 'I686'/'LINUX'.
Mar 20 10:12:20 freedombox avahi-daemon[1510]: Server startup complete. Host 
name is freedombox.local. Local service cookie is 4070818272.
Mar 20 10:35:06 freedombox avahi-daemon[1510]: Got SIGTERM, quitting.
Mar 20 10:35:06 freedombox avahi-daemon[1510]: Leaving mDNS multicast group on 
interface eth0.IPv6 with address fe80::5054:ff:fe0e:ac2f.
Mar 20 10:35:06 freedombox avahi-daemon[1510]: Leaving mDNS multicast group on 
interface eth0.IPv4 with address 192.168.122.215.
Mar 20 10:35:06 freedombox avahi-daemon[1510]: avahi-daemon 0.6.31 exiting.
Mar 20 10:35:06 freedombox avahi-daemon[2078]: Found user 'avahi' (UID 102) and 
group 'avahi' (GID 105).
Mar 20 10:35:06 freedombox avahi-daemon[2078]: Successfully dropped root 
privileges.
Mar 20 10:35:06 freedombox avahi-daemon[2078]: avahi-daemon 0.6.31 starting up.
Mar 20 10:35:06 freedombox avahi-daemon[2078]: Successfully called chroot().
Mar 20 10:35:06 freedombox avahi-daemon[2078]: Successfully dropped remaining 
capabilities.
Mar 20 10:35:06 freedombox avahi-daemon[2078]: No service file found in 
/etc/avahi/services.
Mar 20 10:35:06 freedombox avahi-daemon[2078]: Joining mDNS multicast group on 
interface eth0.IPv6 with address fe80::5054:ff:fe0e:ac2f.
Mar 20 10:35:06 freedombox avahi-daemon[2078]: New relevant interface eth0.IPv6 
for mDNS.
Mar 20 10:35:06 freedombox avahi-daemon[2078]: Joining mDNS multicast group on 
interface eth0.IPv4 with address 192.168.122.215.
Mar 20 10:35:06 freedombox avahi-daemon[2078]: New relevant interface eth0.IPv4 
for mDNS.
Mar 20 10:35:06 freedombox avahi-daemon[2078]: Network interface enumeration 
completed.
Mar 20 10:35:06 freedombox avahi-daemon[2078]: Registering new address record 
for fe80::5054:ff:fe0e:ac2f on eth0.*.
Mar 20 10:35:06 freedombox avahi-daemon[2078]: Registering new address record 
for 192.168.122.215 on eth0.IPv4.
Mar 20 10:35:06 freedombox avahi-daemon[2078]: Registering HINFO record with 
values 'I686'/'LINUX'.
Mar 20 10:35:07 freedombox avahi-daemon[2078]: Server startup complete. Host 
name is freedombox.local. Local service cookie is 369024271.
root@freedombox:~#

> Hope that helps,

Absolutely. :)

-- 
Happy hacking
PEtter Reinholdtsen

___
Freedombox-discuss mailing list
Freedombox-discuss@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/freedombox-discuss


Re: [Freedombox-discuss] Avahi

2014-03-20 Thread Tim Retout
On 20 Mar 2014 10:36, "Petter Reinholdtsen"  wrote:
>
> [Petter Reinholdtsen]
> > I agree that avahi/mdns would be very useful, and will change
> > freedombox-setup to pull in avahi-daemon, avahi-utils and libnss-mdns
> > on the freedombox.
>
> This is now in place, and freshly built images (or upgraded images)
> will get avahi-daemon installed by default.
>
> > With this in place, visiting http://freedombox.local/ > gave me
> > the jwchat web interface. :)
>
> And this work for a while, when using a virtual machine on my wheezy
> laptop.  But just a few minutes after the freedombox was booted (or
> avahi-daemon restarted), the freedombox.local mDNS name is no longer
> known.  Anyone know what is going on here?

Hm, your client machine needs libnss-mdns, and avahi-daemon needs to be
running on the freedombox... if the daemon stops responding, the address
will no longer work. It would be worth checking the logs, perhaps?

> > Is Bonjour in Debian?  Is it the same as zeroconf?
>
> Still wonder about this one. :)

"Bonjour" is the brand name of the Apple library that implements the two
standards mDNS and DNS-SD, which together are two-thirds of "Zeroconf"
networking. Bonjour is shipped out of the box on OS X (and I believe iOS),
and is bundled with iTunes on Windows. The equivalent client library in
Debian is libnss-mdns, which is a dependency of the main desktop
environments (I think).

https://en.m.wikipedia.org/wiki/Zero_configuration_networking

So I was raising the point that not all Windows desktops will be able to
find .local addresses without installing Bonjour, which might be important.
On mobiles, iPhones should work, but I have not found a solution for
Android (unless you build your own app).

This sucks, but it is still the most user-friendly way I have yet found for
getting people onto the web interface when you don't know the IP address of
the box. I want to look more into the Microsoft upnp protocols to see if
there's something that works for Windows. And I think Android support is
quite important given the way things are going. But Mac and Linux users are
sorted. :)

Hope that helps,

Tim
___
Freedombox-discuss mailing list
Freedombox-discuss@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/freedombox-discuss

Re: [Freedombox-discuss] Avahi

2014-03-20 Thread Petter Reinholdtsen
[Petter Reinholdtsen]
> I agree that avahi/mdns would be very useful, and will change
> freedombox-setup to pull in avahi-daemon, avahi-utils and libnss-mdns
> on the freedombox.

This is now in place, and freshly built images (or upgraded images)
will get avahi-daemon installed by default.

> With this in place, visiting http://freedombox.local/ > gave me
> the jwchat web interface. :)

And this work for a while, when using a virtual machine on my wheezy
laptop.  But just a few minutes after the freedombox was booted (or
avahi-daemon restarted), the freedombox.local mDNS name is no longer
known.  Anyone know what is going on here?

> Is Bonjour in Debian?  Is it the same as zeroconf?

Still wonder about this one. :)

-- 
Happy hacking
Petter Reinholdtsen

___
Freedombox-discuss mailing list
Freedombox-discuss@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/freedombox-discuss


Re: [Freedombox-discuss] Avahi

2014-03-19 Thread Petter Reinholdtsen
[Anders Jackson]
>> I've not looked into what's going on with jwchat, but I've been looking
>> at mDNS for the last couple of days, and I think it could be really useful
>> for avoiding modification of the user's hosts file.
> 
> I would expect this behaviour as this is probably a virtual Web
> server in apache (or any webbserver) configured just for jwchat.
> If you check http at Wikipedia you'll see that the client sends the
> wanted server name as parameter "host: " in the GET request to the
> Web server.  This is used to select the right Web server.  The
> solution with mDns is probably the most useful one, and not only for
> this.

I agree that avahi/mdns would be very useful, and will change
freedombox-setup to pull in avahi-daemon, avahi-utils and libnss-mdns
on the freedombox.

With this in place, visiting http://freedombox.local/ > gave me
the jwchat web interface. :)

>> Windows support needs more to get going - you can install Bonjour,
>> which is Apache-licensed.

Is Bonjour in Debian?  Is it the same as zeroconf?

-- 
Happy hacking
Petter Reinholdtsen

___
Freedombox-discuss mailing list
Freedombox-discuss@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/freedombox-discuss


Re: [Freedombox-discuss] Avahi (was: Re: How to use JWChat on the freedombox?)

2014-03-18 Thread Anders Jackson
Den 18 mar 2014 19:32 skrev "Tim Retout" :
>
> On 17 Mar 2014 22:06, "Petter Reinholdtsen"  wrote:
> >
> >
> > [Alberto Fuentes]
> > > echo "fb ip" fbx >>/etc/hosts
> > >
> > > then navigate to fbx
> >
> > You are right.  This actually work.  When I visit
> > http:// > I add fbx to /etc/hosts on my local machine and then access http://fbx/,
> > I get JWChat.
> >
> > This do not seem like a good idea.  I expected both URLs to work the
> > same.  Is there something we could change to get that behaviour?
>
> I've not looked into what's going on with jwchat, but I've been looking
at mDNS for the last couple of days, and I think it could be really useful
for avoiding modification of the user's hosts file.

I would expect this behaviour as this is probably a virtual Web server in
apache (or any webbserver) configured just for jwchat.
If you check http at Wikipedia you'll see that the client sends the wanted
server name as parameter "host: " in the GET request to the Web server.
This is used to select the right Web server.  The solution with mDns is
probably the most useful one, and not only for this.

> In short:
>
> - set up the freedombox's hostname as normal
> - install avahi-daemon on it
> - point your desktop system (with libnss-mdns installed) at
http://fbx.local/ or similar.

Yes, this is what I would do for an easy installation without the need to
configure the local name server in the LAN(in the home router). The DHCP
client in the freedombox should also publish its preferred name and then
the LAN router usually uses that in all name resolutions in the LAN too.
But if not, mDns is also used.

> Windows support needs more to get going - you can install Bonjour, which
is Apache-licensed.
>
> Tim

/Anders
___
Freedombox-discuss mailing list
Freedombox-discuss@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/freedombox-discuss