LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-29-2012, 07:10 PM   #1
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: Austin, TX
Distribution: Mint-17.1 with Cinnamon & KDE
Posts: 1,492
Blog Entries: 3

Rep: Reputation: 96
how to configure AVAHI to share disk access between linux boxes


Can someone help me sort out how to deploy an actual use for AVAHI on Linux? Specifically, Ubuntu v10.04, 11.04, 11.10 and Mint-11 or Mint-12 variants of linux.

I have a family of linux workstation around my home. Many of them go walk-about routinely. When two or more of them are on the same LAN (usually wifi) I want them to be able to find each other with AVAHI and securely access shared resources.

With AVAHI, every workstation gets an mDNS-name of the form {hostname}.local (NOTE -- I'd prefer to use something other than "local" but that is my paranoia showing and I'll leave that for Phase-II.)
Therefore, after boot and some time for stabilization, a per-workstation script could simply try to mount a remote SSH-file-system using those names.

Instead of polling, a different per-workstation script might use avahi-browse to find all available "Workstation" resources.
Code:
prompt$ avahi-browse --all --terminate

+ wlan0 IPv4 desktopcouch 7efc96ac-a2bf-4aae-8904-5dca5a555771 _couchdb_location._tcp local
+ wlan0 IPv4 mumbles [XX:XX:XX:XX:XX:XX]                   Workstation          local
+ wlan0 IPv4 Officejet Pro 8500 A909n [278C83]             UNIX Printer         local
+ wlan0 IPv4 Officejet Pro 8500 A909n [278C83]             PDL Printer          local
+ wlan0 IPv4 Officejet Pro 8500 A909n [278C83]             Web Site             local
+ wlan0 IPv4 Officejet Pro 8500 A909n [278C83]             _scanner._tcp        local
+ wlan0 IPv4 pruneface [XX:XX:XX:XX:XX:XX]                   Workstation          local
...
+ wlan0 IPv4 scarface [XX:XX:XX:XX:XX:XX]                   Workstation          local
...
+ wlan0 IPv4 barney [XX:XX:XX:XX:XX:XX]                   Workstation          local
...
+ wlan0 IPv4 wilma [XX:XX:XX:XX:XX:XX]                   Workstation          local
prompt$
grep and sed and awk or one of the shells makes quick work to turn this output into a list of workstation names and a for-loop does the rest. NOTE -- Any MAC or iPAD will answer up, too, because AVAHI is an implementation of Apple's ZeroConf or Rendezvous utilities.

For resources, lets start with using SSH File System. It is secure enough for a public hotspot and the shared folder tree can be limited easily.

Now comes the sticky part, avahi can be told if there is an SSH-FS resource available at a workstation. Yeah, okay, more scripting to parse out the only those workstations that offer SSH-FS.

Has this already been done or am I inventing something here?

Thanks in advance,
~~~ 8d;-/ Dan
 
Old 01-30-2012, 08:53 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,332
Blog Entries: 55

Rep: Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533
Quote:
Originally Posted by SaintDanBert View Post
Has this already been done or am I inventing something here?
Promoting services is done by dropping a {protocol}.service XML file in /etc/avahi/services and restarting the daemon. See 'man 5 avahi.service' and examples here, here and here.
 
1 members found this post helpful.
Old 02-06-2012, 02:31 PM   #3
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: Austin, TX
Distribution: Mint-17.1 with Cinnamon & KDE
Posts: 1,492
Blog Entries: 3

Original Poster
Rep: Reputation: 96
Thanks for the recommended reading...
... I found lots of similar material all with smatters of more or different details.

What I have yet to find, it a description of consumption (er, connection) of published services. For example, host-A promotes an available shared folder -- either NFS or SAMBA or SSHFS or similar -- and host-B now sees that service and wants to make use of it. Lots of prose about configuring host-A. Very little about configuring host-B.

Does anyone know of good examples for (a) seeing that an AVAHI service exists, then (b) connecting and making use of that service?

Cheers,
~~~ 0;-Dan
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
share folders in LAN with only Linux boxes gorade Linux - Newbie 25 01-30-2012 05:50 PM
how to configure nfs mount disk to samba share for windows client harun7862003 Linux - Networking 2 11-09-2010 04:11 AM
LXer: NoMachine NX 3.0 improves remote access to Linux boxes LXer Syndicated Linux News 0 07-11-2007 10:01 PM
how to share linux files on LAN btwn other linux boxes shakeeb Linux - Networking 9 02-04-2004 03:10 PM
WinXP boxes can't access Linux edawad Linux - Networking 3 01-13-2004 03:32 PM


All times are GMT -5. The time now is 11:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration