Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I have a router with debian etch with dhcp server offering ips to the LAN. Also, I am doing transparent proxy with squid. I would like to know when a client is online or connected browsing the internet? I would like to generate a page with php that will list the users online along with names, ip, and mac (just like wireless routers).
I tried doing 'netstat -na | grep ESTABLISHED' but that only gives those users currently browsing doesn't show those idling.
Well once a page has loaded, the TCP connection will close, so there is no connection to inspect at that level. You could check out the cache logs using a tool like squidalzyer or sarg, that's probably a better angle, and I wouldn't pay any attention to mac stuff, far too low level to be relevant to web browsing.
Well there are products like ntop which collect statistical data from direct data flows which would probably show some of what you want, but you're never going to get data like users, which would only exist at a higher http level - your tcp connection doesn't have a user of course.
I was thinking of getting users' mac and ip addresses and compare them with a registered customers table using mysql. Another thing, do you think is easier to run a dhcp server and getting info from leased ips?
May well depend what kind of business this is, but I'd generally recommend running as much as possible on DHCP. Even servers benefit from using reserved addresses over DHCP, just as long as you have a suitably resilient infrastructure to provide it.
Note that outside of your local network you'll never get the MAC.