LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Router Log Help!! (https://www.linuxquestions.org/questions/linux-general-1/router-log-help-99523/)

FearPasion710 10-02-2003 03:21 PM

Router Log Help!!
 
Hi how are my Besttest of Friends today i bring you new kind of prob i have... well is not a problem at all i just something that would do it for me instead of me! and since Linux can do basically anything well im pretty sure it can do this!

Well my story is... that i have Broadband as most of us here do! and since broadband is kinda Expensive 45$ month for regular and 75$ for Extra highspeed witch is the one i have... 6.9Mbs DL , 378Kbs UP. well i decided to share this precious bandwidht with my neighbours via Lan (cable, wireless) they pay me 20$ month for access and im happy :p
shh...dont tell anyone ;) well is there a way so that i can retrieve the routers ( outgoing traffic information ) and save it to a log on my computer? im using a linksys BEFSR41 and i can perfectly see the log is i do this:

is there a way that i could set a cron job to retreive that webpage and save it to disk every say 60 seconds or 30 secs

so that i can latter see what was going on on the network!!


(IM NOT TrYING TO SPY ON PEOPLE THOUGH) i dont know if u heard about p2p almost being Illegal i dont wanna get Sued by someone when i miselft dont use p2p that much! i wanna have somekind of evidence for when something happens i will who it was! thank you!

david_ross 10-02-2003 03:33 PM

You could try running a cronjob like:
Code:

lynx -dump http://10.192.168.254/outLogTable.htm > /var/log/netusage_`date +"%F_%T"`.log
If you have authentication on the router you may need to look at the auth options in "man lynx".

FearPasion710 10-02-2003 03:56 PM

it didnt work!!
 
i mean the whole command will work but i need authorization on the router!!

lynx -auth=none:password -dump http://10.192.168.254/outLogTable.htm > /var/log/netusage_`date +"%F_%T"`.log

i get this

Looking up 10.192.168.254
Making HTTP connection to 10.192.168.254
Sending HTTP request.
HTTP request sent; waiting for response.
Alert!: Access without authorization denied -- retrying
Retrying with access authorization information.
Looking up 10.192.168.254
Making HTTP connection to 10.192.168.254
Alert!: Unable to connect to remote host.

lynx: Can't access startfile http://10.192.168.254/outLogTable.htm

david_ross 10-02-2003 04:16 PM

How do you enter your username and password? Is it embeded into a page or do you get a browser popup box?

FearPasion710 10-02-2003 04:39 PM

...
 
a little window pops up and ask me for my password..


does that mean that i wont be able to do it?

thanks

FearPasion710 10-02-2003 04:39 PM

...
 
a little window pops up and ask me for my password..


does that mean that i wont be able to do it?

thanks

david_ross 10-02-2003 04:43 PM

No I would have said the opposite. I think it would let you. Try to see if you can get the file in interactive mode with lynx:
lynx http://10.192.168.254/outLogTable.htm

FearPasion710 10-02-2003 05:08 PM

it still asked me for a password!
 
it still asked me for a password... i dont know what to do know
i mean if i type

lynx

wait for it to load then type g

http://10.192.168.254/outLogTable.htm
it tells me it cant log int without valid authentications so it asked me for a password... and i do

<space>, enter, password, enter and it work's and shows me the page!

Looking_Lost 10-02-2003 05:19 PM

Theirs a logviewer available for linksys routers albeit only for windows, however I a quick search on snmp blah,blah and I've seen suggestions of using snmptrapd which should be able to view logs/traffic

snmptrapd might be worth a bit of investigation either way.

FearPasion710 10-02-2003 09:11 PM

Hey thanks
 
Thank you all for ur help!

david_ross 10-04-2003 01:48 PM

Re: it still asked me for a password!
 
Quote:

Originally posted by FearPasion710
it still asked me for a password... i dont know what to do know
i mean if i type

lynx

wait for it to load then type g

http://10.192.168.254/outLogTable.htm
it tells me it cant log int without valid authentications so it asked me for a password... and i do

<space>, enter, password, enter and it work's and shows me the page!

In that case it should work wiht the command line options.

I assume you did use your correct username and password and not just the username "none" and password "password"?

FearPasion710 10-04-2003 02:07 PM

yes i did
 
i used my real password for the routers and since the router has no login name i use none for it and it still works... the routers just ignores the none and uses my pass

horlix 10-04-2003 02:12 PM

sorry if I've misinterpreted this, speed read as I'm just off to the pub, but perhaps you can change the url to include the username/password, ie.

http://username:password@10.192.168.254/outLogTable.htm

FearPasion710 10-04-2003 03:22 PM

check this out!!
 
if i do this!!

lynx auth=none:mariemoreno http://10.192.168.254/outLogTable.htm


it will log me in and show me the page with the log!!

but if i do this!!

lynx -dump -auth=none:mariemoreno http://10.192.168.254/outLogTable.htm

it gives me this!

Looking up 10.192.168.254
Making HTTP connection to 10.192.168.254
Sending HTTP request.
HTTP request sent; waiting for response.
Alert!: Access without authorization denied -- retrying
Retrying with access authorization information.
Looking up 10.192.168.254
Making HTTP connection to 10.192.168.254
Alert!: Unable to connect to remote host.

lynx: Can't access startfile http://10.192.168.254/outLogTable.htm


it dosent matter if i put the -dump in the beginnig or after the password it still wont work!

any ideas!! we have tackled one prob already and tha is authentication... not how can i dump that info to a file!!

Looking_Lost 10-04-2003 05:01 PM

Maybe subsituting wget for lynx will grab it if you've got wget on your system.


All times are GMT -5. The time now is 04:41 PM.