![]() |
Reference Manual |
HOW TO monitor Fritz!Box DSL traffic in real time
|
|
Current external IP address | 0.0.0.0 |
Introduction
The Fritz!Box has a packet trace feature that works by requesting a special URL that returns a traffic trace for a specified interface in the form of a libpcap formatted file. When the trace is terminated, the saved trace file can be viewed using software such as WireShark that displays the traffic in a readable form.
While this feature is quite useful, it has the major disadvantage that one cannot view the traffic in real time. The trace must be started, run for as long as is required, and then stopped. Only then can Wireshark be started in order to display the trace.
NAT32 Build 1052 (and later) can request a trace from the Fritz!Box and then pipe the received data to a shell command (tdump) that decodes the data and prints it to the standard output device. The standard output can be redirected to a NAT32 Monitor window for subsequent display. The display can be started and stopped as needed and can also be saved to a file for subsequent examination.
Because NAT32 (unlike Windows) executes each command of a pipeline as a separate thread, the display of the trace data occurs in real time, and the user can immediately notice (and respond to) any unwanted Internet traffic originating from private machines. This feature can be very useful for detecting viruses and applications (e.g. Skype) that consume large amounts of DSL bandwidth for no useful purpose (from the user's point of view).
Script Files
A script file to solicit the trace from the Fritz!Box, decode it and display it in the Monitor window is shown below:
monitor on
set fbtrace 1
httpgetr "http://192.168.178.1/cgi-bin/capture_notimeout?start=0" | tdump > monitor &
A script file to terminate the trace is shown below:
httpgetr "http://192.168.178.1/cgi-bin/capture_notimeout?stop=0"
set fbtrace 0
The above scripts are contained in files fritz_on and fritz_off and can be invoked from the main NAT32 web page or the NAT32 Console.
Notes
The full (registered) version of NAT32 contains an additional script file (fritz_xon)) that displays the trace data in the NAT32 Trace Window. In this case, all packet data is displayed, including protocol headers and payload data.
See Also
Fritz!Box Tips and Tricks, External Routers, httpget
|
|