Cisco anyconnect linux server

Installing and Using AnyConnect on Ubuntu Desktop using the User Interface

The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.

Objective

The objective of this article is to guide you through installing and using AnyConnect VPN Client v4.9.x on Ubuntu Desktop version 20.04 using the User Interface (UI).

Introduction

AnyConnect Secure Mobility Client is a modular endpoint software product. It not only provides Virtual Private Network (VPN) access through Secure Sockets Layer (SSL) and Internet Protocol Security (IPsec) Internet Key Exchange version2 (IKEv2) but also offers enhanced security through various built-in modules.

AnyConnect Software Version

Table of Contents

Installing AnyConnect Secure Mobility Client v4.9.x

This toggled section provides details and tips for beginners.

Prerequisites

  • You need to purchase client license(s) from a partner like CDW or through your company’s device procurement. There are options for 1 user (L-AC-PLS-3Y-S5) or packets of licenses including one year for 25 users (AC-PLS-P-25-S). Other license options available as well, including perpetual licenses. For more details on licensing, check out the links in the Licensing Information section below.
  • Download the latest version of firmware available for your router.(Click here for step-by-step instructions on this process.)
  • Ubuntu 20.04 (LTS), 18.04 (LTS), and 16.04 (LTS) .

Applicable Devices | Software Version

Licensing Information

AnyConnect client licenses allow the use of the AnyConnect desktop clients as well as any of the AnyConnect mobile clients that are available. You will need a client license to download and use the Cisco AnyConnect Secure Mobility Client. A client license enables the VPN functionality and are sold in packs of 25 from partners like CDW or through your company’s device procurement.

Читайте также:  Wii games on linux

Want to know more about AnyConnect licensing? Here are some resources:

Step 1

Open a web browser and navigate to the Cisco Software Downloads webpage.

Navigate to Cisco Software Downloads webpage.

Step 2

In the search bar, start typing ‘Anyconnect’ and the options will appear. Select AnyConnect Secure Mobility Client v4.x.

Step 3

Download the Cisco AnyConnect VPN Client. Most users will select the AnyConnect Pre-Deployment Package (Linux 64-bit) option.

The images in this article are for AnyConnect v4.9.x, which was latest version at the time of writing this document.

Download the AnyConnect Pre-Deployment Package for Linux from Cisco Software Downloads.

If you purchased a license and you are unable to download AnyConnect, call +1 919-993-2724. Select option 2. You will need to know your Cisco ID (the one you use to log into Cisco.com) and the sales order number when you call. They will get that situation all straightened out.

Step 4

Navigate to the folder where you have downloaded the AnyConnect Client Package.

Navigate to the folder where you have downloaded the AnyConnect Client Package.

Step 5

The initial download is a tarball archive (*.TAR, several files packed into one), which must be extracted. To extract the files, right- click on the AnyConnect archive and choose Open with Archive Manager. Click Extract.

The initial download is a tarball archive (*.TAR, several files packed into one), which must be extracted. To extract the files, right- click on the AnyConnect archive and choose Open with Archive Manager. Click Extract.

Step 6

You will see a notification once the extraction is completed. Click Close.

You will see a notification once the extraction is completed. Click Close.

Step 7

Locate the vpn_install.sh file in the extracted folder.

Locate the vpn_install.sh file in the extracted folder.

To run the AnyConnect install script, open a Linux Terminal by pressing Ctrl+Alt+T on your keyboard.

Type ‘sudo ./vpn_install.sh’. This will begin the installation process. For more details on the ‘sudo’ command, click here.

To run the AnyConnect install script, open a Linux Terminal by pressing Ctrl+Alt+T on your keyboard. Type ‘sudo ./vpn_install.sh’.

Step 8

Accept the terms in the license agreement to complete the installation by typing ‘y’.

Accept the terms in the license agreement to complete the installation by typing ‘y’.

Using AnyConnect Secure Mobility Client v4.9.x

Step 1

To access the AnyConnect app, click on the start icon (appears as nine dots on the lower left corner). Choose the Cisco Anyconnect app.

To access the AnyConnect app, click on the start icon (appears as nine dots on the lower left corner). Choose the Cisco Anyconnect app.

Alternatively, press Super+A (Super key is the windows icon key) on your keyboard to bring up the search bar. Start typing ‘Anyconnect’ and the app will appear.

Alternatively, press Super+A (Super key is the windows icon key) on your keyboard to bring up the search bar. Start typing 'Anyconnect' and the app will appear.

Step 2

Click on the AnyConnect Secure Mobility Client icon.

Click on the AnyConnect Secure Mobility Client icon.

Step 3

Enter the IP Address or Hostname of your desired server followed by the port number.

Читайте также:  Администрирование локальной сети linux

For RV340 family, the default port number is 8443.

Enter the IP Address or Hostname of your desired server followed by the port number.

Step 4

Enter your Username and Password in the fields provided. Click Connect.

Enter your Username and Password in the fields provided. Click Connect.

Step 5

Some connections may not be secure using a trusted SSL certificate. By default, AnyConnect Client will block connection attempts to these servers.

Uncheck Block connections to untrusted servers under Preferences to connect to these servers.

Some connections may not be secure using a trusted SSL certificate. By default, AnyConnect Client will block connection attempts to these servers. Uncheck Block connections to untrusted servers under Preferences to connect to these servers.

Step 6

As soon as the connection is established, the login Banner will appear. Click Accept.

As soon as the connection is established, the login Banner will appear. Click Accept.

You will also see notification that the Cisco AnyConnect Secure Mobility Client is Connected.

You will also see notification that the Cisco AnyConnect Secure Mobility Client is Connected.

Conclusion

There you have it! You have now successfully learned the steps to install and use the Cisco AnyConnect Secure Mobility Client v4.9.x on Ubuntu Desktop using the UI.

Источник

OCServ: Совместимый с CISCO AnyConnect VPN сервер на Linux

Различных протоколов для организации виртуальных частных сетей (VPN) существует великое множество. Многие из них созданы либо при участии компании CISCO, либо полностью разработаны ей. Среди последних есть весьма удачные: технически прогрессивные и простые в настройке на клиентских устройствах. Среди таких можно выделить CISCO AnyConnect.

AnyConnect работает как поверх TCP, так и поверх UDP, поддерживает шифрование и сжатие трафика, а в самой простой конфигурации клиенту для подключения достаточно адреса сервера, логина и пароля. Кроме того существует открытая реализация сервера, о которой и пойдёт речь ниже.

Начальные условия: VPS от Vultr с Ubuntu 18.04, доменное имя «ocserv.example.com», указывающее на IP-адрес VPS. Необходимо развернуть AnyConnect сервер и разрешить клиентам заворачивать весь трафик через него. Логины и пароли необходимо хранить в отдельном файле.

Установка сервера

Для начала установим необходимые пакеты:

apt-get install ocserv certbot iptables-persistent denyhosts

После установки сервис запускается автоматически и потому на время написания настроек его надо остановить:

Теперь нам надо получить сертификат для нашего домена. Сертификат можно купить, но мы используем бесплатный сертификат от letsencrypt:

certbot certonly -d ocserv.example.com --standalone

Создадим файл с логинами и паролями (пока пустой):

Далее открываем в редакторе файл «/etc/ocserv/ocserv.conf» и приводим его к виду:

# Из этой подсети будут получать адреса клиента ipv4-network = 172.16.255.0/24 # Префикс имён сетевых интерфейсов клиентов device = vpns # Максимальное количество одновременных подключений max-clients = 16 # С одним и тем же логином не более двух одновременных подключений max-same-clients = 2 # Этот DNS-сервер будут использовать клиенты dns = 8.8.8.8 # Весь трафик клиентов надо заворачивать на сервер route = default # Если нужно заворачивать только отдельные подсети # То нужно убрать route = default и добавить строки вида: # route = 10.10.11.0/24 # route = 10.254.0.0/15 # Использовать сжатие трафика compression = true # Пользователи описываются в файле /etc/ocserv/passw auth = "plain[passwd=/etc/ocserv/passwd]" # Порты, на которых слушает сервис tcp-port = 443 udp-port = 443 # Сервис будет работать под непривилегированным пользователем run-as-user = nobody run-as-group = daemon # Пути к приватному ключу и сертификату server-cert = /etc/letsencrypt/live/ocserv.example.com/fullchain.pem server-key = /etc/letsencrypt/live/ocserv.example.com/privkey.pem # Остальные параметры # Их описание можно найти в документации:) socket-file = /var/run/ocserv-socket isolate-workers = true keepalive = 32400 dpd = 90 mobile-dpd = 1800 try-mtu-discovery = false cert-user-oid = 0.9.2342.19200300.100.1.1 tls-priorities = "NORMAL:%SERVER_PRECEDENCE:%COMPAT:-VERS-SSL3.0" auth-timeout = 240 min-reauth-time = 3 max-ban-score = 50 ban-reset-time = 300 cookie-timeout = 300 deny-roaming = false rekey-time = 172800 rekey-method = ssl use-utmp = true use-occtl = true pid-file = /var/run/ocserv.pid predictable-ips = true ping-leases = false cisco-client-compat = true dtls-legacy = true

Закончив настройку запускаем сервис:

Читайте также:  Linux ssh авторизация ключами

Включаем пересылку пакетов между интерфейсами:

echo "net.ipv4.ip_forward = 0" > /etc/sysctl.d/99-my.conf sysctl net.ipv4.ip_forward=1

Настраиваем NAT на внешнем интерфейсе и сохраняем правила:

iptables -t nat -A POSTROUTING -s 172.16.255.0/24 -j MASQUERADE -o ens3 netfilter-persistent save

Для автоматического обновления сертификата создадим скрипт «/etc/cron.weekly/certbot-ocserv»:

#!/bin/sh exec >> /dev/null 2>> /dev/null service ocserv stop certbot renew service ocserv start

Наконец создадим пользователя командой:

ocpasswd -c /etc/ocserv/passwd username

На этом настройка сервера заканчивается и можно переходить к настройке клиентов.

Клиент на Android

Для подключения устройств на базе Android первым делом необходимо установить приложение AnyConnect. После запуска необходимо зайти в раздел «Подключения» и создать новое подключение в соответствии с настройками сервера. После этого вернуться на главный экран приложения и включить соединение.

CISCO AnyClient VPN клиент на Android

Клиент на iOS

Для смартфонов на платформе iOS так же существует приложение AnyConnect, внешне и по функционалу очень похожее на аналогичное приложение для Android. В нём так же надо создать новое подключение указав адрес сервера, логин и пароль и потом включить VPN галочкой на основном экране приложения.

CISCO AnyClient VPN клиент на iOS

Клиент на Linux или FreeBSD

В портах FreeBSD есть порт security/openconnect, а в репозиторях большинства Linux-дистрибутивов есть пакет openconnect, содержащий открытую реализацию клиента AnyConnect. Исходные тексты openconnect доступны тут. После установки openconnect подключаться к AnyConnect серверам можно командой:

openconnect ocserv.example.com

Кроме того поддержка AnyClient есть в Network Manager и пользователи, предпочитающие GUI, могут воспользоваться им. На Kubuntu 18.04 для этого как минимум необходимо установить пакеты «openconnect» и «network-manager-openconnect».

Настройка подключения к серверу AnyClient в KDE

Если что-то пошло не так

При возникновении проблем начала стоит убедиться что файл конфигурации на сервере не содержит ошибок:

ocserv --test-config --config /etc/ocserv/ocserv.conf

Затем проверить журнал работы сервиса на наличие ошибок командой:

journalctl -xe -u ocserv.service

И наконец необходимо проверить есть ли у клиента доступ к порту tcp/443 сервера.

На этом всё. Приятной работы!

Источник

Оцените статью
Adblock
detector