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

    Barracuda 310 NIC Bypass-Override

    Scheduled Pinned Locked Moved Hardware
    2 Posts 2 Posters 304 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.
    • J
      jibun no kage
      last edited by jibun no kage

      Re: Barracuda 310 NICs

      This forum had a discussion, quite old, that illustrated how to override the barracuda 310 NIC by-pass done at boot via the barracuda BIOS, i.e. the WAN and LAN (front ethernet) ports are disabled about 5 seconds after reboot as the BIOS disables them, until the OS enables them. Given that the 310 uses a rather generic main board, pretty much any OS can be installed, but then the WAN and LAN ports are disabled. Replacement of the BIOS is possible, but in some cases this is problematic, give the age of the main board, so the barracuda BIOS maybe preferred.

      The solution is to disable the port by-pass by the BIOS, as noted above the original forum topic discussed doing this, but was, if memory serves, specific to using one or more small C programs to access the parallel port. These small C programs are either gone from their original download sites, or the sources specific to FreeBSD.

      Below is a generic, Linux oriented solution to effect the port by-pass disable feature of the barracuda BIOS. It happens to be python3 based, which avoids the need for C source code, compiling same, etc.

      Note... you do need to install one module, pyparallel before attempting to use the following python3 script. As for the values to send to the parallel port, please refer to the original topic referenced above. In short, sending hex, 0x08 will enable the WAN and LAN ports on the front of the 310 device.

      As for other OS deployment on the 310 device, I was able to install Debian 11.6, the applicable firmware for the NICs, and disable the by-pass as noted below. The default BIOS password can be found from various posts, Google for it. The Debian 11 install was done via rufus and the standard Debian 11 install ISO image on a generic USB drive. You may need to change the boot order in the BIOS for the USB drive to be seen before the internal disk in the 310 device.

      At the very end of this topic is a systemd until file to have the python3 script run at boot. Or you can just run the python3 script below after each boot. The AUX ethernet port at the back of the device does not seem to be disabled by default, as some references suggest via Google.

      #!/usr/bin/python3
      #
      #

      from sys import exit
      # pip3 install pyparallel
      from parallel import Parallel

      BYPASS=0x08
      ZERO=0
      KABOOM=255

      theResult=ZERO

      try:
      print('Disable Front Ethernet Port By-Pass...')
      thePort=Parallel()
      if (thePort is None):
      raise Exception('No Port?')
      thePort.setData(BYPASS)
      except Exception as theException:
      theResult=KABOOM
      print(theException)
      finally:
      print('...Disable Front Ethernet Port By-Pass (Result: {0}).'.format(theResult))
      exit(theResult)

      Here is the unit file that runs at system boot, for other Linux distributions that use init versus sytstemd, the python3 script can also be run as part of the rc init sequence, i.e. in the rc.local file.

      # nano /etc/systemd/system/FrontEthernetPort.service
      [Unit]
      Description=Disable Barracuda Front Ethernet Port By-Pass Service
      After=network.target
      [Service]
      Type=oneshot
      ExecStart=/usr/bin/python3 /root/FrontEthernetPort.py
      [Install]
      WantedBy=multi-user.target

      # systemctl daemon-reload
      # systemctl enable FrontEthernetPort.service
      # systemctl start FrontEthernetPort.service
      # systemctl status FrontEthernetPort.service
      Apr 19 09:40:48 barracuda-ethernet systemd[1]: Starting Disable Barracuda Front Ethernet Port By-Pass Service...
      Apr 19 09:40:48 barracuda-ethernet python3[1211]: Disable Front Ethernet Port By-Pass...
      Apr 19 09:40:48 barracuda-ethernet python3[1211]: ...Disable Front Ethernet Port By-Pass (Result: 0).
      Apr 19 09:40:48 barracuda-ethernet systemd[1]: FrontEthernetPort.service: Succeeded.
      Apr 19 09:40:48 barracuda-ethernet systemd[1]: Finished Disable Barracuda Front Ethernet Port By-Pass Service.

      Of course, you can set this to run under a specific user rather than root if needed.

      Hope this helps anyone re-purposing a 310 or similar device.

      stephenw10S 1 Reply Last reply Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator @jibun no kage
        last edited by

        @jibun-no-kage said in Barracuda 310 NIC Bypass-Override:

        These small C programs are either gone from their original download sites

        Here's that source for reference.

        BCHW.c.txt

        Steve

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