Summary: | Modification of the SoftEther VPN 5 (Developer Edition) rc script for initial configure TAP interface | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | shrdlu19 | ||||||
Component: | Individual Port(s) | Assignee: | Koichiro Iwao <meta> | ||||||
Status: | In Progress --- | ||||||||
Severity: | Affects Only Me | CC: | meta, shrdlu19 | ||||||
Priority: | --- | Flags: | shrdlu19:
maintainer-feedback?
|
||||||
Version: | Latest | ||||||||
Hardware: | Any | ||||||||
OS: | Any | ||||||||
Attachments: |
|
Description
shrdlu19
2021-04-12 16:36:52 UTC
Created attachment 225120 [details]
A new modified softether_server startup script from May 20, 2021
After a while, I needed to create additional TAP interfaces, for which I had to rework the script again... perhaps this is not the best solution, but in any case it is more universal. I removed the "softether_server_tap_iface" parameter and replaced it with the "softether_server_tap_ifaces" parameter - it contains a list of TAP interface names for the ifconfig command I also removed the "softether_server_tap_addr" parameter. Instead, the "softether_server_if _ <TAP interface name>" parameters should be specified in the rc.conf file in accordance with those listed in the "softether_server_tap_ifaces" list This is how it looks now in my rc.conf: softether_server_enable = "YES" softether_server_tap_ifaces = "tap_vpn0 tap_vpn1" softether_server_if_tap_vpn0 = "192.168.1.1/24" softether_server_if_tap_vpn1 = "192.168.10.1/24" Then i modified a function that configures the virtual TAP interfaces: # modified by shrdlu - postcmd - running ifconfig after softether-server started # with new configuration parameters # softether_server_postcmd() { if [ "${softether_server_tap_ifaceS}" != none ]; then echo "Waiting ${softether_server_tap_idle} sec to create TAP interface" sleep ${softether_server_tap_idle} for if_name in $softether_server_tap_ifaces; do ifvar="softether_server_if_${if_name}" eval "ifcfg=\$$ifvar" ifconfig $if_name inet $ifcfg done; fi } So... there are definitely not enough error checks here, maybe I'll add them in the future. I have attached the my new modified script to this message. r(In reply to shrdlu19 from comment #2) Recently, I've updated SoftEther VPN 5 to v5.02.0. I'm trying to applying your rc script. (In reply to Koichiro Iwao from comment #3) Yeah, i'm updated today... but i see the same old rc.d script after update. In version 5.02 Build 9675 OpenVPN clone server function is broken! Clients can't connect to udp port 1194. VPN Server>ServerInfoGet ServerInfoGet command - Get server information Item |Value --------------------------------+--------------------------------------------------------------------------------- Product Name |SoftEther VPN Server Developer Edition (64 bit) (Open Source) Version |Version 5.02 Build 9675 (English) Build |Compiled 2021/07/01 20:37:50 by nobody at FreeBSD:12:2:amd64-default-daily-job-06 Host Name |test.example.com Server Type |Standalone Server Type of Operating System |BSD System Product Name of Operating System|FreeBSD Operating System Vendor |FreeBSD Operating System Version |12.2-RELEASE-p7 Type of OS Kernel |UNIX Version of OS Kernel |FreeBSD 12.2-RELEASE-p7 GENERIC The command completed successfully. VPN Server>OpenVpnGet "OpenVpnGet": Command not found. You can use the HELP command to view a list of the available commands. VPN Server> All OpenVPN commands are lost! Also, in confuguration file is no one information about OpenVPN config! Only TCP connection are work. (In reply to shrdlu19 from comment #5) It is not broken, search the upstream issue. And it is related to this rc script bug. (In reply to Koichiro Iwao from comment #6) Hmm... The issue https://github.com/SoftEtherVPN/SoftEtherVPN/issues/1388 and related partially matches the description of what is happening, but does not explain the disappearance of all control commands related to openvpn... And what exactly is the bug on rc script? (In reply to shrdlu19 from comment #7) I meant "bug" is a specific topic on *Bug*zilla. What was the topic of this BUG? Modifying rc script, right? If you want to have a talk on other issue, you should raise a new one. Don't talk about more than one issue on a single Bugzilla bug. (In reply to shrdlu19 from comment #7) I think your NEW issue is about "OpenVpnGet" command is missing. Search the upstream issues, too. Anyway, raise the new issue if you want to continue talking about anything other than the original RC script issue. (In reply to Koichiro Iwao from comment #9) Mea culpa. You're right, i'm sorry. But, probably, this problem has nothing to do with the freebsd port, so I will write about it on github, a bit later. |