You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: deployment-strategies/amis-and-aws-cloudformation.md
+36-39Lines changed: 36 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,16 @@
1
1
# AMIs and AWS CloudFormation
2
2
3
-
{% hint style="info" %}
3
+
{% hint style="warning" %}
4
4
This feature is still under development. The documentation may be incomplete or refer to resources that are not yet available.
5
5
{% endhint %}
6
6
7
7
## AMIs (Amazon Machine Images)
8
8
9
9
We provide an AMI for each Defguard component (Core, Gateway and Proxy) which can be used to launch instances in AWS. The AMIs are available in the following regions:
10
10
11
-
-`us-east-1` (N. Virginia)
12
-
-`eu-west-1` (Ireland)
13
-
-`ap-northeast-1` (Tokyo)
11
+
*`us-east-1` (N. Virginia)
12
+
*`eu-west-1` (Ireland)
13
+
*`ap-northeast-1` (Tokyo)
14
14
15
15
We recommend using the AMIs either with a CloudFormation template or with our Terraform module, as they will automatically configure the instances with the necessary settings.
16
16
@@ -20,59 +20,59 @@ You can import the CloudFormation template from the AWS Marketplace or from our
20
20
21
21
The template consists of the following components:
22
22
23
-
-**Defguard Core**
24
-
-**Defguard Gateway** - The template has only one Gateway instance, but Defguard supports running multiple Gateways if you need more VPN locations.
25
-
-**Defguard Proxy**
26
-
-**PostgreSQL Database**
23
+
***Defguard Core**
24
+
***Defguard Gateway** - The template has only one Gateway instance, but Defguard supports running multiple Gateways if you need more VPN locations.
25
+
***Defguard Proxy**
26
+
***PostgreSQL Database**
27
27
28
28
We recommend reading the [Architecture documentation](https://docs.defguard.net/in-depth/architecture) to understand how these components interact.
29
29
30
30
The template has the following configurable parameters:
31
31
32
32
### Core Instance
33
33
34
-
-`CoreCookieInsecure` (optional): If set to `true`, Defguard Core will use insecure cookies. This is not recommended for production environments. Set it to `true` if you are using HTTP instead of HTTPS.
35
-
-`CoreGrpcPort` (optional): The gRPC port, default is `50051`. This is used for communication between Defguard components.
36
-
-`CoreHttpPort` (optional): The HTTP port on which Defguard Core should listen, default is `8000`. This is where the Defguard web UI will be accessible.
37
-
-`CoreInstanceType` (optional): The instance type (e.g., `t3.medium`, `m5.large`), default is `t3.micro`.
38
-
-`CoreLogLevel` (optional): The log level of Defguard Core, default is `info`.
39
-
-`CoreUrl` (required): The URL where Defguard Core will be accessible (e.g., `https://defguard.example.com`). This should be the URL that users will use to access the Defguard web interface.
40
-
-`CoreDefaultAdminPassword` (optional): The default password for the `admin` user, default is `pass123`. This should be changed to a more secure password in production environments.
34
+
*`CoreCookieInsecure` (optional): If set to `true`, Defguard Core will use insecure cookies. This is not recommended for production environments. Set it to `true` if you are using HTTP instead of HTTPS.
35
+
*`CoreGrpcPort` (optional): The gRPC port, default is `50051`. This is used for communication between Defguard components.
36
+
*`CoreHttpPort` (optional): The HTTP port on which Defguard Core should listen, default is `8000`. This is where the Defguard web UI will be accessible.
37
+
*`CoreInstanceType` (optional): The instance type (e.g., `t3.medium`, `m5.large`), default is `t3.micro`.
38
+
*`CoreLogLevel` (optional): The log level of Defguard Core, default is `info`.
39
+
*`CoreUrl` (required): The URL where Defguard Core will be accessible (e.g., `https://defguard.example.com`). This should be the URL that users will use to access the Defguard web interface.
40
+
*`CoreDefaultAdminPassword` (optional): The default password for the `admin` user, default is `pass123`. This should be changed to a more secure password in production environments.
41
41
42
42
### Database
43
43
44
-
-`DbInstanceClass` (optional): The instance class for the PostgreSQL database, default is `db.t3.micro`.
45
-
-`DbName` (optional): The name of the PostgreSQL database, default is `defguard`.
46
-
-`DbPassword` (optional): The password for the PostgreSQL database, default is `defguard`. This should be changed to a more secure password in production environments.
47
-
-`DbPort` (optional): The port on which the PostgreSQL database will listen, default is `5432`.
48
-
-`DbStorage` (optional): The storage size for the PostgreSQL database, default is `20`. This is the size in GB.
49
-
-`DbUsername` (optional): The username for the PostgreSQL database, default is `defguard`.
44
+
*`DbInstanceClass` (optional): The instance class for the PostgreSQL database, default is `db.t3.micro`.
45
+
*`DbName` (optional): The name of the PostgreSQL database, default is `defguard`.
46
+
*`DbPassword` (optional): The password for the PostgreSQL database, default is `defguard`. This should be changed to a more secure password in production environments.
47
+
*`DbPort` (optional): The port on which the PostgreSQL database will listen, default is `5432`.
48
+
*`DbStorage` (optional): The storage size for the PostgreSQL database, default is `20`. This is the size in GB.
49
+
*`DbUsername` (optional): The username for the PostgreSQL database, default is `defguard`.
50
50
51
51
### Gateway Instance
52
52
53
-
-`GatewayInstanceType` (optional): The instance type for the Gateway, default is `t3.micro`.
54
-
-`GatewayLogLevel` (optional): The log level for the Gateway, default is `info`.
55
-
-`GatewaySecret` (required): The secret used to authenticate the Gateway with Defguard Core. This should be a strong, random string, 64 characters long.
53
+
*`GatewayInstanceType` (optional): The instance type for the Gateway, default is `t3.micro`.
54
+
*`GatewayLogLevel` (optional): The log level for the Gateway, default is `info`.
55
+
*`GatewaySecret` (required): The secret used to authenticate the Gateway with Defguard Core. This should be a strong, random string, 64 characters long.
56
56
57
57
### Proxy Instance
58
58
59
-
-`ProxyGrpcPort` (optional): The gRPC port for the Proxy, default is `50051`.
60
-
-`ProxyHttpPort` (optional): The HTTP port for the Proxy, default is `8000`. This is where the Defguard Proxy web UI will be accessible. The proxy UI is used for user enrollment.
61
-
-`ProxyInstanceType` (optional): The instance type for the Proxy, default is `t3.micro`.
62
-
-`ProxyLogLevel` (optional): The log level for the Proxy, default is `info`.
63
-
-`ProxyUrl` (required): The URL where the Defguard Proxy will be accessible (e.g., `https://proxy.defguard.example.com`). This should be the URL that users will use to access the Defguard Proxy web UI.
59
+
*`ProxyGrpcPort` (optional): The gRPC port for the Proxy, default is `50051`.
60
+
*`ProxyHttpPort` (optional): The HTTP port for the Proxy, default is `8000`. This is where the Defguard Proxy web UI will be accessible. The proxy UI is used for user enrollment.
61
+
*`ProxyInstanceType` (optional): The instance type for the Proxy, default is `t3.micro`.
62
+
*`ProxyLogLevel` (optional): The log level for the Proxy, default is `info`.
63
+
*`ProxyUrl` (required): The URL where the Defguard Proxy will be accessible (e.g., `https://proxy.defguard.example.com`). This should be the URL that users will use to access the Defguard Proxy web UI.
64
64
65
65
### Network configuration
66
66
67
-
-`VpcCidr` (optional): The CIDR block for the VPC in which Defguard will be deployed, default is `10.0.0.0/16`.
68
-
-`VpcName` (optional): The name of the VPC, default is `defguard-vpc`.
67
+
*`VpcCidr` (optional): The CIDR block for the VPC in which Defguard will be deployed, default is `10.0.0.0/16`.
68
+
*`VpcName` (optional): The name of the VPC, default is `defguard-vpc`.
69
69
70
70
### VPN Network (Location) configuration
71
71
72
-
-`VpnNetworkAddress` (optional): The CIDR address for the VPN network, default is `10.10.10.1/24`. The VPN clients will receive IP addresses from this range. The gateway will have the first address in the range.
73
-
-`VpnNetworkName` (optional): The name of the VPN network (location). This is displayed both to the clients and in the Defguard web UI, default is `vpn1`.
74
-
-`VpnNetworkNat` (optional): If set to `true`, the VPN will have masquerading enabled, allowing clients to access other networks through the VPN (e.g., the internet). Default is `true`.
75
-
-`VpnNetworkPort` (optional): The UDP port on which the VPN will listen for incoming VPN connections, default is `51820`.
72
+
*`VpnNetworkAddress` (optional): The CIDR address for the VPN network, default is `10.10.10.1/24`. The VPN clients will receive IP addresses from this range. The gateway will have the first address in the range.
73
+
*`VpnNetworkName` (optional): The name of the VPN network (location). This is displayed both to the clients and in the Defguard web UI, default is `vpn1`.
74
+
*`VpnNetworkNat` (optional): If set to `true`, the VPN will have masquerading enabled, allowing clients to access other networks through the VPN (e.g., the internet). Default is `true`.
75
+
*`VpnNetworkPort` (optional): The UDP port on which the VPN will listen for incoming VPN connections, default is `51820`.
76
76
77
77
### Customizing the deployment
78
78
@@ -86,10 +86,9 @@ By default, the CloudFormation template will deploy Defguard with the settings a
86
86
| Proxy | 8000 (HTTP) | Anywhere |
87
87
| Gateway | 51820 (UDP) | Anywhere |
88
88
89
-
90
89
You can customize the deployment by modifying the template or doing changes in the AWS Infrastructure Composer.
91
90
92
-
To modify an existing stack deployed from the template, you can use the AWS Console, navigate to the CloudFormation service, select your stack, click on "Update stack" and then choose "Create a change set".
91
+
To modify an existing stack deployed from the template, you can use the AWS Console, navigate to the CloudFormation service, select your stack, click on "Update stack" and then choose "Create a change set".
93
92
94
93

95
94
@@ -101,8 +100,6 @@ If you want to modify the template itself, the easiest way is to edit it in the
101
100
102
101

103
102
104
-
105
-
106
103
#### Granting SSH access to the instances
107
104
108
105
By default, the instances won't allow traffic on port 22. You can temporarily allow SSH access by modifying the security group of the instances. To do this, edit the template, and change the given component's security group to allow traffic on port 22 (ideally from your IP address).
0 commit comments