NYCPHP Meetup

NYPHP.org

[nycphp-talk] Is PHP a good choice for automating network monitoring?

Joel De Gan joel at tagword.com
Tue Sep 14 10:56:19 EDT 2004


See links at bottom for areas marked with (*) etc..

You could pretty easy write something like this to connect to a php
webpage that just logs the ip if that is what you are looking for(?)..

If you need to configure a router automatically, look at the program
called "expect"(*).. It ships with a handy utility called
"autoexpect"(**) that you can run to capture a session, though the file
usually needs a little bit of editing.

If you have good trust relationships (and hosts.deny/host.allow) set up.
You can look at doing no-username/pass ssh. You can do that by creating
a id_dsa.pub (poke around in ssh-keygen) and then place them in a file
on the host your want to connect to called ~/.ssh/authorized_keys2 (the
key starts with ssh-dss and the user is the same as you will connect
with) authorized_keys will also need the contents of your identity.pub.
This just make shell scripts act like they are working on your local
machine it also makes doing sweeping changes across a trust-network a
breeze. (*ssh*)

-joeldg

*) http://expect.nist.gov/
**) http://expect.nist.gov/example/autoexpect.man.html
*ssh*)
http://oceanpark.com/notes/howto_ssh_keychain_public_key_authentication_forwarding.html
http://www.hackinglinuxexposed.com/articles/20021226.html


On Tue, 2004-09-14 at 04:23, Daniel Krook wrote:
> > I'm savvy enough to configure
> > an SSH server on the machine locally and configure the router over
> > there to let requests from the Internet through, but I obviously can't
> > figure out where that computer is unless I call my parents and direct
> > her to whatismyip.com.
> 
> 
> Meitar,
> 
> Is there any reason that you're not considering a free dynamic DNS 
> provider such as noip.com or dyndns.com for this task?
> 
> You can get a "static" hostname that is always tied to your dynamic IP 
> with these services.  In essence, they provide you with a downloadable 
> client that regularly pings their servers to check in with your current IP 
> address.  For an annual fee, you can tie one of your own registered 
> domains to their nameservers as well.
> 
> It seems worth checking out before writing a PHP client to do something 
> similar.
> 
> 
> 
> 
> 
> Daniel Krook, Application Developer
> WW Web Production Services North 2, ibm.com
> 1133 Westchester Avenue, White Plains, NY 10604
> 
> Personal: http://info.krook.org/
> Persona: http://w3.ibm.com/eworkplace/persona_bp_finder.jsp?CNUM=9A9796897
> 
> 
> _______________________________________________
> New York PHP Talk
> Supporting AMP Technology (Apache/MySQL/PHP)
> http://lists.nyphp.org/mailman/listinfo/talk
> http://www.newyorkphp.org
> 
-- 
joeldg - developer, Intercosmos media group.
http://lucifer.intercosmos.net




More information about the talk mailing list