Results 1 to 3 of 3

Thread: keeping log of default gateway

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2007
    Posts
    3

    keeping log of default gateway

    Hi All,

    This is Nepaliman from Nepal.

    Is it possible to keep log of default gateway. Log can be client IP, remote IP, remote port, client computer name etc.

    I have little knowledge in VB6 and don't know VB.NET

  2. #2
    Addicted Member
    Join Date
    Jul 2006
    Location
    Adelaide, Australia
    Posts
    204

    Re: keeping log of default gateway

    easyest way i know of is:
    vb Code:
    1. Open app.path & "\gateway.bat" for output as #1
    2.     print #1, "@echo Off"
    3.     print #1, "ipconfig >> " & app.path & "\Gatewaydat.txt"
    4.     print #1, "exit"
    5. Close #1
    6. Shell app.path & "\gateway.bat"
    7. doevents
    8. doevents
    9. doevents
    10. doevents
    11. doevents
    12. dim LineDataIn as string
    13. Open app.path & "\Gatewaydat.txt" for input as #1
    14.     do while not eof(1)
    15.         line input #1, LineDataIn
    16.         if Instr(LineDataIn, "Default Gateway") then text1.text=text1.text & linedatain
    17.     loop
    18. close #1

  3. #3
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: keeping log of default gateway

    Most routers (gateways) can be set to keep a log. Then just connect to the gateway, download the log and clear it.
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width