Deploy NetScaler Web App Firewall on AWS
Architecture for NetScaler Web App Firewall on AWS for production deployment
-
This architecture assumes the use of an AWS CloudFormation Template.
-
A VPC that spans two Availability Zones, configured with two public and four private subnets, according to AWS best practices, to provide you with your own virtual network on AWS with a /16 Classless Inter-Domain Routing (CIDR) block (a network with 65,536 private IP addresses).
-
Two instances of NetScaler Web App Firewall (Primary and Secondary), one in each Availability Zone.
-
Three security groups, one for each network interface (Management, Client, Server), that acts as virtual firewalls to control the traffic for their associated instances.
-
Three subnets, for each instance- one for management, one for client, and one for back-end server.
-
An internet gateway attached to the VPC, and a Public Subnets route table which is associated with public subnets so as to allow access to the internet. This gateway is used by the Web App Firewall host to send and receive traffic. For more information on Internet Gateways, see: Internet Gateways.
-
5 Route tables-one public route table associated with client subnets of both primary and secondary Web App Firewall. The remaining 4 route tables link to each of the 4 private subnets (management and server-side subnets of primary and secondary Web App Firewall).
-
AWS Lambda in Web App Firewall takes care of the following:
-
Configuring two Web App Firewall in each availability zone of HA mode
-
Creating a sample Web App Firewall Profile and thus pushing this configuration with respect to Web App Firewall
-
-
AWS Identity and Access Management (IAM) to securely control access to AWS services and resources for your users. By default, the CloudFormation Template (CFT) creates the required IAM role. However, users can provide their own IAM role for NetScaler ADC instances.
-
In the public subnets, two managed Network Address Translation (NAT) gateways to allow outbound internet access for resources in public subnets.
Cost and licensing
-
License model: Pay as You Go (PAYG, for the production licenses) or Bring Your Own License (BYOL, for the Customer Licensed AMI - Citrix ADC Pooled Capacity). For more information on Citrix ADC Pooled Capacity, see: Citrix ADC Pooled Capacity.
-
For BYOL, there are 3 licensing modes:
-
Configure NetScaler Pooled Capacity: Configure Citrix ADC Pooled Capacity
-
NetScaler VPX Check-in and Check-out Licensing (CICO): Citrix ADC VPX Check-in and Check-out Licensing
Tip:If users elect CICO Licensing with VPX-200, VPX-1000, VPX-3000, VPX-5000, or VPX-8000 application platform type, they should ensure that they have the same throughput license present in their NetScaler Console licensing server.-
NetScaler virtual CPU Licensing: NetScaler virtual CPU Licensing
-
-
-
Throughput: 200 Mbps or 1 Gbps
-
Bundle: Premium
Deployment options
-
The first option is to deploy using a Quick Start Guide format and the following options:
-
Deploy NetScaler Web App Firewall into a new VPC (end-to-end deployment). This option builds a new AWS environment consisting of the VPC, subnets, security groups, and other infrastructure components, and then deploys NetScaler Web App Firewall into this new VPC.
-
Deploy NetScaler Web App Firewall into an existing VPC. This option provisions NetScaler Web App Firewall in the user existing AWS infrastructure.
-
-
The second option is to deploy using Web App Firewall StyleBooks using NetScaler Console
AWS Quick Start
Step 1: Sign in to the user AWS account
-
Sign in to the user account at AWS: AWS with an IAM (Identity and Access Management) user role that has the necessary permissions to create an Amazon Account (if necessary) or sign in to an Amazon Account.
-
Use the region selector in the navigation bar to choose the AWS Region where users want to deploy High Availability across AWS Availability Zones.
-
Ensure that the user AWS account is configured correctly, refer to the Technical Requirements section of this document for more information.
Step 2: Subscribe to the NetScaler Web App Firewall AMI
-
This deployment requires a subscription to the AMI for NetScaler Web App Firewall in the AWS Marketplace.
-
Sign in to the user AWS account.
-
Open the page for the NetScaler Web App Firewall offering by choosing one of the links in the following table.
-
When users launch the Quick Start Guide in to deploy NetScaler Web App Firewall in Step 3 below, they use the NetScaler Web App Firewall Image parameter to select the bundle and throughput option that matches their AMI subscription. The following list shows the AMI options and corresponding parameter settings. The VPX AMI instance requires a minimum of 2 virtual CPUs and 2 GB of memory.
-
-
AWS Marketplace AMI
-
NetScaler Web Application Firewall (Web App Firewall) - 200 Mbps: Citrix Web App Firewall (Web App Firewall) - 200 Mbps
-
NetScaler Web Application Firewall (Web App Firewall) - 1000 Mbps: Citrix Web App Firewall (Web App Firewall) - 1000 Mbps
-
-
On the AMI page, choose Continue to Subscribe.

-
Review the terms and conditions for software usage, and then choose Accept Terms.
Note:Users receive a confirmation page, and an email confirmation is sent to the account owner. For detailed subscription instructions, see Getting Started in the AWS Marketplace Documentation: Getting Started. -
When the subscription process is complete, exit out of AWS Marketplace without further action. Do not provision the software from AWS Marketplace—users will deploy the AMI with the Quick Start Guide.
Step 3: Launch the AWS Quick Start
-
Sign in to the user AWS account, and choose one of the following options to launch the AWS CloudFormation template. For help with choosing an option, see deployment options earlier in this guide.
-
Deploy NetScaler VPX into a new VPC on AWS using one of the AWS CloudFormation Templates located here:
-
-
Each deployment takes about 15 minutes to complete.
-
Check the AWS Region that is displayed in the upper-right corner of the navigation bar, and change it if necessary. This is where the network infrastructure for Citrix Web App Firewall will be built. The template is launched in the US East (Ohio) Region by default.
-
On the Select Template page, keep the default setting for the template URL, and then choose Next.
-
On the Specify Details page, specify the stack name as per user convenience. Review the parameters for the template. Provide values for the parameters that require input. For all other parameters, review the default settings and customize them as necessary.
-
In the following table, parameters are listed by category and described separately for the deployment option:
-
Parameters to deploy NetScaler Web App Firewall into a new or existing VPC (Deployment Option 1)
-
When users finish reviewing and customizing the parameters, they should choose Next.
Parameters to deploy NetScaler Web App Firewall into a new VPC
VPC network configuration
| Parameter label (name) | Default | Description |
|---|---|---|
| Primary Availability Zone (PrimaryAvailabilityZone) | Requires input | The Availability Zone for Primary NetScaler Web App Firewall deployment |
| Secondary Availability Zone (SecondaryAvailabilityZone) | Requires input | The Availability Zone for Secondary NetScaler Web App Firewall deployment |
| VPC CIDR (VPCCIDR) | 10.0.0.0/16 | The CIDR block for the VPC. Must be a valid IP CIDR range of the form x.x.x.x/x. |
| Remote SSH CIDR IP(Management) (RestrictedSSHCIDR) | Requires input | The IP address range that can SSH to the EC2 instance (port: 22). |
| For example Using 0.0.0.0/0, will enable all IP addresses to access the user instance using SSH or RDP. Note: Authorize only a specific IP address or range of addresses to access the user instance because it is unsafe to use it in production. | ||
| Remote HTTP CIDR IP(Client) (RestrictedWebAppCIDR) | 0.0.0.0/0 | The IP address range that can HTTP to the EC2 instance (port: 80) |
| Remote HTTP CIDR IP(Client) (RestrictedWebAppCIDR) | 0.0.0.0/0 | The IP address range that can HTTP to the EC2 instance (port: 80) |
| Primary Management Private Subnet CIDR (PrimaryManagementPrivateSubnetCIDR) | 10.0.1.0/24 | The CIDR block for Primary Management Subnet located in Availability Zone 1. |
| Primary Management Private IP (PrimaryManagementPrivateIP) | — | Private IP assigned to the Primary Management ENI (last octet has to be between 5 and 254) from the Primary Management Subnet CIDR. |
| Primary Client Public Subnet CIDR (PrimaryClientPublicSubnetCIDR) | 10.0.2.0/24 | The CIDR block for Primary Client Subnet located in Availability Zone 1. |
| Primary Client Private IP (PrimaryClientPrivateIP) | — | Private IP assigned to the Primary Client ENI (last octet has to be between 5 and 254) from Primary Client IP from the Primary Client Subnet CIDR. |
| Primary Server Private Subnet CIDR (PrimaryServerPrivateSubnetCIDR) | 10.0.3.0/24 | The CIDR block for Primary Server located in Availability Zone 1. |
| Primary Server Private IP (PrimaryServerPrivateIP) | — | Private IP assigned to the Primary Server ENI (last octet has to be between 5 and 254) from the Primary Server Subnet CIDR. |
| Secondary Management Private Subnet CIDR (SecondaryManagementPrivateSubnetCIDR) | 10.0.4.0/24 | The CIDR block for Secondary Management Subnet located in Availability Zone 2. |
| Secondary Management Private IP (SecondaryManagementPrivateIP) | — | Private IP assigned to the Secondary Management ENI (last octet has to be between 5 and 254). It would allocate Secondary Management IP from the Secondary Management Subnet CIDR. |
| Secondary Client Public Subnet CIDR (SecondaryClientPublicSubnetCIDR) | 10.0.5.0/24 | The CIDR block for Secondary Client Subnet located in Availability Zone 2. |
| Secondary Client Private IP (SecondaryClientPrivateIP) | — | Private IP assigned to the Secondary Client ENI (last octet has to be between 5 and 254). It would allocate Secondary Client IP from the Secondary Client Subnet CIDR. |
| Secondary Server Private Subnet CIDR (SecondaryServerPrivateSubnetCIDR) | 10.0.6.0/24 | The CIDR block for Secondary Server Subnet located in Availability Zone 2. |
| Secondary Server Private IP (SecondaryServerPrivateIP) | — | Private IP assigned to the Secondary Server ENI (last octet has to be between 5 and 254). It would allocate Secondary Server IP from the Secondary Server Subnet CIDR. |
VPC Tenancy attribute (VPCTenancy) |
default | The allowed tenancy of instances launched into the VPC. Choose Dedicated tenancy to launch EC2 instances dedicated to a single customer. |
Bastion host configuration
| Parameter label (name) | Default | Description |
|---|---|---|
| Bastion Host required (LinuxBastionHostEIP) | No | By default, no bastion host will be configured. But if users want to opt for sandbox deployment select yes from the menu which would deploy a Linux Bastion Host in the public subnet with an EIP that would give users access to the components in the private and public subnet. |
NetScaler Web App Firewall Configuration
| Parameter label (name) | Default | Description |
|---|---|---|
| Key pair name (KeyPairName) | Requires input | A public/private key pair, which allows users to connect securely to the user instance after it launches. This is the key pair users created in their preferred AWS Region; see the Technical Requirements section. |
| NetScaler Instance Type (CitrixADCInstanceType) | m4.xlarge | The EC2 instance type to use for the ADC instances. Ensure that the instance type opted for aligns with the instance types available in the AWS marketplace or else the CFT might fail. |
| NetScaler ADC AMI ID (CitrixADCImageID) | — | The AWS Marketplace AMI to be used for NetScaler Web App Firewall deployment. This must match the AMI users subscribed to in step 2. |
NetScaler ADC VPX IAM role (iam:GetRole) |
— | This Template: AWS-Quickstart/Quickstart-Citrix-ADC-VPX/Templates creates the IAM role and the Instance Profile required for NetScaler VPX. If left empty, CFT creates the required IAM role. |
| Client PublicIP(EIP) (ClientPublicEIP) | No | Select "Yes" if users want to assign a public EIP to the user Client Network interface. Otherwise, even after the deployment, users still have the option of assigning it later if necessary. |
Pooled Licensing configuration
| Parameter label (name) | Default | Description |
|---|---|---|
| NetScaler Console Pooled Licensing | No | If choosing the BYOL option for licensing, select yes from the list. This allows users to upload their already purchased licenses. Before users begin, they should Configure NetScaler ADC Pooled Capacity to ensure NetScaler Console pooled licensing is available, see Configure NetScalerPooled Capacity |
| Reachable NetScaler Console / NetScaler Console Agent IP | Requires input | For the Customer Licensed option, whether users deploy NetScaler Console on-prem or an agent in the cloud, make sure to have a reachable NetScaler Console IP which would then be used as an input parameter. |
| Licensing Mode | Optional |
Users can choose from the 3 licensing modes:
|
| License Bandwidth in Mbps | 0 Mbps | Only if the licensing mode is Pooled-Licensing, then this field comes into the picture. It allocates an initial bandwidth of the license in Mbps to be allocated after BYOL ADCs are created. It should be a multiple of 10 Mbps. |
| License Edition | Premium | License Edition for Pooled Capacity Licensing Mode is Premium. |
| Appliance Platform Type | Optional | Choose the required Appliance Platform Type, only if users opt for CICO licensing mode. Users get the options listed: VPX-200, VPX-1000, VPX-3000, VPX-5000, VPX-8000. |
| License Edition | Premium | License Edition for vCPU based Licensing is Premium. |
AWS Quick Start configuration
| Parameter label (name) | Default | Description |
|---|---|---|
| Quick Start Guide S3 bucket name (QSS3BucketName) | aws-quickstart |
The S3 bucket users created for their copy of Quick Start Guide assets, if users decide to customize or extend the Quick Start Guide for their own use. The bucket name can include numbers, lowercase letters, uppercase letters, and hyphens, but should not start or end with a hyphen. |
| Quick Start Guide S3 key prefix (QSS3KeyPrefix) | quickstart-citrix-adc-vpx/ | The S3 key name prefix, from the Object Key and Metadata: Object Key and Metadata, is used to simulate a folder for the user copy of Quick Start Guide assets, if users decide to customize or extend the Quick Start Guide for their own use. This prefix can include numbers, lowercase letters, uppercase letters, hyphens, and forward slashes. |
-
On the Options page, users can specify a Resource Tag or key-value pair for resources in your stack and set advanced options. For more information on Resource Tags, see Resource Tag. For more information on setting AWS CloudFormation Stack Options, see Setting AWS CloudFormation Stack Options. When users are done, they should choose Next.
-
On the Review page, review and confirm the template settings. Under Capabilities, select the two check boxes to acknowledge that the template creates IAM resources and that it might require the capability to auto-expand macros.
-
Choose Create to deploy the stack.
-
Monitor the status of the stack. When the status is CREATE_COMPLETE, the NetScaler Web App Firewall instance is ready.
-
Use the URLs displayed in the Outputs tab for the stack to view the resources that were created.
Step 4: Test the deployment
-
NetScaler Web App Firewall checks the virtual servers that have IP sets attached to them.
-
NetScaler Web App Firewall finds the IP address that has an associated public IP address from the two IP addresses that the virtual server is listening on. One that is directly attached to the virtual server, and one that is attached through the IP set.
-
NetScaler Web App Firewall reassociates the public Elastic IP address to the private IP address that belongs to the new primary virtual IP address.
-
Connect to the primary instance
-
Perform a trigger action to force failover and check whether the secondary instance takes over.
Sh appfw profile QS-Profile
Connect to NetScaler Web App Firewall HA pair using bastion host
-
PrivateManagementPrivateNSIP and PrimaryADCInstanceID key’s value to be used in the later steps to SSH into the ADC.
-
Choose Services.
-
On the Compute tab, select EC2.
-
Under Resources, choose Running Instances.
-
On the Description tab of the primary Web App Firewall instance, note the IPv4 public IP address. Users need that IP address to construct the SSH command.
-
-
To store the key in the user keychain, run the command
ssh-add -K [your-key-pair].pem
-
Log in to the bastion host using the following command, using the value for LinuxBastionHostEIP1 that users noted in step 1.
ssh -A ubuntu@[LinuxBastionHostEIP1]
-
From the bastion host, users can connect to the primary Web App Firewall instance by using SSH.
ssh nsroot@[Primary Management Private NSIP]
NetScaler Console
Deploying NetScaler VPX instances on AWS using NetScaler Console
NetScaler Web App Firewall and OWASP Top 10 – 2017
-
Negative Security Model: With the negative security model, users employ a rich set of preconfigured signature rules to apply the power of pattern matching to detect attacks and protect against application vulnerabilities. Users block only what they don’t want and allow the rest. Users can add their own signature rules, based on the specific security needs of user applications, to design their own customized security solutions.
-
Hybrid security Model: In addition to using signatures, users can use positive security checks to create a configuration ideally suited for user applications. Use signatures to block what users don’t want, and use positive security checks to enforce what is allowed.
NetScaler Web App Firewall
Web App Firewall deployment strategy
NetScaler Console
NetScaler console application analytics and management features
Prerequisites
Limitations and usage guidelines
Technical requirements
Resources
| Resource | This deployment uses |
|---|---|
| VPCs | 1 |
| Elastic IP addresses | 0/1(for Bastion host) |
| IAM security groups | 3 |
| IAM roles | 1 |
| Subnets | 6(3/Availability zone) |
| Internet Gateway | 1 |
| Route Tables | 5 |
| Web App Firewall VPX instances | 2 |
| Bastion host | 0/1 |
| NAT gateway | 2 |