Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    How to reorder interfaces for vnstat

    Scheduled Pinned Locked Moved pfSense Packages
    4 Posts 2 Posters 1.9k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      dread_ire
      last edited by

      I have 3 interfaces configured in pfSense.  I would like my WAN interface (re1) to be listed first when viewing vnstat.

      1 Reply Last reply Reply Quote 0
      • C
        Cino
        last edited by

        edit file /usr/local/www/vnstat2/config.php or /usr/local/www/vnstat/config.php

        Look for something like this:

        $iface_list = array('em1', 'em0', 'tun0', 'tun1');

        //
            // optional names for interfaces
            // if there's no name set for an interface then the interface identifier
            // will be displayed instead
        $iface_title['em0'] = 'LAN';
        $iface_title['em1'] = 'Internet';
        $iface_title['tun0'] = 'OpenVPN RoadWarrior';
        $iface_title['tun1'] = 'OpenVPN Site-to-Site';

        Change the order in $iface_list… Like I did

        You will want to back this file up if you every upgrade as it will be overwritten too

        1 Reply Last reply Reply Quote 0
        • D
          dread_ire
          last edited by

          That worked great, thank you very much.

          1 Reply Last reply Reply Quote 0
          • C
            Cino
            last edited by

            your very welcome  ;D

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.