Drale

How to embed m0n0wall graphs.

Wanting to share your network traffic graph on your website or just display it on an intranet page? Here’s how.

Creating A User:
Login to your m0n0wall firewall and go to User Manager.
Create a group called “graphs” or whatever you like and check the box for “Diagnostics: Interface Traffic – graph.php”.

You’ll notice an option further down for “status_graph.php” which is the page you visit in the m0n0wall gui to view your traffic, but this is not what we need and you’ll see why in a bit.

Next you need to create a user and assign them to the group you just created.

You are done with the User Manager now. So let’s move on to embedding the graph.

Finding The Graph Embed
Logged in as the Admin, visit your Traffic Graph page under Status. Right-Mouse Click the page and View Source.
Scroll down a bit and look for:
<embed src=”graph.php?ifnum=xl0&ifname=WAN” type=”image/svg+xml”
width=”550″ height=”275″ pluginspage=”http://www.adobe.com/svg/viewer/install/auto” />

If you want to view the LAN interface, then select it in the drop box and view the source again for a different interface number and ifname=LAN

Put the embed tag into the page you want it on and add your absolute path with login and IP:

src=”http://graphuser:password@YOURIP/graph.php………”

You now have a graph on your site and if someone looks at your source they cannot login to your firewall with the limited user account.

You can create multiple groups for different graphs or you can create one Graph group with one account to accessing all graphs.

Another use for this is if you just want to look at your graphs from time to time. You can create a link on your desktop to “http://graphuser:password@YOURIP/graph.php………”. This way you just open the page and do not have to login to m0n0wall.


Categorised as: Computers, Tutorials


Leave a Reply

Your email address will not be published.