Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Apr 2021 16:36:52 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 255008] Modification of the SoftEther VPN 5 (Developer Edition) rc script for initial configure TAP interface
Message-ID:  <bug-255008-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D255008

            Bug ID: 255008
           Summary: Modification of the SoftEther VPN 5 (Developer
                    Edition) rc script for initial configure TAP interface
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: shrdlu19@gmail.com
                CC: meta@FreeBSD.org
             Flags: merge-quarterly?, exp-run?

Created attachment 224055
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D224055&action=
=3Dedit
softether_server modified rc script

Hello

I experimented with SoftEther VPN 5 Developer Edition
(https://www.freshports.org/security/softether5/), and tried configuring Lo=
cal
Bridge using a virtual TAP interface. I was able to start the server with t=
hese
settings, but for normal operation I need to manually run ifconfig to confi=
gure
the ip-address on the created virtual interface, and these settings disappe=
ar
after OS reboot or server restart.
I tried to modify the script that starts the Softether vpn server to fix th=
is
flaw. This works fine for me. I want to invite you to take a look at the
changes I made.

First, I added three additional configuration parameters to the
/usr/local/etc/rc.d/softether_server script:

# modified by shrdlu - added config options
# - tap_iface - TAP interface name for ifconfig command
# - tap_addr - TAP interface IP address for ifconfig command,
#   may be in CIDR format (a.b.c.d/x) or IP-address with netmask
#   (a.b.c.d netmask e.f.g.h)
# - tap_idle - delay before run ifconfig command for setup IP address on TAP
interface
#
softether_server_tap_iface=3D${softether_server_tap_iface:-"none"}
softether_server_tap_addr=3D${softether_server_tap_addr:-"127.0.0.2/32"}
softether_server_tap_idle=3D${softether_server_tap_Idle:-"5"}

Secondly, I have defined a command to run after softether_server starts:

# modified by shrdlu - added command, running after softether-server started
#
start_postcmd=3D"${name}_postcmd"

And I wrote a function that configures the virtual TAP interface:

# modified by shrdlu - postcmd - running ifconfig after softether-server
started
# with new configuration parameters
#
softether_server_postcmd()
{
        if [ "${softether_server_tap_iface}" !=3D none ]; then
                echo "Waiting ${softether_server_tap_idle} sec to create TAP
interface"
                sleep ${softether_server_tap_idle}
                ifconfig ${softether_server_tap_iface} inet
${softether_server_tap_addr}
        fi
}

If people find these modifications correct and useful, then it might be wor=
th
checking out and including them in one of the next versions of the port. It=
 is
possible that some corrections need to be made.=20

I have attached the my modified script to this report.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-255008-7788>