1
1
2
- # -- ############################ -- #
3
- # -- How to Add New Traffic Rules -- #
4
- # -- ############################ -- #
5
-
6
- # -- In order to add new rules be informed that
7
- # --
8
- # -- - lists are in the form [ port-from, port-to, protocol, description ]
9
- # -- - the first two elements are integers and the final two are strings
10
- # -- - it pays to be conservative with the description characters and length
11
- # -- - ports can range from 0 to one less than 2^16 (which is 65,535)
12
- # -- - a -1 port signals that all ports are to be allowed (disallowed)
13
- # -- - the protocol can be one of [ tcp, udp, icmp, all ]
14
- # -- - the protocol can also be one of a small set of numbers
15
-
16
- # -- Note that if you create an all traffic egress rule and you have an
17
- # -- IPV6 Cidr block another will be created to ::/0 in addition to the
18
- # -- one with the 0.0.0.0/0 (IPV4) notation.
19
-
20
2
/*
21
- type = object({
22
- http = list(string)
23
- all-traffic = list(string)
24
- ecs = list(string)
25
- docker = list(string)
26
- java = list(string)
27
- jenkins = list(string)
28
- sonar = list(string)
29
- postgres = list(string)
30
- })
3
+ | --
4
+ | -- This list of security group rules can be overriden and you can provide
5
+ | -- your own rule port number mappings.
6
+ | --
31
7
*/
32
-
33
8
variable rules {
34
9
35
10
type = map ( list ( string ) )
@@ -47,116 +22,3 @@ variable rules {
47
22
" postgres" = [ " 5432" , " 5432" , " tcp" , " postgresql db" ]
48
23
}
49
24
}
50
-
51
-
52
- /*
53
- default = {
54
- "https" = [ 443, 443, "tcp", "http secured" ]
55
- "http" = [ 80, 80, "tcp", "http plaintext" ]
56
- "all-traffic" = [ -1, -1, "-1", "All protocols" ]
57
- "ecs" = [ 32768, 61000, "tcp", "cluster comms" ]
58
- "docker" = [ 5000, 5000, "tcp", "docker registry" ]
59
- "java" = [ 8080, 8080, "tcp", "java port" ]
60
- "jenkins" = [ 8080, 8080, "tcp", "jenkins ci" ]
61
- "sonar" = [ 9000, 9000, "tcp", "sonarqube metrics" ]
62
- "postgres" = [ 5432, 5432, "tcp", "postgresql db" ]
63
- }
64
- */
65
-
66
-
67
- /*
68
- variable rules {
69
-
70
- description = "Modular rules allowing either TCP or UDP traffic."
71
- type = any
72
-
73
- default = {
74
-
75
- # < ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ >
76
- # < ~~~ the most common traffic types ~~~ >
77
- # < ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ >
78
- ssh = [ 22, 22, "tcp", "secure shell" ]
79
- http = [ 80, 80, "tcp", "http plaintext" ]
80
- https = [ 443, 443, "tcp", "http secured" ]
81
- ahttp = [ 8888, 8888, "tcp", "alternate http" ]
82
-
83
-
84
- # < ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ >
85
- # < ~~~ Rules for all ports & protocols ~~~ >
86
- # < ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ >
87
- all-traffic = [ -1, -1, "-1", "All protocols" ]
88
- all-tcp = [ 0, 65535, "tcp", "All TCP ports" ]
89
- all-udp = [ 0, 65535, "udp", "All UDP ports" ]
90
- all-icmp = [ -1, -1, "icmp", "All IPV4 ICMP" ]
91
- all-ipv6-icmp = [ -1, -1, 58, "All IPV6 ICMP" ]
92
-
93
-
94
- # < ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ >
95
- # < ~~~ message queue related protocols ~~~ >
96
- # < ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ >
97
- rmq-admin = [ 15672, 15672, "tcp", "rabbitmq admin cli" ]
98
- rmq-tls = [ 25672, 25672, "tcp", "rabbitmq admin tls" ]
99
- rmq-comms = [ 35672, 35682, "tcp", "rabbit comm ports" ]
100
- amqp = [ 5672, 5672, "tcp", "msg queue protocol" ]
101
- amqp-tls = [ 5671, 5671, "tcp", "msg queue secure" ]
102
- epmd = [ 4369, 4369, "tcp", "erlang port mapper" ]
103
- stomp = [ 61613, 61613, "tcp", "stomp plain text" ]
104
- stomp-tls = [ 61614, 61614, "tcp", "stomp secure ssl" ]
105
- mqtt = [ 1883, 1883, "tcp", "mq series telemetry" ]
106
-
107
-
108
- # < ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ >
109
- # < ~~~ Containerized Services Suite ~~~ >
110
- # < ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ >
111
- kubernetes = [ 6443, 6443, "tcp", "kubernetes api" ]
112
- kubelet-api = [ 10250, 10250, "tcp", "kubelet api" ]
113
- kube-sched = [ 10251, 10251, "tcp", "kube scheduler" ]
114
- kube-control = [ 10252, 10252, "tcp", "kube controller" ]
115
- kube-read = [ 10255, 10255, "tcp", "kube read only" ]
116
- ecs = [ 32768, 61000, "tcp", "cluster comms" ]
117
- docker = [ 5000, 5000, "tcp", "docker registry" ]
118
-
119
-
120
- # < ~~~ ~~~~~~~~~~~~~~~~~~~~~~ ~~~ >
121
- # < ~~~ etcd client server api ~~~ >
122
- # < ~~~ ~~~~~~~~~~~~~~~~~~~~~~ ~~~ >
123
- etcd-client = [ 2379, 2379, "tcp", "etcd client" ]
124
- etcd-server = [ 2380, 2380, "tcp", "etcd server" ]
125
- etcd-listen = [ 4001, 4001, "tcp", "etcd listen" ]
126
-
127
-
128
- # < ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ >
129
- # < ~~~ logging and elasticsearch stack tools ~~~ >
130
- # < ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ >
131
- fluentd = [ 24224, 24224, "tcp", "fluentd logs" ]
132
- kibana = [ 5601, 5601, "tcp", "kibana portal" ]
133
- elastic = [ 9200, 9200, "tcp", "elasticsearch" ]
134
-
135
-
136
- # < ~~~ ~~~~~~~~~~~~~~~~~~~~~~ ~~~ >
137
- # < ~~~ Java EcoSystem Tooling ~~~ >
138
- # < ~~~ ~~~~~~~~~~~~~~~~~~~~~~ ~~~ >
139
- java = [ 8080, 8080, "tcp", "java port" ]
140
- tomcat = [ 8080, 8080, "tcp", "tomcat server" ]
141
- jenkins = [ 8080, 8080, "tcp", "jenkins ci" ]
142
- hudson = [ 8080, 8080, "tcp", "hudson ci" ]
143
- nexus = [ 8080, 8080, "tcp", "nexus dir" ]
144
- sonar = [ 9000, 9000, "tcp", "sonarqube metrics" ]
145
-
146
-
147
- # < ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ >
148
- # < ~~~ gollum's webrick http server ~~~ >
149
- # < ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ >
150
- gollum = [ 4567, 4567, "tcp", "gollum wiki" ]
151
-
152
-
153
- # < ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ >
154
- # < ~~~ Database Management Systems ~~~ >
155
- # < ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ >
156
- postgres = [ 5432, 5432, "tcp", "postgresql db" ]
157
-
158
-
159
- }
160
-
161
- }
162
- */
0 commit comments