9.3 Install on Linux and Initial Configurations

    Table of contents
    You are currently comparing two old versions - only when you are comparing against the latest version can you revert. Return to version archive.

    Combined revision comparison

    Comparing version 22:42, 20 Jan 2024 by puripuri2100 with version 20:27, 14 Feb 2024 by puripuri2100.

    ...

    • Red Hat Enterprise Linux Fedora UbuntuCentOS

    ...

    1. Perform a clean installation of Linux. Avoid cases where inconsistencies may occur, such as in the libraries after upgrading from an earlier version of Linux.
    2. When creating a partition on the hard disk, be sure to allocate sufficient disk space to the partition with the /usr/ directory. The examples in the descriptions below are based on VPN Server being installed to /usr/local/vpnbridge/. In addition, we recommend allocating sufficient disk space to the partition to allow VPN Bridge to write log files to the same directory.
    3. At the stage of selecting components to be installed, at the minimum, the development tools (compiler, etc.) and development libraries are installed at the same time. When installing VPN Server, the make and gccbinutils utilities and the libc (glibc), zlib, openssl, readline, and ncurses development library versions (also called devel) are required.
    4. After installing the operating system, update to the latest Linux kernel (2.6.9-22 or later). Because there are problems in the parallel and synchronous processing of the kernel included in the initial install of Linux, the operations of VPN Bridge may become unstable. Be sure to update the kernel.
    5. Complete the installation of the program with the firewall and SELinux functions disabled. After confirming that VPN Server is properly installed, you can enable these functions only if necessary.

    ...

    To register vpnbridge to Linux as a daemon process, create a startup script, as shown below, with the name /opt/vpnbridge.shetc/init.d/vpnbridge. (The following startup script is a description example, and you may have to rewrite part of the script for it to work properly on your system.)

    #!/bin/sh
    # chkconfig: 2345 99 01 # description: SoftEther VPN Server
    DAEMON=/usr/local/vpnbridge/vpnbridge
    LOCK=/var/lock/subsys/vpnbridge
    test -x $DAEMON || exit 0
    case "$1" in
    start)
    $DAEMON start
    touch $LOCK
    ;;
    stop)
    $DAEMON stop
    rm $LOCK
    ;;
    restart)
    $DAEMON stop
    sleep 3
    $DAEMON start
    ;;
    *)
    echo "Usage: $0 {start|stop|restart}"
    exit 1
    esac
    exit 0

    You can use a text editor or the cat command to write the above script to /etc/opt/vpnbridge.shinit.d/vpnbridge as a text file. To use the cat command to create the script, press Ctrl + D after the line break in the final line, as shown below.

    [root@machine vpnserver]# cat > /opt/vpnbridge.shetc/init.d/vpnbridge
    #!/bin/sh
    # chkconfig: 2345 99 01 # description: SoftEther VPN Bridge
    DAEMON=/usr/local/vpnbridge/vpnbridge
    LOCK=/var/lock/subsys/vpnbridge
    test -x $DAEMON || exit 0
    case "$1" in
    start)
    $DAEMON start
    touch $LOCK
    ;;
    stop)
    $DAEMON stop
    rm $LOCK
    ;;
    restart)
    $DAEMON stop
    sleep 3
    $DAEMON start
    ;;
    *)
    echo "Usage: $0 {start|stop|restart}"
    exit 1
    esac
    exit 0
     

    After creating the /opt/vpnbridge.shetc/init.d/vpnbridge startup script, change the permissions for this script so that the script cannot be rewritten by a user without permissions.

    [root@machine vpnbridge]# chmod 755 /opt/vpnbridge.sh

    Next, create a systemd config file, as shown below, with the name /etc/systemd/system/vpnbridge.serviceinit.d. (The following startup script is a description example, and you may have to rewrite part of the script for it to work properly on your system.)

    [Unit]
    Description = vpnbridge daemon
    
    [Service]
    ExecStart = /opt/vpnbridge.sh start
    ExecStop = /opt/vpnbridge.sh stop
    ExecReload = /opt/vpnbridge.sh restart
    Restart = always
    Type = forking
    
    [Install]
    WantedBy = multi-user.target/vpnbridge

    Lastly, use the systemctlchkconfig command to allow the above startup script to start automatically in the background when the Linux kernel starts.

    [root@machine vpnserver]# systemctl enablevpnbridge]# /sbin/chkconfig --add vpnbridge 

    VPN ServerBridge is now prepared to run as a service mode program.

     

    ...

    [root@machine vpnbridge]# systemctl start vpnbridge/etc/init.d/vpnbridge start  

    ...

    [root@machine vpnbridge]# systemctl stop vpnbridge/etc/init.d/vpnbridge stop 

    ...

    Other changes:

    1. /body/table[13]/@id: "table724""table669"

    Version from 22:42, 20 Jan 2024

    This revision modified by puripuri2100 (Ban)

    ...

    • Red Hat Enterprise Linux
    • Fedora
    • CentOS

    ...

    1. Perform a clean installation of Linux. Avoid cases where inconsistencies may occur, such as in the libraries after upgrading from an earlier version of Linux.
    2. When creating a partition on the hard disk, be sure to allocate sufficient disk space to the partition with the /usr/ directory. The examples in the descriptions below are based on VPN Server being installed to /usr/local/vpnbridge/. In addition, we recommend allocating sufficient disk space to the partition to allow VPN Bridge to write log files to the same directory.
    3. At the stage of selecting components to be installed, at the minimum, the development tools (compiler, etc.) and development libraries are installed at the same time. When installing VPN Server, the make and gccbinutils utilities and the libc (glibc), zlib, openssl, readline, and ncurses development library versions (also called devel) are required.
    4. After installing the operating system, update to the latest Linux kernel (2.6.9-22 or later). Because there are problems in the parallel and synchronous processing of the kernel included in the initial install of Linux, the operations of VPN Bridge may become unstable. Be sure to update the kernel.
    5. Complete the installation of the program with the firewall and SELinux functions disabled. After confirming that VPN Server is properly installed, you can enable these functions only if necessary.

    ...

    To register vpnbridge to Linux as a daemon process, create a startup script, as shown below, with the name /etc/init.d/vpnbridge. (The following startup script is a description example, and you may have to rewrite part of the script for it to work properly on your system.)

    #!/bin/sh
    # chkconfig: 2345 99 01
    # description: SoftEther VPN Server
    DAEMON=/usr/local/vpnbridge/vpnbridge
    LOCK=/var/lock/subsys/vpnbridge
    test -x $DAEMON || exit 0
    case "$1" in
    start)
    $DAEMON start
    touch $LOCK
    ;;
    stop)
    $DAEMON stop
    rm $LOCK
    ;;
    restart)
    $DAEMON stop
    sleep 3
    $DAEMON start
    ;;
    *)
    echo "Usage: $0 {start|stop|restart}"
    exit 1
    esac
    exit 0

    You can use a text editor or the cat command to write the above script to /etc/init.d/vpnbridge as a text file. To use the cat command to create the script, press Ctrl + D after the line break in the final line, as shown below.

    [root@machine vpnserver]# cat > /etc/init.d/vpnbridge
    #!/bin/sh
    # chkconfig: 2345 99 01
    # description: SoftEther VPN Bridge
    DAEMON=/usr/local/vpnbridge/vpnbridge
    LOCK=/var/lock/subsys/vpnbridge
    test -x $DAEMON || exit 0
    case "$1" in
    start)
    $DAEMON start
    touch $LOCK
    ;;
    stop)
    $DAEMON stop
    rm $LOCK
    ;;
    restart)
    $DAEMON stop
    sleep 3
    $DAEMON start
    ;;
    *)
    echo "Usage: $0 {start|stop|restart}"
    exit 1
    esac
    exit 0
     

    After creating the /etc/init.d/vpnbridge startup script, change the permissions for this script so that the script cannot be rewritten by a user without permissions.

    [root@machine vpnbridge]# chmod 755 /etc/init.d/vpnbridge

    Lastly, use the chkconfig command to allow the above startup script to start automatically in the background when the Linux kernel starts.

    [root@machine vpnbridge]# /sbin/chkconfig --add vpnbridge

    VPN Bridge is now prepared to run as a service mode program.

    ...

    [root@machine vpnbridge]# /etc/init.d/vpnbridge start 

    ...

    [root@machine vpnbridge]# /etc/init.d/vpnbridge stop 

    ...

    Version as of 20:27, 14 Feb 2024

    This revision modified by puripuri2100 (Ban)

    ...

    • Ubuntu

    ...

    To register vpnbridge to Linux as a daemon process, create a startup script, as shown below, with the name /opt/vpnbridge.sh. (The following startup script is a description example, and you may have to rewrite part of the script for it to work properly on your system.)

    ...

    You can use a text editor or the cat command to write the above script to /opt/vpnbridge.sh as a text file. To use the cat command to create the script, press Ctrl + D after the line break in the final line, as shown below.

    [root@machine vpnserver]# cat > /opt/vpnbridge.sh
    #!/bin/sh
    # description: SoftEther VPN Bridge
    DAEMON=/usr/local/vpnbridge/vpnbridge
    LOCK=/var/lock/subsys/vpnbridge
    test -x $DAEMON || exit 0
    case "$1" in
    start)
    $DAEMON start
    touch $LOCK
    ;;
    stop)
    $DAEMON stop
    rm $LOCK
    ;;
    restart)
    $DAEMON stop
    sleep 3
    $DAEMON start
    ;;
    *)
    echo "Usage: $0 {start|stop|restart}"
    exit 1
    esac
    exit 0
     

    After creating the /opt/vpnbridge.sh startup script, change the permissions for this script so that the script cannot be rewritten by a user without permissions.

    [root@machine vpnbridge]# chmod 755 /opt/vpnbridge.sh

    Next, create a systemd config file, as shown below, with the name /etc/systemd/system/vpnbridge.service. (The following startup script is a description example, and you may have to rewrite part of the script for it to work properly on your system.)

    [Unit]
    Description = vpnbridge daemon
    
    [Service]
    ExecStart = /opt/vpnbridge.sh start
    ExecStop = /opt/vpnbridge.sh stop
    ExecReload = /opt/vpnbridge.sh restart
    Restart = always
    Type = forking
    
    [Install]
    WantedBy = multi-user.target

    Lastly, use the systemctl command to allow the above startup script to start automatically in the background when the Linux kernel starts.

    [root@machine vpnserver]# systemctl enable vpnbridge 

    VPN Server is now prepared to run as a service mode program.

    ...

    [root@machine vpnbridge]# systemctl start vpnbridge 

    ...

    [root@machine vpnbridge]# systemctl stop vpnbridge

    ...