Protocol error occurred error was returned from the destination server перевод

Protocol error occurred error was returned from the destination server vpn что делать Post by matt.sayers » Sun Jun 08, 2014 2:13 am I have recently upgraded my SoftEther VPN server to version 4.07 (Build 9448) to take fixes for OpenSSL. I am able to successfully connect to the VPN from a computer using […]

Содержание

  1. Protocol error occurred error was returned from the destination server vpn что делать
  2. VPN GATE. Error code 2. Помогите решить проблему!
  3. Protocol error occurred error was returned from the destination server vpn что делать
  4. Daniel Sokolowski’s Blog
  5. Protocol error occurred. Error was returned from the destination server.
  6. Protocol error occurred error was returned from the destination server перевод

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

Post by matt.sayers » Sun Jun 08, 2014 2:13 am

I have recently upgraded my SoftEther VPN server to version 4.07 (Build 9448) to take fixes for OpenSSL.

I am able to successfully connect to the VPN from a computer using the 4.04 (Build 9412) client.

If I attempt to also update my vpn client to version 4.07 (Build 9448), I get errors any time I connect. The errors says «Error 2: Protocol Error.» This happens on any port I try to connect with. I tried 443, 992 and 5555. And yes, I do have the server listening to those ports.

Here is an error entry from the client log:
2014-06-07 21:20:02.456 VPN Connection Setting «[real server name removed]»: The connection has been either disconnected or it failed. Cause: Protocol error occurred. Error was returned from the destination server. (code 2)

I ended up uninstalling the 4.07 client and reinstalling 4.04 client which works.

Is this a known issue or configuration change that I am missing? If not, can you look into this. If you need more details to reproduce this error I will be happy to provide those.

Thanks in advance.

gavinlee Posts: 8 Joined: Thu Jun 05, 2014 3:06 am

Post by gavinlee » Sun Jun 08, 2014 2:23 am

matt.sayers wrote:
> I have recently upgraded my SoftEther VPN server to version 4.07 (Build
> 9448) to take fixes for OpenSSL.
>
> I am able to successfully connect to the VPN from a computer using the 4.04
> (Build 9412) client.
>
> If I attempt to also update my vpn client to version 4.07 (Build 9448), I
> get errors any time I connect. The errors says «Error 2: Protocol
> Error.» This happens on any port I try to connect with. I tried 443,
> 992 and 5555. And yes, I do have the server listening to those ports.
>
> Here is an error entry from the client log:
> 2014-06-07 21:20:02.456 VPN Connection Setting «[real server name
> removed]»: The connection has been either disconnected or it failed.
> Cause: Protocol error occurred. Error was returned from the destination
> server. (code 2)
>
> I ended up uninstalling the 4.07 client and reinstalling 4.04 client which
> works.
>
> Is this a known issue or configuration change that I am missing? If not,
> can you look into this. If you need more details to reproduce this error I
> will be happy to provide those.
>
> Thanks in advance.
95
Hi Matt:
I have met the same problem like you did, I can’t able to connect any one of VPN in the list. Even I connected teporary,it will be disconnected in a few minutes.My version is also 4.07(9448). This is the newest version which the official website updated. Did you solve this problem now? or do the old version before 4.07 still work successfully?
thank you
BR

matt.sayers Posts: 7 Joined: Sun Jun 08, 2014 2:02 am

Post by matt.sayers » Sun Jun 08, 2014 2:31 am

I am able to successfully connect to a server on version 4.07 (Build 9488) with the 4.04 client. I had to uninstall the 4.07 Client (Build 9488) then install the older 4.04 Client (Build 9412). This seems to preserve your settings OK between uninstall/reinstall which is nice.

To be clear, I never had an issue with the server versions.
Server is on 4.07.
4.04 client will successfully connect.
4.07 client will throw protocol errors.

I would try downgrading your client version to 4.04 and see if that helps. It did for me. I hope the issue can be fixed in a newer version of the client though because now I have to warn my users not to download the suggested client update.

dnobori Posts: 228 Joined: Tue Mar 05, 2013 10:04 am

Post by dnobori » Sun Jun 08, 2014 2:47 am

I am a developer of SoftEther VPN programs.
To analyze your problem, I need to reproduce the problem.

Could you please give me the IP address and the port number of actual running SoftEther VPN Server which occurs your problem? If so, I am going to check whether there are certainly protocol-error when the connection attempt will be made from the latest version of VPN Client. If that is positive, I will try to identify which VPN Client version begins to cause the problem.
I am going to check whether the «protocol error» occurs or not during the SSL connection phase. This step needs no login attempts because the protocol error occurs before the user authentication phase. No username and login credentials are needed. Please provide us just IP address and port number.

Please keep the VPN Server up to date (Ver 4.07).

matt.sayers Posts: 7 Joined: Sun Jun 08, 2014 2:02 am

Post by matt.sayers » Sun Jun 08, 2014 2:54 am

Thank you for your assistance.

I have uploaded a text file to the URL you provided named «network info.txt» so that you may test. Let me know if you need anything else.

matt.sayers Posts: 7 Joined: Sun Jun 08, 2014 2:02 am

Post by matt.sayers » Sun Jun 08, 2014 2:56 am

dnobori Posts: 228 Joined: Tue Mar 05, 2013 10:04 am

Post by dnobori » Sun Jun 08, 2014 2:57 am

Thank you. I am going to start the actual check of protocol errors, trying all versions of VPN Client between 4.04 and 4.07. matt.sayers Posts: 7 Joined: Sun Jun 08, 2014 2:02 am

Post by matt.sayers » Sun Jun 08, 2014 3:04 am

dnobori Posts: 228 Joined: Tue Mar 05, 2013 10:04 am

Post by dnobori » Sun Jun 08, 2014 3:15 am

I found the problem.
The IP address and the port number (443) which you speficied is occupied by the another program, which might be a LinkSys router.

Please check your router setting to transfer the public TCP port «443» to the internal private IP address of the VPN Server.

openssl s_client -connect *.*.*.*:443
CONNECTED(00000003)
depth=0 /CN=Linksys_RVS4000/OU=RVS4000/O=Linksys/C=US
verify error:num=18:self signed certificate
verify return:1
depth=0 /CN=Linksys_RVS4000/OU=RVS4000/O=Linksys/C=US
verify return:1

Certificate chain
0 s:/CN=Linksys_RVS4000/OU=RVS4000/O=Linksys/C=US
i:/CN=Linksys_RVS4000/OU=RVS4000/O=Linksys/C=US

matt.sayers Posts: 7 Joined: Sun Jun 08, 2014 2:02 am

Post by matt.sayers » Sun Jun 08, 2014 3:33 am

Thank you for the update.

Did something change in version 4.07 which no longer can ignore/bypass this issue as version 4.04 did?

I will give your suggestion a try on Monday when I am back in the office. I will post back next week and let you know how it goes.

gavinlee Posts: 8 Joined: Thu Jun 05, 2014 3:06 am

Post by gavinlee » Sun Jun 08, 2014 4:14 am

dnobori wrote:
> I found the problem.
> The IP address and the port number (443) which you speficied is occupied by
> the another program, which might be a LinkSys router.
>
> Please check your router setting to transfer the public TCP port
> «443» to the internal private IP address of the VPN Server.
>
> openssl s_client -connect *.*.*.*:443
> CONNECTED(00000003)
> depth=0 /CN=Linksys_RVS4000/OU=RVS4000/O=Linksys/C=US
> verify error:num=18:self signed certificate
> verify return:1
> depth=0 /CN=Linksys_RVS4000/OU=RVS4000/O=Linksys/C=US
> verify return:1
> —
> Certificate chain
> 0 s:/CN=Linksys_RVS4000/OU=RVS4000/O=Linksys/C=US
> i:/CN=Linksys_RVS4000/OU=RVS4000/O=Linksys/C=US
> —

Dnobori:
Thank you for your help. Could you tell me the detial of how to check the router setting to transfer the public TCP port»443″ to the internal private IP address of the VPN Server? Honestly I am not good at computer.
Thank you again

gavinlee Posts: 8 Joined: Thu Jun 05, 2014 3:06 am

Post by gavinlee » Sun Jun 08, 2014 4:23 am

matt.sayers wrote:
> Hi Gavin.
>
> I am able to successfully connect to a server on version 4.07 (Build 9488)
> with the 4.04 client. I had to uninstall the 4.07 Client (Build 9488) then
> install the older 4.04 Client (Build 9412). This seems to preserve your
> settings OK between uninstall/reinstall which is nice.
>
> To be clear, I never had an issue with the server versions.
> Server is on 4.07.
> 4.04 client will successfully connect.
> 4.07 client will throw protocol errors.
>
> I would try downgrading your client version to 4.04 and see if that helps.
> It did for me. I hope the issue can be fixed in a newer version of the
> client though because now I have to warn my users not to download the
> suggested client update.
>
> Matt

Hi,Matt:
thank you for your help. I just unist the 4.07 client and reinstall the 4.04 client. Then I am able to connect temporary. but I don’t know how long I can maintain this.
hope the developer will fix this soon

dnobori Posts: 228 Joined: Tue Mar 05, 2013 10:04 am

Post by dnobori » Sun Jun 08, 2014 7:47 am

I wrote a patch to work around the NAT-T issue for the enviroment which is like your network.

** Work around the NAT traversal problem.

Adjusted the priority between TCP/IP Direct Connection and UDP-based NAT-Traversal. On this version (Ver 4.08), NAT-Traversal will always be used if the client program detects that the specified TCP destination port on the destination server is occupied by non-SoftEther VPN Server. Anyone who faces to the connection problem on the VPN Server which is behind the NAT-box should install this update.

In the previous version (Ver 4.07), when the VPN Client attempts to connect to the VPN Server, the client firstly establish the connection via the TCP/IP direct protocol. If the TCP connection establishes successfully (in the layer-3) but the TCP port returns non-VPN protocol data (in the layer-7), the protocol error occurs immediately even if the NAT-Traversal connection attempt is still pending. This phenomenon often occurs when the VPN Server is behind the NAT-box, and the NAT-box has a listening TCP-443 port by itself. In that condition, the VPN Client attempts to connect to that TCP-443 port firstly, and the protocol error occurs immediately NAT-box returns non-VPN protocol (e.g. HTML-based administration page).

In order to work around that, this version (Ver 4.08) of VPN Client changed the behavior. On this version, if the VPN Client detects that the destination TCP Port is occupied by a non-VPN program, then the client will always use NAT-Traversal socket. This minor change will fix the connection problem to VPN servers behind the NATs.

VPN GATE. Error code 2. Помогите решить проблему!

После переустановки винды 7,перестал коннектиться VPN,пользуюсь программой SoftEther VPN Client Manager для доступа на яп. сервера. До этого все работало, настройки по дефолту стояли всегда.. фишка в том что сейчас коннект происходит лишь к некоторым серверам.. типа Германии.. а Япония и Корея выдает ошибку. В чем причина? Брандм. отключен. Антивирусника нет. Основной инет работает. На втором компе VPN коннектится прекрасно, оба компа подключены через роутер Asus. Такое ощущение что именно мой комп где-то блокируется, может после переустановки нужны какие-то доп. файлы, настройки? Помогите советом!

Частая ошибка, после переустановки, не настраиваете дату и время, в этом и вся проблема с вашим VPN

да это я уже поняла, в этот раз даже не сообразила проверить)) была уверена что число именно такое . просто потерялась в днях)

Выполните в командной строке tracert .
И покажите скриншот результата.

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

Попробуй подключиться к русским серверам, или переустанови прогу! У меня она тоже стояла раньше.

зачем мне русские сервера? я использую программу для доступа на яп. на русские я итак могу заходить без VPN и без проблем.. =)

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.

Daniel Sokolowski’s Blog

Protocol error occurred. Error was returned from the destination server.

When you run `vpncmd` it attempts to connect, find an active port, but of course fails with ‘Protocol error occurred. Error was returned from the destination server.’ because it’s not actually connecting to the vpn server.

By default Softether also listens on 992 , 1194 , and 5555 so the sollution is to modify specify `localhost:5555` when executing the `vpncmnd`. If this has helped you feel free to comment or follow me on twitter @danielsokolows.

Источник

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 под­дер­жи­ва­ет почти все тун­нель­ные про­то­ко­лы (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. Уста­нов­ка и настрой­ка на этом завершены.

Softeher ‘Error occurred. (Error code: 2)’ sollution

Protocol error occurred. Error was returned from the destination server.

The Softether server by default to run on port 443, if you server also hosts normal https then 443 is already taken and so Softether can’t bind to it.

When you run `vpncmd` it attempts to connect, find an active port, but of course fails with ‘Protocol error occurred. Error was returned from the destination server.’ because it’s not actually connecting to the vpn server.

By default Softether also listens on 992, 1194, and 5555 so the sollution is to modify specify `localhost:5555` when executing the `vpncmnd`. If this has helped you feel free to comment or follow me on twitter @danielsokolows.

Popular posts from this blog

System.DmlException: Insert failed. First exception on row 0; first error: DUPLICATE_VALUE, duplicate value found: <unknown> duplicates value on record with id: <unknown>. The above error is triggered in the database layer and caused by a trigger or workflow outside of your main code of block that is bubbling this exception. This is rather difficult to track down especially if you are unfamiliar with the code, I am sharing my procedure in the hopes this saves you time — if you find this helpful drop me a line or follow me on twitter @danielsokolows . This error is caused by unique field constraint on the object, so the first step is to examine the object and locate the API names of all unique fieds. You can do this through SF direclty ‘Setup < Customize &lt <object being inserted> &lt Fields’ or by downloading the `src/objects` metadata information and searching for <unique> ; I preffer the latter and actually download ALL matadata i

DIY — Do it yourself fireplace child guard Our wonderful 8.5 month old Sofia has become a crawling race car with an untamed thirst for exploration. And so with the cold nights approaching we needed to child proof the fireplace. This however proved to be more difficult than would reasonably expect, I’ve checked the local Toys «R» Us, Walmart, and even a Canadian Tire with no success for a ready to use product. Internet search was more fruitful and returned a few online stores one could order from, however in all honestly they didn’t look too sturdy to me. So I build my own relatively quickly and inexpensively. Materials needed is a privacy plastic lattice — the smallest hole pattern — a few screws and anchors; tools needed are a drill, and a handsaw if you don’t have the lattice cut at the store — that’s it. The construction consits of screwing the lattice into the wall and the final product is easiest explained through following pictures.

Re: Black Desert — Как просто начать играть на японском серевере. Подробный видеогайд

все ок, регнул ак немного иначе, но главное получилось

Последний раз редактировалось Ruthven1_renamed_1012405_31012021; 20.05.2015 в 18:21.

Читатель

Лучник
Знатоку игры Black Desert
Награжден за: Знаток игры Black Desert Online

Re: Black Desert — Как просто начать играть на японском серевере. Подробный видеогайд

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

Как раз изврат играть на Японских серваках, с их то порезками всего и вся.


хорошие игры убивают вводом ПвП

на корее все норм и классная игра…

Политота удалена.
Ezengel и Nevada — ридонли


Фанат

Игрок Revelation. Проверено GoHa.Ru.

Re: Black Desert — Как просто начать играть на японском серевере. Подробный видеогайд

Старожил

GoHa.Ru II Степени

Re: Black Desert — Как просто начать играть на японском серевере. Подробный видеогайд

Как раз изврат играть на Японских серваках

А я что сказал?
тест != игра


Я впервые в жизни купила Набор

Позднего

Доступа, так еще и за 2,5к!

Читатель

Лучник
Знатоку игры Black Desert
Награжден за: Знаток игры Black Desert Online

Re: Black Desert — Как просто начать играть на японском серевере. Подробный видеогайд

А я что сказал?
тест != игра

Ок, играть/тестить на японских серваках это то еще извращение.


хорошие игры убивают вводом ПвП

на корее все норм и классная игра…

Политота удалена.
Ezengel и Nevada — ридонли


Старожил

GoHa.Ru II Степени

Re: Black Desert — Как просто начать играть на японском серевере. Подробный видеогайд

тестить норм
пинг только иногда мешает


Я впервые в жизни купила Набор

Позднего

Доступа, так еще и за 2,5к!

Re: Black Desert — Как просто начать играть на японском серевере. Подробный видеогайд

Подскажите пожалуйста, у меня уже второй день не подключается VPN Gate:
Ошибка:
Error (Error Code 2):
Protocol error occurred. Error was returned from the destination server.
Уже побывал и OPEN VPN, тоже самое… Может у меня что-то не настроено? Хотя до этого 3 дня все работало…
За ранее огромное спасибо!

Пуфик

Игрок Revelation. Проверено GoHa.Ru.
Волшебник

Re: Black Desert — Как просто начать играть на японском серевере. Подробный видеогайд

у меня тоже начало качать 2 гига, что же мне делааать!

Re: Black Desert — Как просто начать играть на японском серевере. Подробный видеогайд

Судя по всему перекрыли лавочку. Я не могу теперь пройти регистрацию. 2 недели назад я создал аккаунт, а теперь не могу. Всё ввожу, жму подтвердить на странице ввода, а она отбрасывает меня на верх страницы. В общем не могу пройти 1 часть регистрации. Я совершенно не понимаю чего она хочет от меня. Видимо не японскую почту больше не принимает. В чате в игре каждый второй русский треплется. Видимо японцам надоело это.

Re: Black Desert — Как просто начать играть на японском серевере. Подробный видеогайд

япония, зарегал ак скачал и обновил клиент после застаквки первой где название студии сразу вылео на раб стол без лога. Впн меня. хз что с ним

Re: Black Desert — Как просто начать играть на японском серевере. Подробный видеогайд

Ребят доброго времени суток, подскажите в чем проблема, захожу на Японию, после нажатия кнопки старт на сайте появляется эта ошибка:

PS/ До ру збт играл без проблем, потом эта ошибка, я клиент снёс по новой поставил и все-равно эта штукенция вылазит.

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 !!!

Понравилась статья? Поделить с друзьями:
  • Protocol error minecraft server
  • Prolog program error 7002
  • Protocol error lost connection
  • Prolog program error 1407
  • Protocol error auth failed closing connection