Koozali.org: home of the SME Server

list all dynamic ips

sage

list all dynamic ips
« on: November 08, 2001, 10:28:23 PM »
2 questions

1) is there a way to list the ipaddress and machine names of all boxes connected to my server?

2) my external ip address is dynamic.  How can I see what DNS i was assigned.

Sage

Rich Lafferty

Re: list all dynamic ips
« Reply #1 on: November 08, 2001, 11:17:27 PM »
1) At the command line, use 'netstat -t'.

2) Also at the command line, use 'ifconfig' and figure out
which interface it is by process of elimination. If you know the
name of the interface your external address is on (eth1, maybe, or ppp0), you can do "ifconfig eth1" or "ifconfig ppp0". In
either case, the address is listed after "inet addr:".

Hope this helps,

  -Rich

sage

Re: list all dynamic ips
« Reply #2 on: November 09, 2001, 01:31:09 AM »
thanks for part 1.  For part 2 i want to know what the DNS addresses are that my server is connecting to to reslove names.

ie
nslookup yahoo.com

returns

server: localhost
Address:127.0.0.1

Name yahoo.com
addresses xxx.xxx.xxx.xxx
I want to know what the DNS is that my provider is giving me along with the ip.

sage

Rich Lafferty

Re: list all dynamic ips
« Reply #3 on: November 09, 2001, 01:32:47 AM »
I don't understand your question. Your Internet provider isn't
doing DNS lookups for you; the DNS server is on the SME Server
itself.

  -Rich

sage

Re: list all dynamic ips
« Reply #4 on: November 09, 2001, 01:37:59 AM »
I just tried the netstat as well.  That will tell what is currently connected using tcp connection but I want to know what addresses were given out by the dhcp server to my local machines and the machine name associated with them.  Before I had e-smith I was using a linksys router which would give a list of the machines and their ipaddress.  I am looking for that.

Rich Lafferty

Re: list all dynamic ips
« Reply #5 on: November 09, 2001, 01:49:26 AM »
Ah, sorry, you'd asked for the names of the machines connected
to the server, which isn't necessarily the same as those that
the server has given addresses out to over DHCP.

The current DHCP leases are listed in /var/lib/dhcp/dhcpd.leases.

Patrick Basile

Re: list all dynamic ips
« Reply #6 on: November 09, 2001, 04:51:57 AM »
Not that it was asked for - but I'm going to chime in here as well.  :)  I know maybe this should be posted on the wish list phorum.

I also was trying to figure this out (a few weeks back or so), and was also given the pointer to /var/lib/dhcp/dhcpd.leases, which is great.  BUT how difficult would it be to create a panel in the server manager that showed current DHCP info?  I'm not a programmer, so please don't flame me if this is a ridiculous question.

I'm just curious - it sure would be a nice "added" admin feature. (And.....M$FT NT/2k have this built into the DHCP manager.....so we wouldn't want the Windoze folks to be able to point fingers and say....."See, you can't do this with that Linux box!")

(BTW - I'm a Windoze guy by "trade" - although I'm being drawn back from "the dark side" by this fantastic Linux distro.)

Any thoughts/ideas/comments?

Regards,
Patrick

sage

Re: list all dynamic ips
« Reply #7 on: November 09, 2001, 07:21:11 PM »
lanlord on sourceforge does this.  it is a cgi script you put in your cgi-bin directory

Sage