Table of contents
Combined revision comparison
...
Red Hat Enterprise LinuxFedoraUbuntuCentOS
...
- 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.
- 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.
- 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.
- 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. - 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 # 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.sh #!/bin/sh # 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 enable |
VPN ServerBridge is now prepared to run as a service mode program.
...
[root@machine vpnbridge]# systemctl start vpnbridge |
...
[root@machine vpnbridge]# systemctl stop vpnbridge |
...
Other changes:
- /body/table[13]/@id:
"table724"⇒ "table669"
Version from 22:42, 20 Jan 2024
...
Red Hat Enterprise LinuxFedoraCentOS
...
- 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.
- 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.
- 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.
- 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. - 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 # 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 > / #!/bin/sh # 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/ |
Lastly, use the chkconfig command to allow the above startup script to start automatically in the background when the Linux kernel starts.
[root@machine |
VPN Bridge is now prepared to run as a service mode program.
...
[root@machine vpnbridge]# |
...
[root@machine vpnbridge]# |
...
Version as of 20:27, 14 Feb 2024
...
- 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 |
...