# Listing of hosts in a LAN or domain name group?

**URL:** <https://www.ruby-forum.com/t/listing-of-hosts-in-a-lan-or-domain-name-group/107390>\
**Category:** Ruby\
**Created:** [June 21, 2007, 6:57am UTC](https://www.ruby-forum.com/t/listing-of-hosts-in-a-lan-or-domain-name-group/107390 "2007-06-21T06:57:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gga](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b487fb/32.png) [@gga](https://www.ruby-forum.com/u/gga)\
**Post date:** [June 21, 2007, 6:57am UTC](https://www.ruby-forum.com/t/listing-of-hosts-in-a-lan-or-domain-name-group/107390/1 "2007-06-21T06:57:19Z")

</div>

What’s the preferred ruby way of listing hosts in a LAN or within a  
domain group?

In particular, I am interested in 4 things:

- Listing all connected hosts in a LAN / domain group (assuming  
there could be some hosts  
that appear and disappear, like wifi hosts – ie. not just /etc/  
hosts ).
- Listing all hosts with a particular condition (say, allowing  
authenticated ssh connections).
- Avoiding any hosts that are not in a trusted group (say,  
iptables).
- Doing it fast.

I’m interested in Linux, mainly, but if the solution is multiplatform,  
the better.
