- Немного описания:
- Первоначальная настройка
- Citrix и программно-определяемые сети cisco
- Convert .pfx certificate to pem format
- Create key and certificate request
- Default management certificate key length
- Export certificate files from netscaler
- Link intermediate certificate to server certificate
- Manual binding method
- Methods of replacing the management certificate
- Navigation
- Netscaler access gateway
- Replace management certificate
- Request management certificate
- Ssl certificate – update
- To convert pfx to pem (with private key encryption)
- To create a key pair on netscaler
- To export a windows certificate in .pfx format
- To get the correct intermediate certificate
- To import a .pfx file
- To import the intermediate certificate
- Update certificate method
- Виртуальные сервера
- Режимы пересылки пакетов
- План настройки xendesktop 7.1 у меня такой (тут)
Немного описания:
Будем считать что у нас уже есть NetScaler MPX или VPX (mpx – железка, vpx – виртуальное приложение). В качестве тестирования можете использовать NetScaler VPX Express. Тем более что он бесплатный с полным функционалом, только ограниченный по пропускной способности.
Прежде чем мы начнем, давайте вспомним некоторые термины. Главное знать, это четыре разных IP адреса которые NetScaler использует.
типы IP адресов в NetScaler
NetScaler IP address (NSIP) – управляющий IP адрес для доступа к системе, heartbeat интерфейс для HA, syslog source, etc;
Virtual IP address (VIP) – IP ассоциированный с виртуальным сервером. Зачастую является публичным IP адресом, с которым соединяются клиенты;
Mapped IP address (MIP) – MIP адрес используется для соединений с серверами. Зачастую является адресом смотрящим в сторону ваших серверов для которых нужно осуществлять балансировку нагрузки и/или обеспечивает доступ через Access Gateway и/или защищает приложения с помощью Web Application Firewall
Subnet IP address (SNIP) – когда Netscaler взаимодействует с множеством подсетей SNIP могут быть настроены как MIP для предоставления доступа к этим подсетям. SNIP можно привязывать к VLAN и интерфейсам.
Также будем считать, что первоначальная настойка NS произведена (сконфигурированы IP адреса и установлены лицензии).
Осторожно, под капотом много картинок
Подключаемся к WEB консоли NS:
Проверим, что настроены IP адреса, нажав на Network -> IPs в консоли
Переходим к самому интересному:Настройка веб-интерфейса…
Первоначальная настройка
Настроим hostname, IP (с их настройкой проблем возникнуть не должно, справку по типам адресов можно получить в начале статьи), DNS, NTP, timezone, syslog, установим SSL сертификат.
Citrix и программно-определяемые сети cisco
Партнерство Citrix и Cisco существует давно, и в 2021 году Cisco
о завершении продаж своих балансировщиков, рекомендовала своим заказчикам Citrix NetScaler ADC. Каким же образом Citrix поддерживает это партнерство?
Сейчас многие заказчики рассматривают такой подход к построению сетей передачи данных как программно-определяемые сети (SDN), в котором уровень управления сетью отделен от устройств передачи данных и реализуется программно. Говоря простым языком, SDN — это некий набор устройств (более или менее «умных»), которые управляются с единого контроллера.
На поле SDN играют много поставщиков, часть из них разрабатывает свои SDN сети, другие предлагают решения, которые интегрируются с теми или иными производителями. Citrix не выпускает своего собственного SDN-решения, а старается предложить заказчикам продукт, который можно использовать с программно-определяемыми сетями различных поставщиков — зачем конкурировать с другими производителями, когда можно с ними сотрудничать?
Например: Netscaler ADC может быть интегрирован с SDN компонентом Neutron от OpenStack, управляться через единый контроллер и работать как сервис — автоматически выделять ресурсы, конфигурировать их и запускать в работу. Интеграция существует и с другими поставщиками. Если говорить про SDN от Cisco, то тут главная составляющая — интеграция с Cisco ACI.
Cisco ACI — это технология, работающая с определенными моделями оборудования, а именно с линейкой коммутаторов Cisco 9000, которые могут работать как отдельно, так и под управлением единого контроллера Cisco APIC. В эту сеть коммутаторов, где каждый коммутатор связан с каждым, интегрируется балансировщик Netscaler ADC.
И теперь контроллер сам инструктирует все сетевые устройства — что им настроить, чтобы наилучшим образом соединить между собой все точки сети. Не нужно перестраивать сеть, чтобы воссоздать классическое представление сети, и концепция программно-определяемой сети работает в полную силу.
Citrix Netscaler ADC интегрируется с контроллером Cisco APIC и управляется с этого контроллера. Для этого на контроллер устанавливается специальный драйвер, после чего контроллер может интерпретировать API-команды от Cisco в API-команды, понятные Netscaler.
Связка Netscaler ADC–Cisco ACI обеспечивает фактически любые степени масштабируемости пропускной способности. Масштабируемость NetScaler обеспечивается как для аппаратных, так и для виртуальных устройств. Для аппаратных устройств в рамках одной серии можно перейти с «младшей» модели на «старшую», не заменяя аппаратное обеспечение.
Если пропускной способности старшей модели не хватает, несколько комплексов Citrix Netscaler ADC можно собрать в кластер, расширив таким образом пропускную способность. В таком кластере может быть до 32 узлов. Модель Citrix с самой высокой пропускной способностью сегодня позволяет обработать поток до 160 Гбит/с — умножьте это в 32 раза.
Заказчики, имеющие несколько центров обработки данных, благодаря возможностям Netscaler ADC могут обеспечить единую точку входа для своих пользователей. Netscaler поддерживает технологию так называемой глобальной балансировки нагрузки серверов GSLB (Global Server Load Balancing), которая способна решать задачу балансировки для произвольно расположенных ферм серверов, например, учитывая их удаленность от конечного пользователя.
Эта система может поддерживать несколько разных алгоритмов распределения нагрузки и обеспечивать оптимальное обслуживание клиентов, разбросанных по всему миру. Для администраторов система дает возможность формирования гибкой политики управления ресурсами.
Эта технология основана на DNS, и Netscaler ADC выступает DNS-сервером для определенной зоны, но используя не статическую (по соответствию имени домена IP-адресу) запись, а динамическую (основную роль играет доменное имя, IP-адрес определяется балансировщиком).
Таким образом, решение позволяет обозначить у конечных пользователей единую точку входа, а уже Netscaler ADC, пользуясь технологией GSLB, определяет, какой центр обработки данных должен обрабатывать запросы пользователей. Технология позволяет прописать ряд правил, например: в зависимости от близости к центру обработки данных, в зависимости от загрузки канала, в зависимости от загрузки серверов, а также назначить центр обработки данных основным или резервным.
Из сказанного понятно, что партнерство Citrix и Cisco не ограничивается взаимными рекомендациями — это технологическое партнерство с совместной разработкой и внедрением протоколов взаимодействия оборудования. Сначала на Citrix Netscaler ADC появился первый проприетарный протокол Cisco vPath, затем протокол RISE, с которым возможность работать с оборудованием Cisco обеспечивает также и Citrix.
И наконец, Netscaler ADC стал участником экосистемы Cisco ACI, и не просто участником. По объему функциональности, который можно настроить через API контроллера Cisco — а это десятки функций — Citrix Netscaler ADC является лидером, и еще долгое время будет им оставаться.
Convert .pfx certificate to pem format
You can export a certificate (with private key) from Windows, and import it to NetScaler.
Create key and certificate request
If you want to create free Let’s Encrypt certificates, see John Billekens’ PowerShell script detailed at Let’s Encrypt Certificates on a NetScaler.
You can create a key pair and Certificate Signing Request (CSR) directly on the NetScaler appliance. The CSR can then be signed by an internal, or public, Certificate Authority.
Most Certificate Authorities let you add Subject Alternative Names when creating (or purchasing) a signed certificate, and thus there’s no reason to include Subject Alternative Names in the CSR created on NetScaler. You typically create a CSR with a single DNS name. Then when submitting the CSR to the Certificate Authority, you type in additional DNS names.
Default management certificate key length
To see the key size for the management certificate, right-click the ns-server-certificate (Server Certificate), and then click Details.

If the management certificate key size is less than 2048 bits, simply delete the existing ns-server-certificate certificate files, and reboot. NetScaler will create a new management certificate with 2048-bit keys.
- Go to Traffic Management > SSL.

- On the right, in the right column, click Manage Certificates / Keys / CSRs.

- Highlight any file named ns-* and delete them. This takes several seconds.

- Then go to the System node, and reboot.

- After a reboot, if you view the Details on the ns-server-certificate, it will be recreated as self-signed, with 2048-bit key size.

Export certificate files from netscaler
You can easily export certificate files from the NetScaler, and import them to a different NetScaler.
- Go to Traffic Management > SSL > Certificates > Server Certificates.

- Move your mouse over the certificate you want to export, and then click the information icon on the far left.

- Note the file names. There could be one or two file names.

- On the left, go to Traffic Management > SSL.

- On the right, in the right column, click Manage Certificates / Keys / CSRs.

- Find the file(s) in the list, right-click it, and click Download.
- While it seems like you can download multiple files, actually, it only downloads one at a time.

- You might have to increase the number of files shown per page, or go to a different page.

- While it seems like you can download multiple files, actually, it only downloads one at a time.
- Also download the files for any linked intermediate certificate.
- You can now use the downloaded files to install certificates on a different NetScaler.
Link intermediate certificate to server certificate
- Go back to Traffic Management > SSL > Certificates >Server Certificates.
- Right-click the server certificate, and click Link.

- The previously imported Intermediate certificate should already be selected. Click OK.

- You might be tempted to link the Intermediate certificate to a Root certificate. Don’t do this. Root certificates are installed on client machines, not on NetScaler. NetScaler must never send the root certificate to the client device.
Manual binding method
The manual Binding to Internal Services method is detailed below:
Methods of replacing the management certificate
There are two methods of replacing the management certificate:
Navigation
💡 = Recently Updated
Netscaler access gateway
Программный продукт (virtual appliance) который необходим для организации удаленного доступа к Citrix XenDesktop, старый Citrix XenApp, Citrix Mobile и прочее. Я обычно публикую ссылки на дистрибутивы и инструкции по получению триальных ключей для тех у кого нет партнерского доступа.
В этот раз помочь не могу, не знаю, как пользователю с улицы тестовый ключ получить, если у вас получится, сделайте скриншоты, пришлите мне пожалуйста.Одна из версий, объясняющая эту ситуацию, Acess Gateway настолько сложен, что для его настройки обязательно понадобится помощь (координация, советы, наставничество)
2-ой негатив…
Replace management certificate
You can replace the default management certificate with a new trusted management certificate.
Request management certificate
If you are creating a Subject Alternative Name certificate, it’s probably easiest to request a SAN certificate from an internal CA using the MMC Certificates snap-in on a Windows box.:
Ssl certificate – update
There are two options for updating a certificate:
- Create or Import a new certificate to NetScaler > Traffic Management > SSL > Certificates > Server Certificates. Then find all of the places the original certificate is bound, and manually replace the original certificate binding with the new certificate. This method is obviously prone to errors.
- On NetScaler, simply right-click the existing certificate, and click Update. This automatically updates all of the bindings. Much faster and easier.
To update a certificate using the Update method:
- Create an updated certificate, and export it as .pfx file (with private key). Don’t install the certificate onto NetScaler yet, but instead, simply have access to the .pfx file.
- In NetScaler, navigate to Traffic Management > SSL > Certificates > Server Certificates.

- On the right, right-click the certificate you intend to update, and click Update.

- Check the box next to Update the certificate and key.

- Click Choose File > Local, and browse to the updated .pfx file.

- NetScaler will prompt you to specify the .pfx file password.
- Click OK. This will automatically update every Virtual Server on which this certificate is bound.

- Intermediate certificate – After replacing the certificate, you might have to update the cert link to a new Intermediate certificate.
- Right-click the updated certificate, and click Cert Links, to see if it is currently linked to an intermediate certificate.
- If not, right-click the updated certificate, and click Link, to link it to an intermediate certificate. If it doesn’t give you an option to link it to, then you’ll first have to install the new intermediate certificate on the NetScaler.

Certificates can also be updated in NetScaler Management and Analytics System.
Certificates can be updated from the CLI by running update ssl certKey MyCert. However, the certificate files must be stored somewhere on the appliance, and already be in PEM format.
To convert pfx to pem (with private key encryption)
To convert PFX to PEM, do the following:
To create a key pair on netscaler
- On the left, expand Traffic Management, expand SSL, and click SSL Files.

- On the right, switch to the Keys tab.

- Click Create RSA Key.

- In the Key Filename box, enter a new filename (e.g. wildcard.key). Key pair files typically have a .key extension.
- In the Key Size field, enter 2048 bits.

- By default, the private key is unencrypted. To encrypt it, set the PEM Encoding Algorithm drop-down to AES256 (if NetScaler 12.1 build 49 or newer) or DES3.
- Enter a password to encrypt the private key.
- Click Create.

- To view the new file:
- Go to Traffic Management > SSL.
- On the right, in the right column, click Manage Certificates / Keys / CSRs.

- Scroll down to the new file, right-click it, and click View.

- The Private Key should be encrypted with your chosen encoding algorithm.

To export a windows certificate in .pfx format
- If Windows Server 2021 or newer, on the Windows server that has the certificate, you can run certlm.msc to open the Certificates console pointing at Local Computer.
- Or, run mmc.exe, manually add the Certificates snap-in, and point it to Local Computer.
- Go to Personal > Certificates.
- Right-click the certificate, expand All Tasks, and click Export.

- On the Welcome to the Certificate Export Wizard page, click Next.
- On the Export Private Key page, select Yes, export the private key, and click Next.

- On the Export File Format page, click Next.

- On the Security page, check the box next to Password, and enter a new temporary password. Click Next.

- On the File to Export page, specify a save location and name the .pfx file. Don’t put any spaces in the filename. Click Next.

- In the Completing the Certificate Export Wizard page, click Finish.
- Click OK when prompted that the export was successful.
To get the correct intermediate certificate
- Log into Windows, and double-click the signed certificate file.

- On the Certification Path tab, double-click the intermediate certificate (e.g. Go Daddy Secure Certificate Authority. It’s the one in the middle).

- On the Details tab, click Copy to File.

- In the Welcome to the Certificate Export Wizard page, click Next.

- In the Export File Format page, select Base-64 encoded, and click Next.

- Give it a file name, and click Next.

- In the Completing the Certificate Export Wizard page, click Finish.

To import a .pfx file
Newer builds of NetScaler ADC (e.g. 12.0 build 59 and 12.1 build 49) import .pfx files and use them in their native encrypted format.
- NetScaler ADC 12.0 build 58 and NetScaler ADC 12.1 build 48 had bugs preventing PFX files from importing correctly. Upgrade to a newer build.
Older builds of NetScaler ADC convert the .pfx file to an unencrypted .pem file that is named the same as the original .pfx file but with an additional .ns extension.
To import the .pfx file:
- On the NetScaler, expand TrafficManagement, and click SSL.
- If the SSL feature is disabled, right-click the SSL node, and click Enable Feature.

- Go to Traffic Management > SSL >Certificates > Server Certificates.

- There are four different certificate nodes:
- Server Certificates have private keys. These certificates are intended to be bound to SSL vServers.
- Client Certificates also have private keys, but they are intended to be bound to Services so NetScaler can perform client-certificate authentication against back-end web servers.
- CA Certificates don’t have private keys. The CA certificates node contains intermediate certificates that are linked to Server Certificates. CA certificates can also be used for SAML authentication, and to verify client certificates.
- Unknown Certificates list the certificates that don’t fall under the other categories. The Azure SAML certificate shows up here.
- On the left, click the Server Certificates node.
- On the right, click Install.

- Give the certificate (Certificate-Key Pair) a name.
- Click the drop-down next to Choose File, select Local, and browse to the .pfx file that you exported earlier.

- After browsing to the .pfx file, NetScaler ADC will prompt you to enter the password for the .pfx file.
- Then click Install.

- If you click the information icon next to the new certificate…

- You can now link an intermediate certificate to this SSL certificate, and then bind this SSL certificate to SSL and/or NetScaler Gateway Virtual Servers.
- To automatically backup SSL certificates and receive notification when the certificates are about the expire, deploy NetScaler Management and Analytics System. Also see Citrix CTX213342 How to handle certificate expiry on NetScaler.
To import the intermediate certificate
- In the NetScaler configuration GUI, expand Traffic Management, expand SSL, expand Certificates, and click CA Certificates.

- On the right, click Install.

- Name it Intermediate or similar.
- Click the arrow next to Choose File, select Local, and browse the Intermediate certificate file.

- Click Install.

Update certificate method
The Update Certificate button method is detailed below:
Виртуальные сервера
Виртуальный сервер (vserver) именованная сущность, целью которой является предоставить внешним пользователям доступ к приложениям. Vserver имеет имя (имеет значение только локально, служит для легкой идентификации при настройке), VIP, порт и протокол.
Режимы пересылки пакетов
Netscaler может либо маршрутизировать пакеты, предназначенные для IP адресов отличных от адресов Netscaler’a (NSIP, VIP, MIP, SNIP), либо коммутировать их. По умолчанию включен режим маршрутизации (L3 routing mode), а коммутация (L2 bridging mode) выключена.
Layer 2 mode
Этот режим контролирует функцию коммутации пакетов. В этом режиме Netscaler работает как мост для пакетов, которые предназначены не для него. Как уже говорилось по умолчанию этот режим выключен и NetScaler просто отбрасывает пакеты, которые не предназначены не для одного из его MAC адресов.
Осторожно включайте L2 режим. Вы не должны допускать ситуации, когда два и более интерфейсов NetScaler смотрят в один и тот же сегмент сети или параллельно установлен какое-нибудь L2 устройство. Так как NetScaler не поддерживает протоколы семейства STP вы получите петлю.
Layer 3 mode
Layer 3 mode контролирует функции маршрутизации пакетов, в этом режиме NetScaler производит пересылку пакетов согласно таблице маршрутизации для всех адресов, которые не принадлежат NetScaler.
MAC-based forwarding mode
MAC-based forwarding позволяет обрабатывать трафик более эффективно, позволяя избежать многочисленных ARP запросов и поисков в таблице маршрутизации. В этом режиме NetScaler кэширует MAC адрес отправителя для каждого соединения и возвращает данные на тот же самый MAC адрес.
Когда это может быть полезно? Рассмотрим следующую ситуацию:
- Поступает входящий запрос на VIP сервиса vSRVR-LB.
- NetScaler смотрит в кэш и выбирает первый сервер.
- Сервер отвечает NetScaler.
- NetScaler смотрит в кэш и выбирает маршрутизатор – инициатор соединения.
Особую полезность данная технология приобретает в том случае если Router1 и Router2 терминирует VPN сессии.
Однако, не все йогурты одинаково полезны. Имеют место быть дизайны, которые требуют чтобы входящие и исходящие пути проходили через разные маршрутизаторы. В таких ситуация MAC-based forwarding ломает всю схему.
Вот в принципе по теории и все. На самом деле тема куда более обширная и я рекомендую обратиться к официальной документации в случае если нужен более глубокий тюнинг вашего ADC.
План настройки xendesktop 7.1 у меня такой (тут)
- Настройка контроллера домена (тут)
- Установка vCenter server, создание кластера, подключение хоста ESXi (тут)
- Установка XenDesktop 7.1 (тут)
- Удаленный доступ через NetScaler (тут)
- Тонкие клиенты для XenDesktop 7.1 (тут)
