|
@@ -12,6 +12,7 @@ resource "aws_security_group" "vmray_server_sg" {
|
|
|
}
|
|
|
|
|
|
resource "aws_security_group_rule" "vmray_server_http_in_from_workers" {
|
|
|
+ description = "Allow inbound port 80 for redirect from other vmray servers"
|
|
|
type = "ingress"
|
|
|
from_port = 80
|
|
|
to_port = 80
|
|
@@ -21,6 +22,7 @@ resource "aws_security_group_rule" "vmray_server_http_in_from_workers" {
|
|
|
}
|
|
|
|
|
|
resource "aws_security_group_rule" "vmray_server_https_in_from_workers" {
|
|
|
+ description = "Allow inbound https for interserver communication from other vmray servers"
|
|
|
type = "ingress"
|
|
|
from_port = 443
|
|
|
to_port = 443
|
|
@@ -30,10 +32,11 @@ resource "aws_security_group_rule" "vmray_server_https_in_from_workers" {
|
|
|
}
|
|
|
|
|
|
resource "aws_security_group_rule" "vmray_server_https_in" {
|
|
|
- type = "ingress"
|
|
|
- from_port = 443
|
|
|
- to_port = 443
|
|
|
- protocol = "tcp"
|
|
|
+ description = "Allow https ingress from the VPN"
|
|
|
+ type = "ingress"
|
|
|
+ from_port = 443
|
|
|
+ to_port = 443
|
|
|
+ protocol = "tcp"
|
|
|
#cidr_blocks = var.cidr_map["vpc-access"]
|
|
|
source_security_group_id = aws_security_group.vmray_alb_internal.id
|
|
|
security_group_id = aws_security_group.vmray_server_sg.id
|
|
@@ -41,6 +44,7 @@ resource "aws_security_group_rule" "vmray_server_https_in" {
|
|
|
|
|
|
## VMRay Does DNS Lookups to the Local Network
|
|
|
resource "aws_security_group_rule" "vmray_server_tcpdns_out" {
|
|
|
+ description = "Allow DNS lookups to the local DNS server"
|
|
|
type = "egress"
|
|
|
from_port = 53
|
|
|
to_port = 53
|
|
@@ -50,6 +54,7 @@ resource "aws_security_group_rule" "vmray_server_tcpdns_out" {
|
|
|
}
|
|
|
|
|
|
resource "aws_security_group_rule" "vmray_server_udpdns_out" {
|
|
|
+ description = "Allow DNS lookups to the local DNS server"
|
|
|
type = "egress"
|
|
|
from_port = 53
|
|
|
to_port = 53
|
|
@@ -58,8 +63,9 @@ resource "aws_security_group_rule" "vmray_server_udpdns_out" {
|
|
|
security_group_id = aws_security_group.vmray_server_sg.id
|
|
|
}
|
|
|
|
|
|
-## VMRay Requires Direct Internet Access
|
|
|
+# tfsec:ignore:aws-vpc-no-public-egress-sgr VMRay Requires Direct Internet Access
|
|
|
resource "aws_security_group_rule" "vmray_server_http_out" {
|
|
|
+ description = "VMRay requires direct HTTP outbound"
|
|
|
type = "egress"
|
|
|
from_port = 80
|
|
|
to_port = 80
|
|
@@ -68,7 +74,9 @@ resource "aws_security_group_rule" "vmray_server_http_out" {
|
|
|
security_group_id = aws_security_group.vmray_server_sg.id
|
|
|
}
|
|
|
|
|
|
+# tfsec:ignore:aws-vpc-no-public-egress-sgr VMRay Requires Direct Internet Access
|
|
|
resource "aws_security_group_rule" "vmray_server_https_out" {
|
|
|
+ description = "VMRay requires direct HTTPS outbound"
|
|
|
type = "egress"
|
|
|
from_port = 443
|
|
|
to_port = 443
|
|
@@ -78,6 +86,7 @@ resource "aws_security_group_rule" "vmray_server_https_out" {
|
|
|
}
|
|
|
|
|
|
resource "aws_security_group_rule" "vmray_server_vnc_to_workers" {
|
|
|
+ description = "VMRay uses VNC for client machine access."
|
|
|
type = "egress"
|
|
|
from_port = 5900
|
|
|
to_port = 5999
|
|
@@ -95,6 +104,7 @@ resource "aws_security_group" "vmray_worker_sg" {
|
|
|
}
|
|
|
|
|
|
resource "aws_security_group_rule" "vmwary_worker_vnc_from_server" {
|
|
|
+ description = "VMRay uses VNC for client machine access."
|
|
|
type = "ingress"
|
|
|
from_port = 5900
|
|
|
to_port = 5999
|
|
@@ -104,6 +114,7 @@ resource "aws_security_group_rule" "vmwary_worker_vnc_from_server" {
|
|
|
}
|
|
|
|
|
|
resource "aws_security_group_rule" "vmwary_worker_vnc_from_access" {
|
|
|
+ description = "VMRay uses VNC for client machine access."
|
|
|
type = "ingress"
|
|
|
from_port = 5900
|
|
|
to_port = 5999
|
|
@@ -112,8 +123,8 @@ resource "aws_security_group_rule" "vmwary_worker_vnc_from_access" {
|
|
|
security_group_id = aws_security_group.vmray_worker_sg.id
|
|
|
}
|
|
|
|
|
|
-## VMRay Does DNS Lookups to the Local Network
|
|
|
resource "aws_security_group_rule" "vmray_worker_tcpdns_out" {
|
|
|
+ description = "VMRay does DNS lookups to an instance in the local vpc."
|
|
|
type = "egress"
|
|
|
from_port = 53
|
|
|
to_port = 53
|
|
@@ -123,6 +134,7 @@ resource "aws_security_group_rule" "vmray_worker_tcpdns_out" {
|
|
|
}
|
|
|
|
|
|
resource "aws_security_group_rule" "vmray_worker_udpdns_out" {
|
|
|
+ description = "VMRay does DNS lookups to an instance in the local vpc."
|
|
|
type = "egress"
|
|
|
from_port = 53
|
|
|
to_port = 53
|
|
@@ -131,7 +143,9 @@ resource "aws_security_group_rule" "vmray_worker_udpdns_out" {
|
|
|
security_group_id = aws_security_group.vmray_worker_sg.id
|
|
|
}
|
|
|
|
|
|
+# tfsec:ignore:aws-vpc-no-public-egress-sgr VMRay Requires Direct Internet Access
|
|
|
resource "aws_security_group_rule" "vmray_worker_http_out" {
|
|
|
+ description = "VMRay requires direct HTTP access."
|
|
|
type = "egress"
|
|
|
from_port = 80
|
|
|
to_port = 80
|
|
@@ -140,7 +154,9 @@ resource "aws_security_group_rule" "vmray_worker_http_out" {
|
|
|
security_group_id = aws_security_group.vmray_worker_sg.id
|
|
|
}
|
|
|
|
|
|
+# tfsec:ignore:aws-vpc-no-public-egress-sgr VMRay Requires Direct Internet Access
|
|
|
resource "aws_security_group_rule" "vmray_worker_https_out" {
|
|
|
+ description = "VMRay requires direct HTTPS access."
|
|
|
type = "egress"
|
|
|
from_port = 443
|
|
|
to_port = 443
|
|
@@ -150,6 +166,7 @@ resource "aws_security_group_rule" "vmray_worker_https_out" {
|
|
|
}
|
|
|
|
|
|
resource "aws_security_group_rule" "vmray_worker_http_to_server" {
|
|
|
+ description = "VMRay worker communicates with the server."
|
|
|
type = "egress"
|
|
|
from_port = 80
|
|
|
to_port = 80
|
|
@@ -159,6 +176,7 @@ resource "aws_security_group_rule" "vmray_worker_http_to_server" {
|
|
|
}
|
|
|
|
|
|
resource "aws_security_group_rule" "vmray_worker_https_to_server" {
|
|
|
+ description = "VMRay worker communicates with the server."
|
|
|
type = "egress"
|
|
|
from_port = 443
|
|
|
to_port = 443
|