- Настройка OpenVPN в macOS
- Настройка для Tunelblick
- Настройка для Viscosity
- Настройка для OpenVPN Connect 3
- OpenVPN Tunnelblick перестал работать в macOS Big Sur и как это исправить
- Как заставить работать OpenVPN Tunnelblick с Tap устройствами в macOS Big Sur?
- The Future of Tun and Tap VPNs on macOS
- Background
- The Long-Term Problem
- When will this happen?
- How to tell if a VPN requires a Tun or Tap System Extension
- How to modify a Tun VPN so it will not require the Tun system extension
- If macOS still complains
- Always load tun or always load tap
- Old versions of Tunnelblick will not help
- What Apple announced
- What is Tunnelblick doing about it?
Настройка OpenVPN в macOS
Настройка для Tunelblick
Если ваша версия macOS старшее MacOS X Leopard, вы можете воспользоваться клиентом OpenVPN Tunnelblick.
Tunnelblick также работает и на современных версиях macOS. Для настройки работы Tunellblick выполните следующие действия:
1. Скачайте инсталятор Tunelblick Tunnelblick и установите его.
2. Распакуйте конфигурационные файлы, выданные техподдержкой. Вы также можете их скачать в личном кабинете.
3. Откройте файл с конфигурационного файла ovpn в программе Tunnelblick.
4. Выберите в меню Tunelblick пункт Connect config. При запросе логина и пароля, ввести их, взяв из файла pass.txt,
который также был в архиве с конфигурационными файлами.
5. Для проверки работы сервиса, можете обратитесь к странице https://whoer.net/ru. В отчете Вы можете увидеть текущий IP-адрес.
После окончания работы с VPN, кликните в меню Tunelblick выберите Disconnect config.
Настройка для Viscosity
Если у Вас Mac OS X Leopard или новее, наиболее удобной в использовании является клиент OpenVPN Viscosity.
В этом случае настройка VPN-сервиса сводится к следующим действиям:
1. Скачайте последнюю версию программы Viscosity и установите.
2. Распакуйте конфигурационные файлы, доступные в ваших заказах, в любой каталог.
3. Откройте конфигурационный файл ovpn в программе Viscosity.
4. Далее в верхнем меню рядом с часами кликаем на икноку Viscosity и в выпадающем меню программы выбираем Connect,
в диалоговом окне вводим имя пользователя и пароль (находятся в файле pass.txt в архиве в Ваших заказах).
5. Для проверки работы сервиса, можете обратитесь к странице https://whoer.net/ru. В отчете Вы можете увидеть текущий IP-адрес.
После окончания работы с VPN, кликните в меню Viscosity выберите Disconnect.
Настройка для OpenVPN Connect 3
1. Скачайте дистрибутив OpenVPN Connect 3 с официального сайта openvpn.net и установите его.
2. Скачайте конфигурационные файлы из личного кабинете и распакуйте их
3. Чтобы добавить конфигурационный файл в OpenVPN Connect просто переместите файл на приложение.
4. Отметье галочкой — Connect after import и нажмите Add
5. При появлении ошибки Connection error — Missing external certificate, нажмите Continue.
6. Вы можете избежать появления данной ошибки в будущем, добавив в конфигурационый файл ovpn строчку
после этого, изменённый конфигурационный файл нужно снова передобавить в OpenVPN Connect.
7. Впн подключение активируется, вы сможете управлять им в OpenVPN Connect.
Источник
OpenVPN Tunnelblick перестал работать в macOS Big Sur и как это исправить
Каждая новая версия macOS всё сильнее ужесточает правила безопасности и затрудняет загрузку системных расширений. Я довольно давно пользуюсь OpenVPN туннелями и до macOS Sierra включительно, Tunneblick мог автоматически загружать свои системные расширения без лишних вопросов.
В High Sierra, Mojave или Catalina для подключения к VPN нужно было подтвердить разрешение на загрузку системных расширений Tunneblick в системных настройках macOS в разделе «Безопасность и конфиденциальность».
Дело в том, что Tunnelblick использует специальный драйвер для работы Tap VPN, так как в macOS нет встроенного драйвера устройства Tap. Для Tun подключений загружать свой собственный драйвер, как правило не требуется, так как в системе уже имеется встроенный драйвер устройства «utun» и большинство конфигурационных файлов OpenVPN с ним прекрасно работают.
С выходом macOS Big Sur нельзя разрешить загрузку сторонних системных расширений, в том числе и загрузку драйвера Tap Tunneblick, а без этого данный тип подключений не работает.
На сайте разработчика написано как можно обойти данное ограничение системы, но потребуется отключить функцию защиты целостности системы System Integrity Protection (SIP).
Что касается меня, то было решено перенастроить работу OpenVPN сервера на работу через Tun, тут главное разобраться с маршрутизацией трафика, однако у подобного изменения есть и свои недостатки по сравнению с мостом (Tap интерфейс). Подробнее о настройке OpenVPN сервера в режиме Tun расскажу в следующей статье.
Как заставить работать OpenVPN Tunnelblick с Tap устройствами в macOS Big Sur?
Сразу оговорюсь, что отключение защиты целостности системы SIP macOS Big Sur делает ваш компьютер менее безопасным и Tap OpenVPN будет работать только на Intel Mac. Для новых компьютеров Apple с чипом M1 нужно ждать следующих обновлений от разработчиков Tunnelblick.
Итак, проверить активирована ли функция защиты целостности в вашей системе можно следующей командой:
$ csrutil status
System Integrity Protection status: enabled.
Чтобы её отключить, перезагружаем компьютер в режиме восстановления (Command + R), запускаем Терминал и пишем следующую команду:
После чего перезагружаем компьютер в обычном режиме и Tunnelblick должен начать работать. Включить обратно функцию защиты целостности системы можно командой csrutil enable, загрузившись снова в режим восстановления.
Если считаете статью полезной,
не ленитесь ставить лайки и делиться с друзьями.
Источник
The Future of Tun and Tap VPNs on macOS
Background
To connect to a VPN, Tunnelblick needs to use a special kind of device driver:
For a Tun VPN, macOS includes a built-in «utun» device driver which can be used so that Tunnelblick’s Tun system extension does not need to be loaded. Most OpenVPN configuration files will automatically use the «utun» driver, but some include options that require Tunnelblick to use its own Tun system extension. Those configuration files should be modified so that the built-in macOS «utun» device driver can be used. (For simple instructions to make such modifications, see Errors Loading System Extensions.)
For a Tap VPN, Tunnelblick’s Tap system extension must be loaded because macOS does not have a built-in Tap device driver.
Apple has made it more and more difficult to load system extensions with each new version of macOS. They have also announced that in «a future version» of macOS, you will not be able to use system extensions at all.
The Long-Term Problem
Apple has announced changes to macOS which affect many users of Tunnelblick.
You might see a warning from Tunnelblick about this change, or you might see the following warning when connecting your VPN:
What this means is:
If you have a Tap VPN, a future version of macOS will cause your VPN to stop working. (Apple’s announcement to developers is worded differently and may mean that users will be able to use some mechanism to enable Tap VPNs to continue to work, but that interpretation is contradicted by the warning shown above. See What Apple announced, below.) You may be able to convert your Tap VPN to a Tun VPN which will work. However, that requires being able to change the OpenVPN configurations on both your computer and on the VPN server, and it may not provide all of the networking facilities that you are currently using. Consult your VPN service provider or OpenVPN experts and support for help with doing this.
If you have a Tun VPN, your configurations may continue to work in future version of macOS without you doing anything, or you might need to make a simple change to the OpenVPN configuration file so that the configuration will continue to work. If your OpenVPN configuration file does not contain a «dev-node» option, you do not need to do anything and the configuration will continue to work. If your OpenVPN configuration file does contain a «dev-node» option, you will need to remove that option so the configuration continues to work (see below).
When will this happen?
Apple does not announce its intentions in advance, so there may not be any prior notice of this change. It may appear in a version of macOS Big Sur, or may appear in a later version of macOS.
For updated information about macOS Big Sur, see Tunnelblick on macOS Big Sur.
How to tell if a VPN requires a Tun or Tap System Extension
Tunnelblick will warn you if one or more of your VPNs requires a Tun or Tap system extension, but you will not see this warning if you clicked «do not warn me about this again». You can «Reset Disabled Warnings» (on the «Preferences» panel of Tunnelblick’s «VPN Details» window) and then quit and relaunch Tunnelblick to be warned about the problem, or you can do the following for each of your VPN configurations:
- Click to select the configuration in the left side of the «Configurations» panel of Tunnelblick’s «VPN Details» window.
- Click on the little «gear» icon at the bottom of the list, then click «Edit OpenVPN Configuration File» or «Examine OpenVPN Configuration File».
- Look in the new window for lines that begin with «dev»:
- Click to select a configuration in the left side of the «Configurations» panel of Tunnelblick’s «VPN Details» window.
- Click on the little «gear» icon at the bottom of the list of configurations. If you can click «Make Configuration Private…», do so and have a computer administrator authorize the change. (If you can’t click it, don’t : )
- Click on the little «gear» icon and click on «Edit OpenVPN Configuration File…». The configuration file will open in Apple’s «TextEdit» editor.
- Find a line that starts with «dev-node tun». If you find one, delete the line. If you dont find one, skip the next step.
- Look for a line that starts «dev tun» or «dev-type tun». If neither one exists in the file, add a new line that says «dev tun».
- Quit TextEdit, saving the changes if asked.
- If you previously made the configuration private, make it shared by clicking the little «gear» icon, clicking «Make Configuration Shared», and having the change authorized by a computer administrator.
- Tap configurations always require the use of one system extension.
- Tun configurations may require the use of the other system extension but can easily be modified so no system extension is required.
If a line begins with «dev tap» the VPN requires a Tap system extension.
If a line begins with «dev-node tun», the VPN requires a Tun system extension, but you can modify the OepnVPN configuration file so the Tun system extension is not required; see below.
Otherwise, the VPN does not require a Tun or Tap system extension.
How to modify a Tun VPN so it will not require the Tun system extension
First, make sure the VPN does not have «Always load Tun driver» selected in the «Advanced» settings window.
Then, you need to remove the dev-node option if it exists in the VPN’s OpenVPN configuration file and make sure a «dev tun» option exists:
If you made changes to the file and did not change it from shared to private and back to shared, the next time you connect the configuration you will be asked to have a computer administrator authorize the changes.
If macOS still complains
Always load tun or always load tap
If you have a Tun VPN which does not need to be modified, or has been modified as described above, and Tunnelblick or macOS Catalina still complains, then you have changed a Tunnelblick setting and should restore it to the default setting. All configurations should be set to «Load tun driver automatically» and «Load tap driver automatically». These settings are found on the «Connecting & Disconnecting» tab of the «Advanced» settings window. Recent versions of Tunnelblick will automatically disable loading of «tun» and «tap» system extensions on versions of macOS that do not allow Tunnelblick to load them.
Old versions of Tunnelblick will not help
This situation is caused by changes in macOS, not a change in Tunnelblick, so older versions of Tunnelblick will not help. All Macs running OS X 7.5 or later should use the latest stable or beta version of Tunnelblick. See Deprecated Downloads for a version of Tunnelblick that should be used on earlier versions of OS X and on all PowerPC Macs.
What Apple announced
Apple has announced that «future OS releases will no longer load system extensions that use deprecated KPIs by default». Tunnelblick includes, and for some configurations loads one of two such extensions:
It isn’t clear what Apple means by the phrase «by default». It may mean that Apple will provide a mechanism for users to allow loading of system extensions that use deprecated KPIs. However, Apple’s practice has been to make such mechanisms very difficult to use, and the warning in macOS Catalina does not indicate such a mechanism will be provided.
Early versions of macOS Big Sur may allow system extensions to be loaded if SIP is disabled, see Tunnelblick on macOS Big Sur.
What is Tunnelblick doing about it?
In the short term:
macOS Catalina loads Tunnelblick’s system extensions (which are signed by «Jonathan Bullard»), but the user must interactively allow this in the Security and Privacy window of System Preferences.
macOS Big Sur 11.0.1 refuses to load Tunnelblick’s existing, notarized system extensions unless SIP is disabled. It isn’t known if this behavior will be present in future versions of Big Sur; 11.1.0 does not require SIP to be disabled. Apple’s suggested workaround, using an «installer package», cannot be easily integrated into the Tunnelblick installation process. It is possible that someone else will develop an installer which can load Tunnelblick’s system extensions and make it publicly available, but there is no way to know if or when that will happen. (If it does happen, we expect to link to the installer or installers on the Downloads page.)
Versions of Tunnelblick that are running on macOS Big Sur may disable loading of system extensions. You may override this; see Tunnelblick on macOS Big Sur for details.
Apple proposes that programs such as Tunnelblick be modified to use a different method to accomplish the function that the system extensions currently perform. The current Tunnelblick developers do not have the time or expertise to use the new method Apple proposes and have no plans to do so. It is possible that someone else will develop such an alternative method and make it publicly available, but there is no way to know if or when that will happen. (If it does happen, we expect to include it in Tunnelblick.)
In the longer term:
At some point in the future when Tunnelblick no longer supports versions of macOS that can load system extensions, system extension loading and unloading will probably be removed from Tunnelblick. Historically, Tunnelblick has supported several years of macOS releases. As of June 2020 Tunnelblick supports OS X and macOS versions as far back as 10.7.5, which was released in 2012, so it is anticipated that the removal will not take place until the mid- to late-2020s.
Источник