Posted by: Anonymous Coward
on March 11, 2006 09:44 PM
The curl trick is useful. However, I find that often what Dyndns.org thinks my router's ip is isn't what it actually is and if I'm trying to get into my network from outside, myhost.dyndns.org is the wrong ip. Therefore, I use the following wget command to query my router (Linksys) status from inside my network and mail it to a host outside my network.
The full script to do this uses awk to get the ip address from the returned html data, add the appropiate mail headers to it and then pipe it to netcat to send it to port 25 on the remote mail server.
NAT Router's IP Address
Posted by: Anonymous Coward on March 11, 2006 09:44 PMwget --http-user=xyzzy --http-passwd=xyzzy <a href="http://myrouter.localnet/Status_Router.asp" title="myrouter.localnet">http://myrouter.localnet/Status_Router.asp</a myrouter.localnet>
(on one line, of course.)
The full script to do this uses awk to get the ip address from the returned html data, add the appropiate mail headers to it and then pipe it to netcat to send it to port 25 on the remote mail server.
#