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

    Error while saving OpenVPN Routes

    Scheduled Pinned Locked Moved OpenVPN
    3 Posts 2 Posters 183 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.
    • A
      ahdzesq_vfru
      last edited by

      I have a use case where I have 19 push routes into an OpenVPN configuration, when I save the configuration everything works without a problem, but If I reset the OpenVPN service, pfsense stores the routes all in the same line and OpenVPN is not able to start and throws the next error:

      Options error: In /var/etc/openvpn/server1/config.ovpn:41: Maximum option line length (256) exceeded, line starts with push "route 10.....

      Config OK:
      b9e5aa3c-4f65-4c38-89fe-f5f813fe4060-image.png

      Config after service restart:
      2183c9de-5c49-4c2c-a6b1-46b19308a6dc-image.png

      Has anyone had the same error in the past?

      is there any workaround?

      Thanks!

      V 1 Reply Last reply Reply Quote 0
      • V
        viragomann @ahdzesq_vfru
        last edited by viragomann

        @ahdzesq_vfru
        The pfSense GUI provides the "Local IPv4 Network/s" box for entering routes to be pushed to the server. You have to use CIDR notation for the subnets and separate them by commas.
        You should rather use this box than entering all in the custom options.

        For stating custom options though, remember to separate them by semi-colons.

        A 1 Reply Last reply Reply Quote 1
        • A
          ahdzesq_vfru @viragomann
          last edited by

          Thanks @viragomann that works perfect

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