Softether protocol error occurred error was returned from the destination server

I installed latest version of (SoftEther VPN client + VPN gate plugin). I have win 10. when I want to connect with TCP mode immediately error code 2 appears. "Error (Error Code 2) Protocol error oc...

I installed latest version of (SoftEther VPN client + VPN gate plugin). I have win 10.
when I want to connect with TCP mode immediately error code 2 appears.
«Error (Error Code 2)
Protocol error occurred. Error was returned from the destination server.»
Image
I can connect in UDP mode But I want to use TCP mode.
It’s interesting that my friend by his PC connect without problem…
Thanks.

asked May 18, 2018 at 8:41

user906192's user avatar

So to fix this annoying problem you want to go to hidden icons or find the softether VPN icon in your taskbar right-click it and press exit and then yes then go to the search bar in you computer and search up services find SoftEther VPN and double click it now click stop then click start again if that didn’t work then go to time.is on your browser and see if your time’s correct if it’s about 40-60 seconds late maybe below that’s fine, hope I helped you!

answered Feb 3, 2021 at 11:26

SoftEther VPN Guide's user avatar

another way of solution:

  1. Open the «SoftEther VPN Client Manager» window.
  2. Right click «VPN Client Adapter-VPN», then click on «Reinstall driver…».
  3. Click «Ok» & do nothing until finish the process.
  4. After finish the this, Try your SoftEther VPN Client service without problem.
    Hope you got the answer.

answered Mar 23, 2021 at 5:57

user1288194's user avatar

Press «Proxy Settings» choose a section «Connect via HTTP Proxy Server».
In the settings, enter any name and okay.
This worked for me.
enter image description here

answered Feb 17, 2022 at 23:02

Артем's user avatar

АртемАртем

1191 silver badge7 bronze badges

SoftEther под­дер­жи­ва­ет почти все тун­нель­ные про­то­ко­лы (L2TP, L2TP/IPsec, MS-SSTP, EtherIP и т.д.). Так­же у него есть соб­ствен­ный SSL-VPN про­то­кол неот­ли­чи­мый от обыч­но­го HTTPS трафик

Дан­ные могут пере­да­вать­ся не толь­ко с помо­щью TCP/UDP про­то­ко­лов, а так­же с помо­щью ими­та­ции ICMP (пинг) и DNS запросов.

SoftEther не тре­бо­ва­те­лен к типам вир­ту­а­ли­за­ции, в отли­чии от OpenVPN, кото­ро­му для рабо­ты тре­бу­ет­ся нали­чие TUN/TAP устройств в ядре. Поэто­му SoftEther рабо­та­ет на любых VPS/VDS и это еще один плюс в копилку.

Кли­ент­ское и сер­вер­ное ПО суще­ству­ет прак­ти­че­ски для всех рас­про­стра­нен­ных опе­ра­ци­он­ных систем. Про­цесс ком­пи­ля­ции исход­но­го кода при уста­нов­ке в UNIX-систе­мах мини­ми­зи­ро­ван настоль­ко, что с ним лег­ко спра­вит­ся любой пользователь.

ПО SoftEther состо­ит из несколь­ких компонентов:

  • Server — самый пол­ный набор, вклю­ча­ет в себя Server, Bridge и VPN Server Manager (в вер­сии для Windows).
  • Bridge — поз­во­ля­ет под­клю­чать локаль­ные сети к VPN-тоннелям.
  • VPN Server Manager — ути­ли­та с гра­фи­че­ским интер­фей­сом в систе­ме Windows. Исполь­зу­ет­ся для адми­ни­стри­ро­ва­ния локаль­ных и уда­лен­ных VPN-сер­ве­ров. Явля­ет­ся самым удоб­ным сред­ством адми­ни­стри­ро­ва­ния и управ­ле­ния. Уста­нав­ли­ва­ет­ся отдельно.
  • vpncmd — ути­ли­та адми­ни­стри­ро­ва­ния команд­ной стро­ки, как в  тер­ми­на­лах UNIX-систем, так и в команд­ной стро­ке Windows. В UNIX-систе­мах ста­вит­ся вме­сте с сер­ве­ром. В Windows идет в ком­плек­те с VPN Server Manager.
  • Client — кли­ент для под­клю­че­ния к сети VPN.

Уста­но­вим ути­ли­ты для компилирования.

  • # В CentOS
  • yum groupinstall -y «Development Tools»
  • # В Ubuntu/Debian
  • apt-get install -y build-essential

Пере­хо­дим в ката­лог /usr/local.

  • cd /usr/local

Пере­хо­дим на сайт SoftEther, выби­ра­ем нуж­ное и копи­ру­ем полу­чен­ную ссылку.

Ска­чи­ва­ем исход­ни­ки SoftEther.

  • wget http://www.softether-download.com/files/softether/v4.27-9666-beta-2018.04.21-tree/Linux/SoftEther_VPN_Server/64bit_-_Intel_x64_or_AMD64/softether-vpnserver-v4.27-9666-beta-2018.04.21-linux-x64-64bit.tar.gz

Рас­па­ко­вы­ва­ем ска­чан­ный архив.

  • tar -zxvf softether-vpnserver-v4.279666-beta-2018.04.21-linux-x64-64bit.tar.gz

Пере­хо­дим в ката­лог vpnserver.

  • cd vpnserver

Ком­пи­ли­ру­ем и устанавливаем.

  • make

Во вре­мя уста­нов­ки будет задан ряд вопро­сов, отве­чать сле­ду­ет положительно.

  • Do you want to read the License Agreement for this software ?
  • 1. Yes
  • 2. No
  • Please choose one of above number: 
  • 1
  • Did you read and understand the License Agreement ?
  • (If you couldn‘t read above text, Please read ‘ReadMeFirst_License.txt’
  • file with any text editor.)
  • 1. Yes
  • 2. No
  • Please choose one of above number: 
  • 1
  • Did you agree the License Agreement ?
  • 1. Agree
  • 2. Do Not Agree
  • Please choose one of above number: 
  • 1

Нахо­дясь внут­ри ката­ло­га vpnserver зада­дим пра­ва досту­па для файлов.

  • chmod 600 *
  • chmod 700 vpnserver
  • chmod 700 vpncmd

Про­ве­дем про­вер­ку систе­мы на сов­ме­сти­мость с SoftEther. Что­бы про­ве­сти про­вер­ку нуж­но попасть в кон­соль управ­ле­ния vpncmd.

  • # Что­бы попасть в консоль
  • ./vpncmd
  • # На выбор будет пред­ло­же­но три раздела
  • 1. Management of VPN Server or VPN Bridge 
  • 2. Management of VPN Client
  • 3. Use of VPN Tools (certificate creation and Network Traffic Speed Test Tool)
  • # Нам нужен раз­дел VPN Tools (3 + Enter)
  • Select 1, 2 or 3: 3
  • # Выпол­ня­ем коман­ду check для проверки
  • VPN Tools>check
  • Check command — Check whether SoftEther VPN Operation is Possible
  • —————————————————
  • SoftEther VPN Operation Environment Check Tool
  • Copyright (c) SoftEther VPN Project.
  • All Rights Reserved.
  • If this operation environment check tool is run on a system and that system passes, it is most likely that SoftEther VPN software can operate on that system. This check may take a while. Please wait…
  • Checking ‘Kernel System’
  • Pass
  • Checking ‘Memory Operation System’
  • Pass
  • Checking ANSI / Unicode string processing system’
  • Pass
  • Checking ‘File system’
  • Pass
  • Checking ‘Thread processing system’
  • Pass
  • Checking ‘Network system’
  • Pass
  • All checks passed. It is most likely that SoftEther VPN Server / Bridge can operate normally on this system.
  • The command completed successfully.

«All checks passed» озна­ча­ет что тесты прой­де­ны и Softether может рабо­тать в систе­ме. Для выхо­да из кон­со­ли исполь­зу­ют коман­ды: exit, quit или соче­та­ние кла­виш Ctrl+C.

Настройка SoftEther в консоли управления

SoftEther уста­нов­лен и может рабо­тать в систе­ме. Теперь нуж­но про­ве­сти началь­ную настрой­ку, а что­бы про­ве­сти настрой­ку нуж­но запу­стить SoftEther.

Выпол­ня­ем коман­ду ./vpnserver start нахо­дясь внут­ри ката­ло­га /usr/local/vpnserver.

  • ./vpnserver start

Вхо­дим в кон­соль управления.

  • # Что­бы попасть в консоль
  • ./vpncmd
  • # На выбор будет пред­ло­же­но три раздела
  • 1. Management of VPN Server or VPN Bridge 
  • 2. Management of VPN Client
  • 3. Use of VPN Tools (certificate creation and Network Traffic Speed Test Tool)
  • # Нам нужен раз­дел Management of VPN Server or VPN Bridge (1 + Enter)
  • Select 1, 2 or 3: 1

Vpncmd поз­во­ля­ет адми­ни­стри­ро­вать не толь­ко локаль­ные, но и уда­лен­ные сер­ве­ра. В нашем слу­чае нуж­но настро­ить локаль­ный сер­вер, поэто­му в стро­ке Hostname of IP Address of Destination вво­дим localhost и нажи­ма­ем Enter.

  • Hostname of IP Address of Destination: localhost

По умол­ча­нию соеди­не­ние уста­нав­ли­ва­ет­ся на 443 пор­ту. Если вдруг 443 порт занят дру­гой про­грам­мой, такое быва­ет если SoftEther уста­нов­лен не на чистую систе­му, то вой­ти в кон­соль не получится.

  • Error occurred. (Error code: 2)
  • Protocol error occurred. Error was returned from the destination server.

В таком слу­чае к зна­че­нию localhost через двое­то­чие добав­ля­ют нуж­ный порт. Кро­ме 443-го пор­та SoftEther слу­ша­ет еще три: 992, 1194 и 5555. Мож­но ука­зать любой из них.

  • Hostname of IP Address of Destination: localhost:992

Нам будет пред­ло­же­но вве­сти имя вир­ту­аль­но­го хаба, но посколь­ку он еще не создан, то про­сто нажи­ма­ем Enter и ока­зы­ва­ем­ся в кон­со­ли управ­ле­ния сервером.

  • Connection has been established with VPN Server «localhost» (port 443).
  • You have administrator privileges for the entire VPN Server.
  • VPN Server>

Управ­ле­ние сер­ве­ром осу­ществ­ля­ет­ся посред­ством опре­де­лен­ных команд (205 штук). Спи­сок команд мож­но про­смот­реть через —help.

Установка пароля администратора

Пер­вым делом уста­но­вим пароль адми­ни­стра­то­ра (ServerPasswordSet).

  • VPN Server>ServerPasswordSet
  • ServerPasswordSet command — Set VPN Server Administrator Password
  • Please enter the password. To cancel press the Ctrl+D key.
  • Password: ******
  • Confirm input: ******
  • The command completed successfully.

Создание виртуального хаба

Вир­ту­аль­ный хаб пред­став­ля­ет собой подо­бие сер­ве­ра со сво­и­ми настрой­ка­ми, про­то­ко­ла­ми VPN, сво­и­ми поль­зо­ва­те­ля­ми и адми­ни­стра­то­ра­ми, а так­же со сво­и­ми настрой­ка­ми без­опас­но­сти. На одном сер­ве­ре может быть созда­но до 4096 вир­ту­аль­ных хабов. Хабы не кон­так­ти­ру­ют друг с дру­гом, за исклю­че­ни­ем слу­ча­ев когда их спе­ци­аль­но объ­еди­ня­ют в мосты.

По умол­ча­нию на сер­ве­ре уже есть дефолт­ный хаб (DEFAULT), уда­лим его (HubDelete) и созда­дим свой. Во вре­мя выпол­не­ния будет запро­ше­но имя хаба для удаления.

  • VPN Server>HubDelete
  • HubDelete command — Delete Virtual Hub
  • Name of Virtual Hub to delete: DEFAULT
  • The command completed successfully.

Созда­дим новый вир­ту­аль­ный хаб (HubCreate). Зада­дим имя ново­го хаба и пароль.

  • VPN Server>HubCreate
  • HubCreate command — Create New Virtual Hub
  • Name of Virtual Hub to be created: VPN_1
  • Please enter the password. To cancel press the Ctrl+D key.
  • Password: ******
  • Confirm input: ******
  • The command completed successfully.

Спи­сок доступ­ных хабов мож­но про­смот­реть коман­дой HubList. Коман­да пока­зы­ва­ет не толь­ко хабы, но и их статистику.

  • VPN Server>HubList
  • HubList command — Get List of Virtual Hubs
  • Item |Value
  • ——————+——————-
  • Virtual Hub Name |VPN_1
  • Status |Online
  • Type |Standalone
  • Users |0
  • Groups |0
  • Sessions |0
  • MAC Tables |0
  • IP Tables |0
  • Num Logins |0
  • Last Login |20180510 05:12:36
  • Last Communication|20180510 05:12:36
  • Transfer Bytes |0
  • Transfer Packets |0
  • The command completed successfully.

Настро­им создан­ный хаб (Hub). Через про­бел ука­зы­ва­ем имя хаба для настройки.

  • VPN Server>Hub VPN_1
  • Hub command — Select Virtual Hub to Manage
  • The Virtual Hub «VPN_1« has been selected.
  • The command completed successfully.

Кон­соль управ­ле­ния хабом.

  • VPN Server/VPN_1>

Созда­дим поль­зо­ва­те­ля (UserCreate). Груп­пу, пол­ное имя и опи­са­ние запол­ня­ем по жела­нию (мож­но про­пу­стить нажав Enter).

  • VPN Server/VPN_1>UserCreate
  • UserCreate command — Create User 
  • User Name: denni
  • Assigned Group Name: 
  • User Full Name: 
  • User Description:
  • The command completed successfully.

Зада­дим пароль поль­зо­ва­те­ля (UserPasswordSet).

  • VPN Server/VPN_1>UserPasswordSet
  • UserPasswordSet command — Set Password Authentication for User Auth Type and Set Password
  • User Name: denni
  • Please enter the password. To cancel press the Ctrl+D key.
  • Password: ******
  • Confirm input: ******
  • The command completed successfully.

Создание локального моста

Посколь­ку Local Bridge рабо­та­ет сов­мест­но с TAP устрой­ством, то дан­ный шаг могут про­пу­стить те поль­зо­ва­те­ли, чьи VPS/VDS не под­дер­жи­ва­ют драй­ве­ра TUN/TAP. Такие поль­зо­ва­те­ли в даль­ней­шем будут исполь­зо­вать режим SecureNAT.

Для созда­ния Local Bridge исполь­зу­ет­ся коман­да BridgeCreate, син­так­сис выгля­дит сле­ду­ю­щим образом.

  • BridgeCreate hubname -device:devicename -tap:yes
  • hubname — имя хаба (VPN_1)
  • devicename — имя tap-устрой­ства, напри­мер vpn
  • -tap:yes — вклю­че­ние tap-устройства

Напри­мер так.

  • BridgeCreate VPN_1 -device:vpn -tap:yes

Спи­сок и ста­тус мостов мож­но про­смот­реть коман­дой Bridgelist. Если в ста­ту­се висит зна­че­ние Operating, это зна­чит что все в поряд­ке и мост готов к работе.

VPN Server/VPN_1>Bridgelist

BridgeList command Get List of Local Bridge Connection

Number|Virtual Hub Name|Network Adapter or Tap Device Name|Status

+-+-+

1     |VPN_1           |vpn                               |Operating

После того как Local Bridge создан, в систе­ме дол­жен появить­ся интер­фейс tap_vpn.

  • ifconfig tap_vpn
  • tap_vpn: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
  • inet6 fe80::2ac:4dff:fe2f:c83f prefixlen 64 scopeid 0x20<link>
  • ether 00:ac:4d:2f:c8:3f txqueuelen 1000 (Ethernet)
  • RX packets 902 bytes 77572 (75.7 KiB)
  • RX errors 0 dropped 0 overruns 0 frame 0
  • TX packets 2263 bytes 187362 (182.9 KiB)
  • TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

Как мож­но видеть tap интер­фейс пока еще не име­ет IPv4 адре­са, это нор­маль­но, адрес зада­дим позже.

Если CentOS руга­ет­ся на отсут­ствие ifconfig, то нуж­но поста­вить. В Debian/Ubuntu пакет при­сут­ству­ет по умолчанию.

  • yum install -y net-tools

Автозапуск VPN Server

Запус­кать сер­вер вруч­ную неудоб­но. Напи­шем скрипт для авто­за­пус­ка сервера.

  • # Пере­хо­дим в /usr/local/vpnserver
  • cd /usr/local/vpnserver
  • # Оста­нав­ли­ва­ем vpnserver.
  • ./vpnserver stop

Созда­ем скрипт (vpnserver) в ката­ло­ге /etc/init.d.

  • nano /etc/init.d/vpnserver

Скрипт автозапуска для CentOS

Содер­жи­мое скрип­та для CentOS.

[codesyntax lang=»php»]

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

#!/bin/sh

# chkconfig: 2345 99 01

# description: SoftEther VPN Server

DAEMON=/usr/local/vpnserver/vpnserver

LOCK=/var/lock/subsys/vpnserver

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

[/codesyntax]

Пра­ва досту­па на файл скрипта.

  • chmod 755 /etc/init.d/vpnserver

Доба­вим скрипт в автозапуск.

  • chkconfig —add vpnserver

Запу­стим vpnserver с помо­щью systemctl.

  • systemctl start vpnserver

Про­ве­рим как работает.

  • systemctl status vpnserver
  • ● vpnserver.service — SYSV: SoftEther VPN Server
  • Loaded: loaded (/etc/rc.d/init.d/vpnserver; bad; vendor preset: disabled)
  • Active: active (running) since Mon 20170925 22:02:58 EDT; 3min 59s ago
  • Docs: man:systemd-sysv-generator(8)
  • Process: 21190 ExecStart=/etc/rc.d/init.d/vpnserver start (code=exited, status=0/SUCCESS)
  • CGroup: /system.slice/vpnserver.service
  • ├─21193 /usr/local/vpnserver/vpnserver execsvc
  • └─21194 /usr/local/vpnserver/vpnserver execsvc
  • Sep 25 22:02:58 tech systemd[1]: Starting SYSV: SoftEther VPN Server…
  • Sep 25 22:02:58 tech vpnserver[21190]: The SoftEther VPN Server service has been started.
  • Sep 25 22:02:58 tech systemd[1]: Started SYSV: SoftEther VPN Server.

Скрипт автозапуска для Ubuntu/Debian

Содер­жи­мое скрип­та для Ubuntu/Debian.

[codesyntax lang=»php»]

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

#!/bin/sh

### BEGIN INIT INFO

# Provides:          vpnserver

# Required-Start:    $remote_fs $syslog

# Required-Stop:     $remote_fs $syslog

# Default-Start:     2 3 4 5

# Default-Stop:      0 1 6

# Short-Description: Start daemon at boot time

# Description:       Enable Softether by daemon.

### END INIT INFO

DAEMON=/usr/local/vpnserver/vpnserver

LOCK=/var/lock/subsys/vpnserver

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

[/codesyntax]

Пра­ва досту­па на файл скрипта.

  • chmod 755 /etc/init.d/vpnserver

Доба­вим скрипт в автозапуск.

  • update-rc.d vpnserver defaults

Запу­стим vpnserver с помо­щью systemctl.

  • systemctl start vpnserver

Про­ве­рим как работает.

  • systemctl status vpnserver
  • ● vpnserver.service — LSB: Start daemon at boot time
  • Loaded: loaded (/etc/init.d/vpnserver; bad; vendor preset: enabled)
  • Active: active (running) since Tue 20170926 06:44:16 MSK; 56s ago
  • Docs: man:systemd-sysv-generator(8)
  • Process: 9087 ExecStart=/etc/init.d/vpnserver start (code=exited, status=0/SUCCESS)
  • Tasks: 33
  • Memory: 14.2M
  • CPU: 429ms
  • CGroup: /system.slice/vpnserver.service
  • ├─9092 /usr/local/vpnserver/vpnserver execsvc
  • └─9093 /usr/local/vpnserver/vpnserver execsvc
  • Sep 26 06:44:16 local systemd[1]: Starting LSB: Start daemon at boot time…
  • Sep 26 06:44:16 local vpnserver[9087]: The SoftEther VPN Server service has been started.
  • Sep 26 06:44:16 local systemd[1]: Started LSB: Start daemon at boot time.

Теперь vpnserver будет стар­то­вать само­сто­я­тель­но после вклю­че­ния или пере­за­груз­ки систе­мы и управ­лять­ся стан­дарт­ны­ми systemctl-командами.

Сетевые режимы SoftEther VPN Server

У SoftEther есть два меха­низ­ма пере­да­чи тра­фи­ка: SecureNAT и Local Bridge.

SecureNAT

SecureNAT — соб­ствен­ная тех­но­ло­гия SoftEther, созда­ю­щая закры­тую сеть и состо­я­щая из двух частей: вир­ту­аль­но­го NAT и вир­ту­аль­но­го DHCP-сервера.

SecureNAT не тре­бо­ва­те­лен к типу вир­ту­а­ли­за­ции VPS/VDS сер­ве­ров, так как рабо­та­ет без TUN/TAP. Для SecureNAT не нуж­на настрой­ка iptables или дру­го­го фаер­во­ла, кро­ме откры­тия пор­та на кото­ром будут при­ни­мать­ся соеди­не­ния от клиентов.

Марш­ру­ти­за­ция тра­фи­ка осу­ществ­ля­ет­ся не затра­ги­вая ядра систе­мы. Все про­цес­сы пол­но­стью вир­ту­а­ли­зи­ро­ва­ны. Отсю­да воз­ни­ка­ют мину­сы режи­ма, повы­шен­ная нагруз­ка на про­цес­сор и поте­ря в ско­ро­сти, если срав­ни­вать с Local Bridge.

Поль­зо­ва­те­лю нуж­но толь­ко вклю­чить режим, под­клю­чить кли­ент, после чего мож­но начи­нать поль­зо­вать­ся VPN.

Активация режима SecureNAT

Что­бы вклю­чить режим SecureNAT перей­дем в кон­соль управ­ле­ния хабом и выпол­ним коман­ду SecureNatEnable.

  • VPN Server/VPN_1>SecureNatEnable
  • SecureNatEnable command — Enable the Virtual NAT and DHCP Server Function (SecureNat Function)
  • The command completed successfully.

Узнать теку­щий ста­тус мож­но коман­дой SecureNatStatusGet.

VPN Server/VPN_1&gt;SecureNatStatusGet

SecureNatStatusGet command Get the Operating Status of the Virtual NAT and DHCP Server Function (SecureNat Function)

Item                     |Value

-+

Virtual Hub Name         |VPN_1

NAT TCP/IP Sessions      |40 Session

NAT UDP/IP Sessions      |5 Session

NAT ICMP Sessions        |0 Session

NAT DNS Sessions         |0 Session

Allocated DHCP Clients   |1 Client

Kernel-mode NAT is Active|Yes

Raw IP mode NAT is Active|Yes

The command completed successfully.

Коман­да пока­зы­ва­ет коли­че­ство сес­сий, под­клю­чен­ных кли­ен­тов и теку­щий ста­тус SecureNAT. Зна­че­ния «Yes» гово­рят что режим SecureNAT сей­час активен.

Как я уже писал выше, SecureNAT не тре­бу­ет настрой­ки фаер­во­ла для марш­ру­ти­за­ции тра­фи­ка. Доста­точ­но про­сто открыть порт, на кото­ром vpnserver будет при­ни­мать вхо­дя­щие соеди­не­ния от клиентов.

Доба­вим пра­ви­ло iptables откры­ва­ю­щее 443 порт (или любой другой).

  • iptables -A INPUT -p tcp -m tcp —dport 443 -j ACCEPT

Мож­но уста­нав­ли­вать кли­ент, под­клю­чать­ся к сер­ве­ру, и начи­нать исполь­зо­вать VPN или немно­го почи­тать про сете­вые настрой­ки SecureNAT.

Обзор сетевых настроек SecureNAT

Пре­ду­пре­ждаю, не сто­ит менять дефолт­ные настрой­ки, если не зна­е­те что дела­е­те. Там без вас уже все настро­е­но. В про­тив­ном слу­чае вас могут ожи­дать непри­ят­ные последствия.

Теку­щие сете­вые настрой­ки мож­но узнать коман­дой SecureNatHostGet.

VPN Server/VPN_1&gt;SecureNatHostGet

SecureNatHostGet command Get Network Interface Setting of Virtual Host of SecureNAT Function

Item       |Value

—+

MAC Address|5E-98-F1-B0-E4-9E

IP Address |192.168.30.1

Subnet Mask|255.255.255.0

The command completed successfully.

По умол­ча­нию SecureNAT исполь­зу­ет под­сеть 192.168.30.0/24.

Дан­ная под­сеть не отно­сит­ся толь­ко к SecureNAT, она так­же исполь­зу­ет­ся и в режи­ме Local Bridge. Это соб­ствен­ная под­сеть вир­ту­аль­но­го хаба. Так что если воз­ник­нет необ­хо­ди­мость в изме­не­нии под­се­ти для моста, то это дела­ет­ся здесь.

Адрес под­се­ти мож­но изме­нить коман­дой SecureNatHostSet.

VPN Server/VPN_1&gt;SecureNatHostSet

SecureNatHostSet command Change Network Interface Setting of Virtual Host of SecureNAT Function

MAC Address:

IP Address: 192.168.100.1  

Subnet Mask: 255.255.255.0  

The command completed successfully.

Теперь мы исполь­зу­ем под­сеть 192.168.100.0/24.

VPN Server/VPN_1&gt;SecureNatHostGet

SecureNatHostGet command Get Network Interface Setting of Virtual Host of SecureNAT Function

Item       |Value

—+

MAC Address|5E-98-F1-B0-E4-9E

IP Address |192.168.100.1

Subnet Mask|255.255.255.0

The command completed successfully.

Кли­ент под­клю­ча­ю­щий­ся к хабу полу­ча­ет ip-адрес из диа­па­зо­на его под­се­ти. Раз­да­чей адре­сов управ­ля­ет вир­ту­аль­ный DHCP-сер­вер. Про­смот­реть теку­щие настрой­ки DHCP мож­но коман­дой DhcpGet.

VPN Server/VPN_1&gt;DhcpGet

DhcpGet command Get Virtual DHCP Server Function Setting of SecureNAT Function

Item                           |Value

-+

Use Virtual DHCP Function      |Yes

Start Distribution Address Band|192.168.30.10

End Distribution Address Band  |192.168.30.200

Subnet Mask                    |255.255.255.0

Lease Limit (Seconds)          |7200

Default Gateway Address        |192.168.30.1

DNS Server Address 1           |192.168.30.1

DNS Server Address 2           |None

Domain Name                    |

Save NAT and DHCP Operation Log|Yes

Static Routing Table to Push   |

The command completed successfully.

Изме­ним теку­щие настрой­ки под новую 192.168.100.0/24 под­сеть (DhcpSet).

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

VPN Server/VPN_1&gt;DhcpSet

DhcpSet command Change Virtual DHCP Server Function Setting of SecureNAT Function

Start Point for Distributed Address Band: 192.168.100.10

End Point for Distributed Address Band: 192.168.100.100

Subnet Mask: 255.255.255.0

Lease Limit (Seconds): 7200

Default Gateway (‘none’ to not set this): 192.168.100.1

DNS Server 1 (‘none’ to not set this): 192.186.100.1

DNS Server 2 (‘none’ to not set this): 8.8.8.8

Domain Name: myvpn

Save Log (yes / no): no

The command completed successfully.

Я задал диа­па­зон выда­ва­е­мых адре­сов с 192.168.100.10 по 192.168.100.100, мас­ку под­се­ти, шлюз и DNS-сер­ве­ра. Lease Limit (срок арен­ды) оста­вил по умолчанию.

Новые настрой­ки DHCP теперь выгля­дят так.

VPN Server/VPN_1&gt;DhcpGet

DhcpGet command Get Virtual DHCP Server Function Setting of SecureNAT Function

Item                           |Value

-+

Use Virtual DHCP Function      |Yes

Start Distribution Address Band|192.168.100.10

End Distribution Address Band  |192.168.100.100

Subnet Mask                    |255.255.255.0

Lease Limit (Seconds)          |7200

Default Gateway Address        |192.168.100.1

DNS Server Address 1           |192.186.100.1

DNS Server Address 2           |8.8.8.8

Domain Name                    |myvpn

Save NAT and DHCP Operation Log|No

Static Routing Table to Push   |

The command completed successfully.

Если сей­час под­клю­чить­ся к VPN, открыть команд­ную стро­ку Windows и выпол­нить коман­ду ipconfig, то мож­но уви­деть сле­ду­ю­щую картину.

Ком­пью­тер теперь име­ет адрес 192.168.100.10, шлю­зом высту­па­ет 192.168.100.1, сеть назы­ва­ет­ся «myvpn». Как и было зада­но при настройке.

DHCP-сер­вер мож­но отклю­чить, коман­да DhcpDisable.

Если забыть вклю­чить DHCP, то адре­са кли­ен­там выда­вать­ся не будут, но кли­ент все рав­но будет под­клю­чен к сер­ве­ру. При этом тра­фик будет идти с ваше­го основ­но­го адре­са. Невни­ма­тель­ный поль­зо­ва­тель будет уве­рен что скры­ва­ет свой IP, но на самом деле это не так. По умол­ча­нию DHCP вклю­чен все­гда и луч­ше его не трогать.

Отключение SecureNAT

Для выклю­че­ния SecureNAT коман­да SecureNatDisable.

VPN Server/VPN_1&gt;SecureNatDisable

SecureNatDisable command Disable the Virtual NAT and DHCP Server Function (SecureNat Function)

The command completed successfully.

Отклю­чен­ный SecureNAT.

VPN Server/VPN_1&gt;SecureNatStatusGet

SecureNatStatusGet command Get the Operating Status of the Virtual NAT and DHCP Server Function (SecureNat Function)

Item                     |Value

-+

Virtual Hub Name         |VPN_1

NAT TCP/IP Sessions      |0 Session

NAT UDP/IP Sessions      |0 Session

NAT ICMP Sessions        |0 Session

NAT DNS Sessions         |0 Session

Allocated DHCP Clients   |0 Client

Kernel-mode NAT is Active|No

Raw IP mode NAT is Active|No

The command completed successfully.

Local Bridge

Local Bridge пол­но­стью отли­ча­ет­ся от SecureNAT. Это­му режи­му тре­бу­ет­ся под­держ­ка TUN/TAP устройств, поэто­му его мож­но исполь­зо­вать не на всех VPS/VDS, а толь­ко на име­ю­щих воз­мож­ность их загруз­ки. Кро­ме того, вся настрой­ка Local Bridge, от нача­ла и до кон­ца, дела­ет­ся ручками.

Плю­са­ми Local Bridge явля­ют­ся более высо­кая ско­рость, надеж­ность и безопасность.

Local Bridge соеди­ня­ет хаб с физи­че­ским или tap-адап­те­ром. Марш­ру­ти­за­ция тра­фи­ка про­ис­хо­дит в ядре систе­мы с помо­щью netfilter/iptables.

DHCP для Local Bridge

Local Bridge не име­ет сво­е­го DHCP сер­ве­ра, поэто­му при­хо­дит­ся уста­нав­ли­вать еще и DHCP сер­ве­ра. В CentOS уста­нав­ли­ва­ют dhcp, в Ubuntu/Debian уста­нав­ли­ва­ют isc-dhcp-server.

Уста­но­вим dhcp для CentOS.

  • yum install -y dhcp

Уста­но­вим isc-dhcp-server для Ubuntu/Debian.

  • apt-get install -y isc-dhcp-server

Отре­дак­ти­ру­ем файл настро­ек dhcp-сер­ве­ра, он оди­на­ков везде.

  • nano /etc/dhcp/dhcpd.conf

Содер­жи­мое фай­ла dhcpd.conf.

[codesyntax lang=»php»]

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

option domain-name «myvpn»;

option domain-name-servers 192.168.30.1;

default-lease-time 43200;

max-lease-time 86400;

log-facility local7;

subnet 192.168.30.0 netmask 255.255.255.0 {

range 192.168.30.10 192.168.30.200;

option routers 192.168.30.1;

}

# Если нуж­но выда­вать кли­ен­ту посто­ян­ный ip-адрес

# То мож­но сде­лать при­вяз­ку по MAC 

# Рас­ком­мен­ти­руй­те стро­ки, задай­те жела­е­мый ip 

# Про­пи­ши­те MAC-адрес адап­те­ра, кото­рый будет создан после уста­нов­ки клиента

#host home {

#hardware ethernet XX:XX:XX:XX:XX:XX;

#fixed-address XXX.XXX.XXX.XX;

#}

[/codesyntax]

Если вы про­чи­та­ли про сете­вые настрой­ки SecureNAT, то ско­рее все­го поня­ли отку­да я взял зна­че­ния для dhcp-сер­ве­ра, так как под­сеть оди­на­ко­ва для обо­их режимов.

Исхо­дя из адре­са дефолт­ной под­се­ти (192.168.30.0/24), я задал сле­ду­ю­щие значения:

  • domain-name — имя сети, может быть любым.
  • domain-name-servers — адре­са DNS, мож­но ука­зать адрес шлю­за или пря­мой адрес пред­по­чи­та­е­мо­го сер­ве­ра. (192.168.30.1)
  • default-lease-time — срок арен­ды ip-адре­са кли­ен­том, если кли­ент само­сто­я­тель­но не ука­зы­ва­ет срок арен­ды адреса.
  • max-lease-time — мак­си­маль­ный срок арен­ды адре­са клиентом.
  • subnet — адрес под­се­ти (192.168.30.0)
  • netmask — мас­ка под­се­ти (255.255.255.0)
  • range — диа­па­зон адре­сов для выда­чи (от 192.168.30.10 и до 192.168.30.200)
  • option routers — шлюз (192.168.30.1)

Зна­че­ния «lease-time» зада­ют­ся в секун­дах, я задал 12 и 24 часа соот­вет­ствен­но. Если выста­вить малень­кие зна­че­ния, то по исте­че­нию сро­ка соеди­не­ние будет раз­ры­вать­ся, что не есть хоро­шо при дли­тель­ной работе.

Сде­ла­ем интер­фейс tap_vpn шлю­зом под­се­ти, назна­чив ему адрес 192.168.30.1

  • ifconfig tap_vpn 192.168.30.1

Про­ве­рим интерфейс.

ifconfig tap_vpn

tap_vpn: flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST&gt;  mtu 1500

        inet 192.168.30.1  netmask 255.255.255.0  broadcast 192.168.30.255

        inet6 fe80::2ac:4dff:fe2f:c83f  prefixlen 64  scopeid 0x20&lt;link&gt;

        ether 00:ac:4d:2f:c8:3f  txqueuelen 1000  (Ethernet)

        RX packets 35  bytes 3010 (2.9 KiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 94  bytes 7764 (7.5 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Запу­стим dhcp-сервер.

  • CentOS
  • systemctl start dhcpd
  • Ubuntu/Debian
  • systemctl start isc-dhcp-server

Про­ве­рим как рабо­та­ет в CentOS (systemctl status dhcpd)

systemctl status dhcpd

dhcpd.service DHCPv4 Server Daemon

   Loaded: loaded (/usr/lib/systemd/system/dhcpd.service; disabled; vendor preset: disabled)

   Active: active (running) since Thu 2018-05-10 22:46:40 MSK; 40s ago

     Docs: man:dhcpd(8)

           man:dhcpd.conf(5)

Main PID: 2297 (dhcpd)

   Status: «Dispatching packets…»

   CGroup: /system.slice/dhcpd.service

           └─2297 /usr/sbin/dhcpd -f -cf /etc/dhcp/dhcpd.conf -user dhcpd -group dhcpd —no-pid

Sep 26 05:14:06 tech dhcpd[2297]: Sending on   LPF/tap_vpn/00:ac:4d:2f:c8:3f/192.168.30.0/24

Про­ве­рим как рабо­та­ет в Debian/Ubuntu (systemctl status isc-dhcp-server)

systemctl status isc-dhcp-server

isc-dhcp-server.service ISC DHCP IPv4 server

   Loaded: loaded (/lib/systemd/system/isc-dhcp-server.service; enabled; vendor preset: enabled)

   Active: active (running) since Thu 2018-05-10 22:46:40 MSK; 40s ago

     Docs: man:dhcpd(8)

Main PID: 2936 (dhcpd)

    Tasks: 1

   Memory: 9.0M

      CPU: 33ms

   CGroup: /system.slice/isc-dhcp-server.service

           └─2936 dhcpd -user dhcpd -group dhcpd -f -4 -pf /run/dhcp-server/dhcpd.pid -cf /etc/dhcp/dhcpd.conf

Автозапуск DHCP при старте vpnserver

Сде­ла­ем загруз­ку DHCP сер­ве­ра зави­ся­щей от загруз­ки vpnserver. Во пер­вых, что­бы не назна­чать адрес tap-интер­фей­са вруч­ную, а, во вто­рых, что­бы не запус­кать вруч­ную dhcp-сер­вер после каж­дой пере­за­груз­ки или вклю­че­ния машины.

Для это­го доба­вим две коман­ды непо­сред­ствен­но в скрипт авто­за­пус­ка vpnserver.

  • ifconfig tap_vpn 192.168.30.1
  • systemctl restart dhcpd или isc-dhcp-server

Отре­дак­ти­ру­ем скрипт /etc/init.d/vpnserver.

  • nano /etc/init.d/vpnserver

При­во­дим содер­жи­мое скрип­та к сле­ду­ю­ще­му виду в CentOS.

[codesyntax lang=»php»]

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

#!/bin/sh

# chkconfig: 2345 99 01

# description: SoftEther VPN Server

DAEMON=/usr/local/vpnserver/vpnserver

LOCK=/var/lock/subsys/vpnserver

test -x $DAEMON || exit 0

case «$1» in

start)

$DAEMON start

touch $LOCK

sleep 3

ifconfig tap_vpn 192.168.30.1

systemctl restart dhcpd

;;

stop)

$DAEMON stop

rm $LOCK

;;

restart)

$DAEMON stop

sleep 3

$DAEMON start

sleep 3

ifconfig tap_vpn 192.168.30.1

systemctl restart dhcpd

;;

*)

echo «Usage: $0 {start|stop|restart}»

exit 1

esac

exit 0

[/codesyntax]

При­во­дим содер­жи­мое скрип­та к сле­ду­ю­ще­му виду в Ubuntu/Debian.

[codesyntax lang=»php»]

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

#!/bin/sh

### BEGIN INIT INFO

# Provides:          vpnserver

# Required-Start:    $remote_fs $syslog

# Required-Stop:     $remote_fs $syslog

# Default-Start:     2 3 4 5

# Default-Stop:      0 1 6

# Short-Description: Start daemon at boot time

# Description:       Enable Softether by daemon.

### END INIT INFO

DAEMON=/usr/local/vpnserver/vpnserver

LOCK=/var/lock/subsys/vpnserver

test -x $DAEMON || exit 0

case «$1» in

start)

$DAEMON start

touch $LOCK

sleep 3

ifconfig tap_vpn 192.168.30.1

systemctl restart isc-dhcp-server

;;

stop)

$DAEMON stop

rm $LOCK

;;

restart)

$DAEMON stop

sleep 3

$DAEMON start

sleep 3

ifconfig tap_vpn 192.168.30.1

systemctl restart isc-dhcp-server

;;

*)

echo «Usage: $0 {start|stop|restart}»

exit 1

esac

exit 0

[/codesyntax]

Выпол­ня­ем systemctl daemon-reload, что­бы при­нять изме­не­ния в скриптах.

  • systemctl daemon-reload

Пере­за­гру­жа­ем vpnserver или систему.

  • systemctl restart vpnserver
  • или
  • reboot

Сра­зу после загрузки/перезагрузки про­ве­ря­ем интер­фейс и dhcp.

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

ifconfig tap_vpn

tap_vpn: flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST&gt;  mtu 1500

        inet 192.168.30.1  netmask 255.255.255.0  broadcast 192.168.30.255

        inet6 fe80::2ac:4dff:fe2f:c83f  prefixlen 64  scopeid 0x20&lt;link&gt;

        ether 00:ac:4d:2f:c8:3f  txqueuelen 1000  (Ethernet)

        RX packets 12  bytes 1032 (1.0 KiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 38  bytes 3132 (3.0 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

systemctl status isc-dhcp-server

isc-dhcp-server.service ISC DHCP IPv4 server

   Loaded: loaded (/lib/systemd/system/isc-dhcp-server.service; enabled; vendor preset: enabled)

   Active: active (running) since Thu 2018-05-10 23:10:33 MSK; 1min 11s ago

     Docs: man:dhcpd(8)

Main PID: 1417 (dhcpd)

    Tasks: 1

   Memory: 9.0M

      CPU: 16ms

   CGroup: /system.slice/isc-dhcp-server.service

           └─1417 dhcpd -user dhcpd -group dhcpd -f -4 -pf /run/dhcp-server/dhcpd.pid -cf /etc/dhcp/dhcpd.conf

Форвардинг пакетов и iptables

Вклю­чим фор­вар­динг паке­тов и доба­вим пра­ви­ла для марш­ру­ти­за­ции трафика.

Фор­вар­динг пакетов.

  • echo net.ipv4.ip_forward = 1 >> /etc/sysctl.conf
  • sysctl -p

Пра­ви­ла iptables.

  • # Нати­ру­ем тра­фик из под­се­ти 192.168.30.0/24 на основ­ной IP сервера
  • iptables -t nat -A POSTROUTING -s 192.168.30.0/24 -j SNAT —to-source ВАШ.IP.АД.РЕС
  • # Раз­ре­ша­ем про­хо­дя­щие паке­ты из под­се­ти 192.168.30.0/24
  • iptables -A FORWARD -s 192.168.30.0/24 -j ACCEPT
  • # Раз­ре­ша­ем про­хо­дя­щие паке­ты для уже уста­нов­лен­ных соединений
  • iptables -A FORWARD -p all -m state —state ESTABLISHED,RELATED -j ACCEPT

Если все сде­ла­но пра­виль­но, мож­но под­клю­чать­ся и начи­нать поль­зо­вать­ся соб­ствен­ным VPN. Уста­нов­ка и настрой­ка на этом завершены.

Содержание

  1. Softether protocol error occurred error was returned from the destination server
  2. Re: Help: Error Code 2
  3. Re: Help: Error Code 2
  4. Softether protocol error occurred error was returned from the destination server
  5. Softether protocol error occurred error was returned from the destination server
  6. Softether protocol error occurred error was returned from the destination server
  7. Centos
  8. Установка SoftEther VPN Server
  9. Настройка SoftEther в консоли управления
  10. Установка пароля администратора
  11. Создание виртуального хаба
  12. Создание локального моста

Softether protocol error occurred error was returned from the destination server

Post by LordBadon » Wed Sep 17, 2014 9:45 pm

Hi, I am running the latest version of SoftEther VPN Client on my Windows 8 PC. It was working fine until about a week ago when I started getting an error saying this:

«Error (Error Code 2):
Protocol error occurred. Error was returned from the destination server.»

I have ran the application as an administrator and I still get the error. I have tried allowing SoftEther access to port 443 in my firewall settings and I still get the error. I have tried reinstalling and I still get the error.

I checked my network activity in Kaspersky and closed all applications using port 443 other than SoftEther (in this case, I closed Skype, LINE, Flash, and FireFox). I still got the error.

The only thing that seems to allow me to connect to a VPN is using UDP instead of TCP, and even that only allows the connection to last 5 minutes before I am suddenly disconnected for no apparent reason at all.

At this point I am at a loss, I don’t know what else to try. Could anybody help me?

Re: Help: Error Code 2

Post by vulchor » Sun Oct 26, 2014 1:52 am

I’ve had this problem too for a couple months now. On many servers, UDP is the only connection that goes through. I had never had a problem getting kicked when connected as UDP until last night. That connection lasted about 5 minutes, as you said.

Try other servers if you can, hopefully it was just coincidental that you got booted after 5 minutes, because I’ve had long-running success using UDP on the servers that I use. Otherwise, I get error 2. Hopefully someday soon someone will come up with a solution, or even an explanation.

Re: Help: Error Code 2

Post by BoredAus » Sun Nov 23, 2014 4:27 am

Theres no simple solutions for issues like these. Probably the best way is to disable all firewalls temporary at first and then see if the connection is stable via TCP without firewalls enabled. Then slowly work your way enabling firewalls and all one by one to see which one is that is blocking TCP connection.

In most cases I would personally say that either a poor and/or congested network between you and the VPN server could be at fault once you have disabled all firewalls on your end that you have access to and you still cannot maintain a reliable connection via TCP. A TCP is much more demanding connection method than UDP as it has checksum ability as well as other things that UDP normally omits, the situation worsens when you are connecting from either a poor country and/or on networks that are heavily congested.

If you have ran traceroute, make sure that the latency between your connection and the VPN server is not high and that you have tried other VPN servers. If you have tried a lot of other VPN servers including from countries that you normally wouldn’t connect through and you are getting the same issue over TCP I would dare say it is generally an issue with heavy congestion that is on your end. You can also try connecting at the off peak hours of the day to also make sure that it is not to do with congestion on your end. Poor connectivity cannot be easily solved but it usually starts with understanding your connectivity with the internet as a whole. The easiest way would be to switch between carriers/ISP but that is not a guaranteed method. If you are going through wireless connections, try going through wired first.

Источник

Softether protocol error occurred error was returned from the destination server

Post by LordBadon » Thu Sep 25, 2014 5:00 am

Originally posted in the VPN Gate Discussion forum, but since nobody helped me there I’ll post things here instead and see how they go.

Hi, I am running the latest version of SoftEther VPN Client on my Windows 8 PC. It was working fine until about a week ago when I started getting an error saying this:

«Error (Error Code 2):
Protocol error occurred. Error was returned from the destination server.»

I have ran the application as an administrator and I still get the error. I have tried allowing SoftEther access to port 443 in my firewall settings and I still get the error. I have tried reinstalling and I still get the error.

I checked my network activity in Kaspersky and closed all applications using port 443 other than SoftEther (in this case, I closed Skype, LINE, Flash, and FireFox). I still got the error.

The only thing that seems to allow me to connect to a VPN is using UDP instead of TCP, and even that only allows the connection to last 5 minutes before I am suddenly disconnected for no apparent reason at all.

At this point I am at a loss, I don’t know what else to try. Could anybody help me?

Required Info:
OS: Windows 8.1 64-bit

SoftEther version 4.1 build 9473

I do have a firewall, but I’ve done everything I can think of for changing the rules to allow connections through (though it was that way in the first place) and it still did not work.

not using SecureNAT (to my knowledge anyway)

Источник

Softether protocol error occurred error was returned from the destination server

Post by LordBadon » Thu Sep 25, 2014 5:00 am

Originally posted in the VPN Gate Discussion forum, but since nobody helped me there I’ll post things here instead and see how they go.

Hi, I am running the latest version of SoftEther VPN Client on my Windows 8 PC. It was working fine until about a week ago when I started getting an error saying this:

«Error (Error Code 2):
Protocol error occurred. Error was returned from the destination server.»

I have ran the application as an administrator and I still get the error. I have tried allowing SoftEther access to port 443 in my firewall settings and I still get the error. I have tried reinstalling and I still get the error.

I checked my network activity in Kaspersky and closed all applications using port 443 other than SoftEther (in this case, I closed Skype, LINE, Flash, and FireFox). I still got the error.

The only thing that seems to allow me to connect to a VPN is using UDP instead of TCP, and even that only allows the connection to last 5 minutes before I am suddenly disconnected for no apparent reason at all.

At this point I am at a loss, I don’t know what else to try. Could anybody help me?

Required Info:
OS: Windows 8.1 64-bit

SoftEther version 4.1 build 9473

I do have a firewall, but I’ve done everything I can think of for changing the rules to allow connections through (though it was that way in the first place) and it still did not work.

not using SecureNAT (to my knowledge anyway)

Источник

Softether protocol error occurred error was returned from the destination server

Post by LordBadon » Thu Sep 25, 2014 5:00 am

Originally posted in the VPN Gate Discussion forum, but since nobody helped me there I’ll post things here instead and see how they go.

Hi, I am running the latest version of SoftEther VPN Client on my Windows 8 PC. It was working fine until about a week ago when I started getting an error saying this:

«Error (Error Code 2):
Protocol error occurred. Error was returned from the destination server.»

I have ran the application as an administrator and I still get the error. I have tried allowing SoftEther access to port 443 in my firewall settings and I still get the error. I have tried reinstalling and I still get the error.

I checked my network activity in Kaspersky and closed all applications using port 443 other than SoftEther (in this case, I closed Skype, LINE, Flash, and FireFox). I still got the error.

The only thing that seems to allow me to connect to a VPN is using UDP instead of TCP, and even that only allows the connection to last 5 minutes before I am suddenly disconnected for no apparent reason at all.

At this point I am at a loss, I don’t know what else to try. Could anybody help me?

Required Info:
OS: Windows 8.1 64-bit

SoftEther version 4.1 build 9473

I do have a firewall, but I’ve done everything I can think of for changing the rules to allow connections through (though it was that way in the first place) and it still did not work.

not using SecureNAT (to my knowledge anyway)

Источник

Centos

SoftEther под­дер­жи­ва­ет почти все тун­нель­ные про­то­ко­лы ( L2TP , L2TP /IPsec, MS-SSTP , EtherIP и т.д.). Так­же у него есть соб­ствен­ный SSL-VPN про­то­кол неот­ли­чи­мый от обыч­но­го HTTPS трафик

Дан­ные могут пере­да­вать­ся не толь­ко с помо­щью TCP / UDP про­то­ко­лов, а так­же с помо­щью ими­та­ции ICMP (пинг) и DNS запросов.

SoftEther не тре­бо­ва­те­лен к типам вир­ту­а­ли­за­ции, в отли­чии от OpenVPN, кото­ро­му для рабо­ты тре­бу­ет­ся нали­чие TUN / TAP устройств в ядре. Поэто­му SoftEther рабо­та­ет на любых VPS / VDS и это еще один плюс в копилку.

Кли­ент­ское и сер­вер­ное ПО суще­ству­ет прак­ти­че­ски для всех рас­про­стра­нен­ных опе­ра­ци­он­ных систем. Про­цесс ком­пи­ля­ции исход­но­го кода при уста­нов­ке в UNIX-систе­мах мини­ми­зи­ро­ван настоль­ко, что с ним лег­ко спра­вит­ся любой пользователь.

ПО SoftEther состо­ит из несколь­ких компонентов:

  • Server — самый пол­ный набор, вклю­ча­ет в себя Server, Bridge и VPN Server Manager (в вер­сии для Windows).
  • Bridge — поз­во­ля­ет под­клю­чать локаль­ные сети к VPN-тоннелям.
  • VPN Server Manager — ути­ли­та с гра­фи­че­ским интер­фей­сом в систе­ме Windows. Исполь­зу­ет­ся для адми­ни­стри­ро­ва­ния локаль­ных и уда­лен­ных VPN-сер­ве­ров. Явля­ет­ся самым удоб­ным сред­ством адми­ни­стри­ро­ва­ния и управ­ле­ния. Уста­нав­ли­ва­ет­ся отдельно.
  • vpncmd — ути­ли­та адми­ни­стри­ро­ва­ния команд­ной стро­ки, как в тер­ми­на­лах UNIX-систем, так и в команд­ной стро­ке Windows. В UNIX-систе­мах ста­вит­ся вме­сте с сер­ве­ром. В Windows идет в ком­плек­те с VPN Server Manager.
  • Client — кли­ент для под­клю­че­ния к сети VPN .

Установка SoftEther VPN Server

Уста­но­вим ути­ли­ты для компилирования.

  • # В CentOS
  • yum groupinstall -y «Development Tools»
  • # В Ubuntu/Debian
  • apt-get install -y build-essential

Пере­хо­дим в ката­лог /usr/local.

Пере­хо­дим на сайт SoftEther, выби­ра­ем нуж­ное и копи­ру­ем полу­чен­ную ссылку.

Ска­чи­ва­ем исход­ни­ки SoftEther.

  • wget http ://www.softether-download.com/files/softether/v4.27-9666-beta-2018.04.21-tree/Linux/SoftEther_VPN_Server/64bit_-_Intel_x64_or_AMD64/softether-vpnserver-v4.27-9666-beta-2018.04.21-linux-x64-64bit.tar.gz

Рас­па­ко­вы­ва­ем ска­чан­ный архив.

  • tar -zxvf softether-vpnserver-v4 .27 — 9666 -beta- 2018.04 .21 -linux-x64-64bit.tar.gz

Пере­хо­дим в ката­лог vpnserver.

Ком­пи­ли­ру­ем и устанавливаем.

Во вре­мя уста­нов­ки будет задан ряд вопро­сов, отве­чать сле­ду­ет положительно.

  • Do you want to read the License Agreement for this software ?
  • 1 . Yes
  • 2 . No
  • Please choose one of above number:
  • 1
  • Did you read and understand the License Agreement ?
  • ( If you couldn ‘t read above text, Please read ‘ ReadMeFirst_License.txt’
  • file with any text editor. )
  • 1 . Yes
  • 2 . No
  • Please choose one of above number:
  • 1
  • Did you agree the License Agreement ?
  • 1 . Agree
  • 2 . Do Not Agree
  • Please choose one of above number:
  • 1

Нахо­дясь внут­ри ката­ло­га vpnserver зада­дим пра­ва досту­па для файлов.

  • chmod 600 *
  • chmod 700 vpnserver
  • chmod 700 vpncmd

Про­ве­дем про­вер­ку систе­мы на сов­ме­сти­мость с SoftEther. Что­бы про­ве­сти про­вер­ку нуж­но попасть в кон­соль управ­ле­ния vpncmd.

  • # Что­бы попасть в консоль
  • ./vpncmd
  • # На выбор будет пред­ло­же­но три раздела
  • 1 . Management of VPN Server or VPN Bridge
  • 2 . Management of VPN Client
  • 3 . Use of VPN Tools ( certificate creation and Network Traffic Speed Test Tool )
  • # Нам нужен раз­дел VPN Tools (3 + Enter)
  • Select 1 , 2 or 3 : 3
  • # Выпол­ня­ем коман­ду check для проверки
  • VPN Tools>check
  • Check command — Check whether SoftEther VPN Operation is Possible
  • —————————————————
  • SoftEther VPN Operation Environment Check Tool
  • Copyright ( c ) SoftEther VPN Project.
  • All Rights Reserved.
  • If this operation environment check tool is run on a system and that system passes, it is most likely that SoftEther VPN software can operate on that system. This check may take a while. Please wait…
  • Checking ‘Kernel System’ …
  • Pass
  • Checking ‘Memory Operation System’ …
  • Pass
  • Checking ‘ ANSI / Unicode string processing system’ …
  • Pass
  • Checking ‘File system’ …
  • Pass
  • Checking ‘Thread processing system’ …
  • Pass
  • Checking ‘Network system’ …
  • Pass
  • All checks passed. It is most likely that SoftEther VPN Server / Bridge can operate normally on this system.
  • The command completed successfully.

» All checks passed » озна­ча­ет что тесты прой­де­ны и Softether может рабо­тать в систе­ме. Для выхо­да из кон­со­ли исполь­зу­ют коман­ды: exit, quit или соче­та­ние кла­виш Ctrl+C.

Настройка SoftEther в консоли управления

SoftEther уста­нов­лен и может рабо­тать в систе­ме. Теперь нуж­но про­ве­сти началь­ную настрой­ку, а что­бы про­ве­сти настрой­ку нуж­но запу­стить SoftEther.

Выпол­ня­ем коман­ду ./vpnserver start нахо­дясь внут­ри ката­ло­га /usr/local/vpnserver.

Вхо­дим в кон­соль управления.

  • # Что­бы попасть в консоль
  • ./vpncmd
  • # На выбор будет пред­ло­же­но три раздела
  • 1 . Management of VPN Server or VPN Bridge
  • 2 . Management of VPN Client
  • 3 . Use of VPN Tools ( certificate creation and Network Traffic Speed Test Tool )
  • # Нам нужен раз­дел Management of VPN Server or VPN Bridge (1 + Enter)
  • Select 1 , 2 or 3 : 1

Vpncmd поз­во­ля­ет адми­ни­стри­ро­вать не толь­ко локаль­ные, но и уда­лен­ные сер­ве­ра. В нашем слу­чае нуж­но настро­ить локаль­ный сер­вер, поэто­му в стро­ке Hostname of IP Address of Destination вво­дим localhost и нажи­ма­ем Enter.

  • Hostname of IP Address of Destination: localhost

По умол­ча­нию соеди­не­ние уста­нав­ли­ва­ет­ся на 443 пор­ту. Если вдруг 443 порт занят дру­гой про­грам­мой, такое быва­ет если SoftEther уста­нов­лен не на чистую систе­му, то вой­ти в кон­соль не получится.

  • Error occurred. ( Error code: 2 )
  • Protocol error occurred. Error was returned from the destination server.

В таком слу­чае к зна­че­нию localhost через двое­то­чие добав­ля­ют нуж­ный порт. Кро­ме 443-го пор­та SoftEther слу­ша­ет еще три: 992, 1194 и 5555. Мож­но ука­зать любой из них.

  • Hostname of IP Address of Destination: localhost: 992

Нам будет пред­ло­же­но вве­сти имя вир­ту­аль­но­го хаба, но посколь­ку он еще не создан, то про­сто нажи­ма­ем Enter и ока­зы­ва­ем­ся в кон­со­ли управ­ле­ния сервером.

  • Connection has been established with VPN Server «localhost» ( port 443 ) .
  • You have administrator privileges for the entire VPN Server.
  • VPN Server>

Управ­ле­ние сер­ве­ром осу­ществ­ля­ет­ся посред­ством опре­де­лен­ных команд (205 штук). Спи­сок команд мож­но про­смот­реть через —help.

Установка пароля администратора

Пер­вым делом уста­но­вим пароль адми­ни­стра­то­ра (ServerPasswordSet).

  • VPN Server>ServerPasswordSet
  • ServerPasswordSet command — Set VPN Server Administrator Password
  • Please enter the password. To cancel press the Ctrl+D key.
  • Password: ******
  • Confirm input: ******
  • The command completed successfully.

Создание виртуального хаба

Вир­ту­аль­ный хаб пред­став­ля­ет собой подо­бие сер­ве­ра со сво­и­ми настрой­ка­ми, про­то­ко­ла­ми VPN , сво­и­ми поль­зо­ва­те­ля­ми и адми­ни­стра­то­ра­ми, а так­же со сво­и­ми настрой­ка­ми без­опас­но­сти. На одном сер­ве­ре может быть созда­но до 4096 вир­ту­аль­ных хабов. Хабы не кон­так­ти­ру­ют друг с дру­гом, за исклю­че­ни­ем слу­ча­ев когда их спе­ци­аль­но объ­еди­ня­ют в мосты.

По умол­ча­нию на сер­ве­ре уже есть дефолт­ный хаб ( DEFAULT ), уда­лим его (HubDelete) и созда­дим свой. Во вре­мя выпол­не­ния будет запро­ше­но имя хаба для удаления.

  • VPN Server>HubDelete
  • HubDelete command — Delete Virtual Hub
  • Name of Virtual Hub to delete: DEFAULT
  • The command completed successfully.

Созда­дим новый вир­ту­аль­ный хаб (HubCreate). Зада­дим имя ново­го хаба и пароль.

  • VPN Server>HubCreate
  • HubCreate command — Create New Virtual Hub
  • Name of Virtual Hub to be created: VPN_1
  • Please enter the password. To cancel press the Ctrl+D key.
  • Password: ******
  • Confirm input: ******
  • The command completed successfully.

Спи­сок доступ­ных хабов мож­но про­смот­реть коман­дой HubList. Коман­да пока­зы­ва­ет не толь­ко хабы, но и их статистику.

  • VPN Server>HubList
  • HubList command — Get List of Virtual Hubs
  • Item |Value
  • ——————+——————-
  • Virtual Hub Name | VPN_1
  • Status |Online
  • Type |Standalone
  • Users | 0
  • Groups | 0
  • Sessions | 0
  • MAC Tables | 0
  • IP Tables | 0
  • Num Logins | 0
  • Last Login | 2018 — 05 — 10 05 : 12 : 36
  • Last Communication| 2018 — 05 — 10 05 : 12 : 36
  • Transfer Bytes | 0
  • Transfer Packets | 0
  • The command completed successfully.

Настро­им создан­ный хаб (Hub). Через про­бел ука­зы­ва­ем имя хаба для настройки.

  • VPN Server>Hub VPN_1
  • Hub command — Select Virtual Hub to Manage
  • The Virtual Hub » VPN_1 » has been selected.
  • The command completed successfully.

Кон­соль управ­ле­ния хабом.

Созда­дим поль­зо­ва­те­ля (UserCreate). Груп­пу, пол­ное имя и опи­са­ние запол­ня­ем по жела­нию (мож­но про­пу­стить нажав Enter).

  • VPN Server/ VPN_1 >UserCreate
  • UserCreate command — Create User
  • User Name: denni
  • Assigned Group Name:
  • User Full Name:
  • User Description:
  • The command completed successfully.

Зада­дим пароль поль­зо­ва­те­ля (UserPasswordSet).

  • VPN Server/ VPN_1 >UserPasswordSet
  • UserPasswordSet command — Set Password Authentication for User Auth Type and Set Password
  • User Name: denni
  • Please enter the password. To cancel press the Ctrl+D key.
  • Password: ******
  • Confirm input: ******
  • The command completed successfully.

Создание локального моста

Посколь­ку Local Bridge рабо­та­ет сов­мест­но с TAP устрой­ством, то дан­ный шаг могут про­пу­стить те поль­зо­ва­те­ли, чьи VPS / VDS не под­дер­жи­ва­ют драй­ве­ра TUN / TAP . Такие поль­зо­ва­те­ли в даль­ней­шем будут исполь­зо­вать режим SecureNAT.

Для созда­ния Local Bridge исполь­зу­ет­ся коман­да BridgeCreate, син­так­сис выгля­дит сле­ду­ю­щим образом.

  • BridgeCreate hubname -device:devicename -tap:yes
  • hubname — имя хаба ( VPN_1 )
  • devicename — имя tap-устрой­ства, напри­мер vpn
  • -tap:yes — вклю­че­ние tap-устройства
  • BridgeCreate VPN_1 -device:vpn -tap:yes

Спи­сок и ста­тус мостов мож­но про­смот­реть коман­дой Bridgelist. Если в ста­ту­се висит зна­че­ние Operating, это зна­чит что все в поряд­ке и мост готов к работе.

Источник

How to solve Error code2 in softether (VPN gate)?

I installed latest version of (SoftEther VPN client + VPN gate plugin). I have win 10. when I want to connect with TCP mode immediately error code 2 appears. «Error (Error Code 2) Protocol error occurred. Error was returned from the destination server.» Image I can connect in UDP mode But I want to use TCP mode. It’s interesting that my friend by his PC connect without problem. Thanks.

3 Answers 3

So to fix this annoying problem you want to go to hidden icons or find the softether VPN icon in your taskbar right-click it and press exit and then yes then go to the search bar in you computer and search up services find SoftEther VPN and double click it now click stop then click start again if that didn’t work then go to time.is on your browser and see if your time’s correct if it’s about 40-60 seconds late maybe below that’s fine, hope I helped you!

another way of solution:

  1. Open the «SoftEther VPN Client Manager» window.
  2. Right click «VPN Client Adapter-VPN», then click on «Reinstall driver. «.
  3. Click «Ok» & do nothing until finish the process.
  4. After finish the this, Try your SoftEther VPN Client service without problem. Hope you got the answer.

Press «Proxy Settings» choose a section «Connect via HTTP Proxy Server».
In the settings, enter any name and okay.
This worked for me.

Related

Hot Network Questions

Subscribe to RSS

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

Site design / logo © 2023 Stack Exchange Inc; user contributions licensed under CC BY-SA . rev 2023.1.13.43154

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.

Источник

Protocol error occurred error was returned from the destination server vpn что делать

Post by LordBadon » Thu Sep 25, 2014 5:00 am

Originally posted in the VPN Gate Discussion forum, but since nobody helped me there I’ll post things here instead and see how they go.

Hi, I am running the latest version of SoftEther VPN Client on my Windows 8 PC. It was working fine until about a week ago when I started getting an error saying this:

«Error (Error Code 2):
Protocol error occurred. Error was returned from the destination server.»

I have ran the application as an administrator and I still get the error. I have tried allowing SoftEther access to port 443 in my firewall settings and I still get the error. I have tried reinstalling and I still get the error.

I checked my network activity in Kaspersky and closed all applications using port 443 other than SoftEther (in this case, I closed Skype, LINE, Flash, and FireFox). I still got the error.

The only thing that seems to allow me to connect to a VPN is using UDP instead of TCP, and even that only allows the connection to last 5 minutes before I am suddenly disconnected for no apparent reason at all.

At this point I am at a loss, I don’t know what else to try. Could anybody help me?

Required Info:
OS: Windows 8.1 64-bit

SoftEther version 4.1 build 9473

I do have a firewall, but I’ve done everything I can think of for changing the rules to allow connections through (though it was that way in the first place) and it still did not work.

not using SecureNAT (to my knowledge anyway)

Источник

Protocol error occurred error was returned from the destination server vpn что делать

Post by LordBadon » Thu Sep 25, 2014 5:00 am

Originally posted in the VPN Gate Discussion forum, but since nobody helped me there I’ll post things here instead and see how they go.

Hi, I am running the latest version of SoftEther VPN Client on my Windows 8 PC. It was working fine until about a week ago when I started getting an error saying this:

«Error (Error Code 2):
Protocol error occurred. Error was returned from the destination server.»

I have ran the application as an administrator and I still get the error. I have tried allowing SoftEther access to port 443 in my firewall settings and I still get the error. I have tried reinstalling and I still get the error.

I checked my network activity in Kaspersky and closed all applications using port 443 other than SoftEther (in this case, I closed Skype, LINE, Flash, and FireFox). I still got the error.

The only thing that seems to allow me to connect to a VPN is using UDP instead of TCP, and even that only allows the connection to last 5 minutes before I am suddenly disconnected for no apparent reason at all.

At this point I am at a loss, I don’t know what else to try. Could anybody help me?

Required Info:
OS: Windows 8.1 64-bit

SoftEther version 4.1 build 9473

I do have a firewall, but I’ve done everything I can think of for changing the rules to allow connections through (though it was that way in the first place) and it still did not work.

not using SecureNAT (to my knowledge anyway)

Источник

Protocol error occurred error was returned from the destination server vpn что делать

Post by LordBadon » Thu Sep 25, 2014 5:00 am

Originally posted in the VPN Gate Discussion forum, but since nobody helped me there I’ll post things here instead and see how they go.

Hi, I am running the latest version of SoftEther VPN Client on my Windows 8 PC. It was working fine until about a week ago when I started getting an error saying this:

«Error (Error Code 2):
Protocol error occurred. Error was returned from the destination server.»

I have ran the application as an administrator and I still get the error. I have tried allowing SoftEther access to port 443 in my firewall settings and I still get the error. I have tried reinstalling and I still get the error.

I checked my network activity in Kaspersky and closed all applications using port 443 other than SoftEther (in this case, I closed Skype, LINE, Flash, and FireFox). I still got the error.

The only thing that seems to allow me to connect to a VPN is using UDP instead of TCP, and even that only allows the connection to last 5 minutes before I am suddenly disconnected for no apparent reason at all.

At this point I am at a loss, I don’t know what else to try. Could anybody help me?

Required Info:
OS: Windows 8.1 64-bit

SoftEther version 4.1 build 9473

I do have a firewall, but I’ve done everything I can think of for changing the rules to allow connections through (though it was that way in the first place) and it still did not work.

not using SecureNAT (to my knowledge anyway)

Источник

Centos

SoftEther под­дер­жи­ва­ет почти все тун­нель­ные про­то­ко­лы ( L2TP , L2TP /IPsec, MS-SSTP , EtherIP и т.д.). Так­же у него есть соб­ствен­ный SSL-VPN про­то­кол неот­ли­чи­мый от обыч­но­го HTTPS трафик

Дан­ные могут пере­да­вать­ся не толь­ко с помо­щью TCP / UDP про­то­ко­лов, а так­же с помо­щью ими­та­ции ICMP (пинг) и DNS запросов.

SoftEther не тре­бо­ва­те­лен к типам вир­ту­а­ли­за­ции, в отли­чии от OpenVPN, кото­ро­му для рабо­ты тре­бу­ет­ся нали­чие TUN / TAP устройств в ядре. Поэто­му SoftEther рабо­та­ет на любых VPS / VDS и это еще один плюс в копилку.

Кли­ент­ское и сер­вер­ное ПО суще­ству­ет прак­ти­че­ски для всех рас­про­стра­нен­ных опе­ра­ци­он­ных систем. Про­цесс ком­пи­ля­ции исход­но­го кода при уста­нов­ке в UNIX-систе­мах мини­ми­зи­ро­ван настоль­ко, что с ним лег­ко спра­вит­ся любой пользователь.

ПО SoftEther состо­ит из несколь­ких компонентов:

  • Server — самый пол­ный набор, вклю­ча­ет в себя Server, Bridge и VPN Server Manager (в вер­сии для Windows).
  • Bridge — поз­во­ля­ет под­клю­чать локаль­ные сети к VPN-тоннелям.
  • VPN Server Manager — ути­ли­та с гра­фи­че­ским интер­фей­сом в систе­ме Windows. Исполь­зу­ет­ся для адми­ни­стри­ро­ва­ния локаль­ных и уда­лен­ных VPN-сер­ве­ров. Явля­ет­ся самым удоб­ным сред­ством адми­ни­стри­ро­ва­ния и управ­ле­ния. Уста­нав­ли­ва­ет­ся отдельно.
  • vpncmd — ути­ли­та адми­ни­стри­ро­ва­ния команд­ной стро­ки, как в тер­ми­на­лах UNIX-систем, так и в команд­ной стро­ке Windows. В UNIX-систе­мах ста­вит­ся вме­сте с сер­ве­ром. В Windows идет в ком­плек­те с VPN Server Manager.
  • Client — кли­ент для под­клю­че­ния к сети VPN .

Установка SoftEther VPN Server

Уста­но­вим ути­ли­ты для компилирования.

  • # В CentOS
  • yum groupinstall -y «Development Tools»
  • # В Ubuntu/Debian
  • apt-get install -y build-essential

Пере­хо­дим в ката­лог /usr/local.

Пере­хо­дим на сайт SoftEther, выби­ра­ем нуж­ное и копи­ру­ем полу­чен­ную ссылку.

Ска­чи­ва­ем исход­ни­ки SoftEther.

  • wget http ://www.softether-download.com/files/softether/v4.27-9666-beta-2018.04.21-tree/Linux/SoftEther_VPN_Server/64bit_-_Intel_x64_or_AMD64/softether-vpnserver-v4.27-9666-beta-2018.04.21-linux-x64-64bit.tar.gz

Рас­па­ко­вы­ва­ем ска­чан­ный архив.

  • tar -zxvf softether-vpnserver-v4 .27 — 9666 -beta- 2018.04 .21 -linux-x64-64bit.tar.gz

Пере­хо­дим в ката­лог vpnserver.

Ком­пи­ли­ру­ем и устанавливаем.

Во вре­мя уста­нов­ки будет задан ряд вопро­сов, отве­чать сле­ду­ет положительно.

  • Do you want to read the License Agreement for this software ?
  • 1 . Yes
  • 2 . No
  • Please choose one of above number:
  • 1
  • Did you read and understand the License Agreement ?
  • ( If you couldn ‘t read above text, Please read ‘ ReadMeFirst_License.txt’
  • file with any text editor. )
  • 1 . Yes
  • 2 . No
  • Please choose one of above number:
  • 1
  • Did you agree the License Agreement ?
  • 1 . Agree
  • 2 . Do Not Agree
  • Please choose one of above number:
  • 1

Нахо­дясь внут­ри ката­ло­га vpnserver зада­дим пра­ва досту­па для файлов.

  • chmod 600 *
  • chmod 700 vpnserver
  • chmod 700 vpncmd

Про­ве­дем про­вер­ку систе­мы на сов­ме­сти­мость с SoftEther. Что­бы про­ве­сти про­вер­ку нуж­но попасть в кон­соль управ­ле­ния vpncmd.

  • # Что­бы попасть в консоль
  • ./vpncmd
  • # На выбор будет пред­ло­же­но три раздела
  • 1 . Management of VPN Server or VPN Bridge
  • 2 . Management of VPN Client
  • 3 . Use of VPN Tools ( certificate creation and Network Traffic Speed Test Tool )
  • # Нам нужен раз­дел VPN Tools (3 + Enter)
  • Select 1 , 2 or 3 : 3
  • # Выпол­ня­ем коман­ду check для проверки
  • VPN Tools>check
  • Check command — Check whether SoftEther VPN Operation is Possible
  • —————————————————
  • SoftEther VPN Operation Environment Check Tool
  • Copyright ( c ) SoftEther VPN Project.
  • All Rights Reserved.
  • If this operation environment check tool is run on a system and that system passes, it is most likely that SoftEther VPN software can operate on that system. This check may take a while. Please wait…
  • Checking ‘Kernel System’ …
  • Pass
  • Checking ‘Memory Operation System’ …
  • Pass
  • Checking ‘ ANSI / Unicode string processing system’ …
  • Pass
  • Checking ‘File system’ …
  • Pass
  • Checking ‘Thread processing system’ …
  • Pass
  • Checking ‘Network system’ …
  • Pass
  • All checks passed. It is most likely that SoftEther VPN Server / Bridge can operate normally on this system.
  • The command completed successfully.

» All checks passed » озна­ча­ет что тесты прой­де­ны и Softether может рабо­тать в систе­ме. Для выхо­да из кон­со­ли исполь­зу­ют коман­ды: exit, quit или соче­та­ние кла­виш Ctrl+C.

Настройка SoftEther в консоли управления

SoftEther уста­нов­лен и может рабо­тать в систе­ме. Теперь нуж­но про­ве­сти началь­ную настрой­ку, а что­бы про­ве­сти настрой­ку нуж­но запу­стить SoftEther.

Выпол­ня­ем коман­ду ./vpnserver start нахо­дясь внут­ри ката­ло­га /usr/local/vpnserver.

Вхо­дим в кон­соль управления.

  • # Что­бы попасть в консоль
  • ./vpncmd
  • # На выбор будет пред­ло­же­но три раздела
  • 1 . Management of VPN Server or VPN Bridge
  • 2 . Management of VPN Client
  • 3 . Use of VPN Tools ( certificate creation and Network Traffic Speed Test Tool )
  • # Нам нужен раз­дел Management of VPN Server or VPN Bridge (1 + Enter)
  • Select 1 , 2 or 3 : 1

Vpncmd поз­во­ля­ет адми­ни­стри­ро­вать не толь­ко локаль­ные, но и уда­лен­ные сер­ве­ра. В нашем слу­чае нуж­но настро­ить локаль­ный сер­вер, поэто­му в стро­ке Hostname of IP Address of Destination вво­дим localhost и нажи­ма­ем Enter.

  • Hostname of IP Address of Destination: localhost

По умол­ча­нию соеди­не­ние уста­нав­ли­ва­ет­ся на 443 пор­ту. Если вдруг 443 порт занят дру­гой про­грам­мой, такое быва­ет если SoftEther уста­нов­лен не на чистую систе­му, то вой­ти в кон­соль не получится.

  • Error occurred. ( Error code: 2 )
  • Protocol error occurred. Error was returned from the destination server.

В таком слу­чае к зна­че­нию localhost через двое­то­чие добав­ля­ют нуж­ный порт. Кро­ме 443-го пор­та SoftEther слу­ша­ет еще три: 992, 1194 и 5555. Мож­но ука­зать любой из них.

  • Hostname of IP Address of Destination: localhost: 992

Нам будет пред­ло­же­но вве­сти имя вир­ту­аль­но­го хаба, но посколь­ку он еще не создан, то про­сто нажи­ма­ем Enter и ока­зы­ва­ем­ся в кон­со­ли управ­ле­ния сервером.

  • Connection has been established with VPN Server «localhost» ( port 443 ) .
  • You have administrator privileges for the entire VPN Server.
  • VPN Server>

Управ­ле­ние сер­ве­ром осу­ществ­ля­ет­ся посред­ством опре­де­лен­ных команд (205 штук). Спи­сок команд мож­но про­смот­реть через —help.

Установка пароля администратора

Пер­вым делом уста­но­вим пароль адми­ни­стра­то­ра (ServerPasswordSet).

  • VPN Server>ServerPasswordSet
  • ServerPasswordSet command — Set VPN Server Administrator Password
  • Please enter the password. To cancel press the Ctrl+D key.
  • Password: ******
  • Confirm input: ******
  • The command completed successfully.

Создание виртуального хаба

Вир­ту­аль­ный хаб пред­став­ля­ет собой подо­бие сер­ве­ра со сво­и­ми настрой­ка­ми, про­то­ко­ла­ми VPN , сво­и­ми поль­зо­ва­те­ля­ми и адми­ни­стра­то­ра­ми, а так­же со сво­и­ми настрой­ка­ми без­опас­но­сти. На одном сер­ве­ре может быть созда­но до 4096 вир­ту­аль­ных хабов. Хабы не кон­так­ти­ру­ют друг с дру­гом, за исклю­че­ни­ем слу­ча­ев когда их спе­ци­аль­но объ­еди­ня­ют в мосты.

По умол­ча­нию на сер­ве­ре уже есть дефолт­ный хаб ( DEFAULT ), уда­лим его (HubDelete) и созда­дим свой. Во вре­мя выпол­не­ния будет запро­ше­но имя хаба для удаления.

  • VPN Server>HubDelete
  • HubDelete command — Delete Virtual Hub
  • Name of Virtual Hub to delete: DEFAULT
  • The command completed successfully.

Созда­дим новый вир­ту­аль­ный хаб (HubCreate). Зада­дим имя ново­го хаба и пароль.

  • VPN Server>HubCreate
  • HubCreate command — Create New Virtual Hub
  • Name of Virtual Hub to be created: VPN_1
  • Please enter the password. To cancel press the Ctrl+D key.
  • Password: ******
  • Confirm input: ******
  • The command completed successfully.

Спи­сок доступ­ных хабов мож­но про­смот­реть коман­дой HubList. Коман­да пока­зы­ва­ет не толь­ко хабы, но и их статистику.

  • VPN Server>HubList
  • HubList command — Get List of Virtual Hubs
  • Item |Value
  • ——————+——————-
  • Virtual Hub Name | VPN_1
  • Status |Online
  • Type |Standalone
  • Users | 0
  • Groups | 0
  • Sessions | 0
  • MAC Tables | 0
  • IP Tables | 0
  • Num Logins | 0
  • Last Login | 2018 — 05 — 10 05 : 12 : 36
  • Last Communication| 2018 — 05 — 10 05 : 12 : 36
  • Transfer Bytes | 0
  • Transfer Packets | 0
  • The command completed successfully.

Настро­им создан­ный хаб (Hub). Через про­бел ука­зы­ва­ем имя хаба для настройки.

  • VPN Server>Hub VPN_1
  • Hub command — Select Virtual Hub to Manage
  • The Virtual Hub » VPN_1 » has been selected.
  • The command completed successfully.

Кон­соль управ­ле­ния хабом.

Созда­дим поль­зо­ва­те­ля (UserCreate). Груп­пу, пол­ное имя и опи­са­ние запол­ня­ем по жела­нию (мож­но про­пу­стить нажав Enter).

  • VPN Server/ VPN_1 >UserCreate
  • UserCreate command — Create User
  • User Name: denni
  • Assigned Group Name:
  • User Full Name:
  • User Description:
  • The command completed successfully.

Зада­дим пароль поль­зо­ва­те­ля (UserPasswordSet).

  • VPN Server/ VPN_1 >UserPasswordSet
  • UserPasswordSet command — Set Password Authentication for User Auth Type and Set Password
  • User Name: denni
  • Please enter the password. To cancel press the Ctrl+D key.
  • Password: ******
  • Confirm input: ******
  • The command completed successfully.

Создание локального моста

Посколь­ку Local Bridge рабо­та­ет сов­мест­но с TAP устрой­ством, то дан­ный шаг могут про­пу­стить те поль­зо­ва­те­ли, чьи VPS / VDS не под­дер­жи­ва­ют драй­ве­ра TUN / TAP . Такие поль­зо­ва­те­ли в даль­ней­шем будут исполь­зо­вать режим SecureNAT.

Для созда­ния Local Bridge исполь­зу­ет­ся коман­да BridgeCreate, син­так­сис выгля­дит сле­ду­ю­щим образом.

  • BridgeCreate hubname -device:devicename -tap:yes
  • hubname — имя хаба ( VPN_1 )
  • devicename — имя tap-устрой­ства, напри­мер vpn
  • -tap:yes — вклю­че­ние tap-устройства
  • BridgeCreate VPN_1 -device:vpn -tap:yes

Спи­сок и ста­тус мостов мож­но про­смот­реть коман­дой Bridgelist. Если в ста­ту­се висит зна­че­ние Operating, это зна­чит что все в поряд­ке и мост готов к работе.

Источник

Hi all, i was sucesfouly using softether on OpenWRT on an alix6f board, i’m now moving to Gargoyle but i’m haveing some issues with softether.

I’ve installed softether from this guide
https://wordpress.tirlins.com/2015/03/s … n-openwrt/
and all works ok, the package install and the all the tests are passed.
Once i try to connect to the server to set the password of the server with vpncmd i receive the error (Error code: 2) as per below log:

Code: Select all

root@Gargoyle:/etc/init.d# vpncmd
vpncmd command - SoftEther VPN Command Line Management Utility
SoftEther VPN Command Line Management Utility (vpncmd command)
Version 4.21 Build 9613   (English)
Compiled 2016/04/24 15:39:17 by yagi at pc30
Copyright (c) SoftEther VPN Project. All Rights Reserved.

By using vpncmd program, the following can be achieved.

1. Management of VPN Server or VPN Bridge
2. Management of VPN Client
3. Use of VPN Tools (certificate creation and Network Traffic Speed Test Tool)

Select 1, 2 or 3: 1

Specify the host name or IP address of the computer that the destination VPN Server or VPN Bridge is operating on.
By specifying according to the format 'host name:port number', you can also specify the port number.
(When the port number is unspecified, 443 is used.)
If nothing is input and the Enter key is pressed, the connection will be made to the port number 8888 of localhost (this computer).
Hostname of IP Address of Destination:

If connecting to the server by Virtual Hub Admin Mode, please input the Virtual Hub name.
If connecting by server admin mode, please press Enter without inputting anything.
Specify Virtual Hub Name:
Error occurred. (Error code: 2)
Protocol error occurred. Error was returned from the destination server.

while both vpncmd check and even the speed test are ok.

Code: Select all

VPN Tools>check
Check command - Check whether SoftEther VPN Operation is Possible
---------------------------------------------------
SoftEther VPN Operation Environment Check Tool

Copyright (c) SoftEther VPN Project.
All Rights Reserved.

If this operation environment check tool is run on a system and that system passes, it is most likely that SoftEther VPN software can operate on that system. This check may take a while. Please wait...

Checking 'Kernel System'...
              Pass
Checking 'Memory Operation System'...
              Pass
Checking 'ANSI / Unicode string processing system'...
              Pass
Checking 'File system'...
              Pass
Checking 'Thread processing system'...
              Pass
Checking 'Network system'...
              Pass

All checks passed. It is most likely that SoftEther VPN Server / Bridge can operate normally on this system.

The command completed successfully.

VPN Tools>

I’ve tryed all the avilalbe builds of sofetether, i made sure that openvpn was off, the softether demon is started of course.
According to the softether docs error code 2 from vpncmd is when it can’t connect to the server.
I’ve tryed to connect to VPN server trou the Windows frontend but i can’t connect as well.
Any help is wellcome !!!

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Soft read error rate
  • Soft ecc correction rate ssd как исправить
  • Soffice bin как исправить
  • Sodstats smx sod rank error saving player unrecognized token
  • Soctk connect error mrt dongle

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии