Examples of security group rules

This section provides examples of security group rules, specified for different purposes.

Configure the following settings:

  • ingress: PING (ICMP: 0-255)
  • ingress: SSH (TCP: 22)
  • ingress: HTTP (TCP: 80)
  • ingress: HTTPS (TCP: 443)
  • ingress: NTP (UDP: 123)
  • ingress: KMS (TCP: 1688)
  • ingress: RDP (TCP: 3389)

The default values will be used for egress communication direction.

ingress: PING (ICMP: 0-255)

$ DIRECTION=ingress
$ PROTCOL=icmp
$ MIN_PORT_NUM=0
$ MAX_PORT_NUM=255
$ REMOTE_IP=<remoteIpAddr> (specify using format XXX.XXX.XXX.0/24)
or
$ REMOTE_GROUP_ID=<secGroupId>
$ SG_ID=<secGroupIdToBeSet>

ingress: SSH (TCP: 22)

$ DIRECTION=ingress
$ PROTCOL=tcp
$ MIN_PORT_NUM=22
$ MAX_PORT_NUM=22
$ REMOTE_IP=<remoteIpAddr> (specify using format XXX.XXX.XXX.0/24)
or
$ REMOTE_GROUP_ID=<secGroupId>
$ SG_ID=<secGroupIdToBeSet>

ingress: HTTP (TCP: 80)

$ DIRECTION=ingress
$ PROTCOL=tcp
$ MIN_PORT_NUM=80
$ MAX_PORT_NUM=80
$ REMOTE_IP=<remoteIpAddr> (specify using format XXX.XXX.XXX.0/24)
or
$ REMOTE_GROUP_ID=<secGroupId>
$ SG_ID=<secGroupIdToBeSet>

ingress: HTTPS (TCP: 443)

$ DIRECTION=ingress
$ PROTCOL=tcp
$ MIN_PORT_NUM=443
$ MAX_PORT_NUM=443
$ REMOTE_IP=<remoteIpAddr> (specify using format XXX.XXX.XXX.0/24)
or
$ REMOTE_GROUP_ID=<secGroupId>
$ SG_ID=<secGroupIdToBeSet>

ingress: NTP (UDP: 123)

$ DIRECTION=ingress
$ PROTCOL=udp
$ MIN_PORT_NUM=123
$ MAX_PORT_NUM=123
$ REMOTE_IP=<remoteIpAddr> (specify using format XXX.XXX.XXX.0/24)
or
$ REMOTE_GROUP_ID=<secGroupId>
$ SG_ID=<secGroupIdToBeSet>

ingress: KMS (TCP: 1688)

$ DIRECTION=ingress
$ PROTCOL=tcp
$ MIN_PORT_NUM=1688
$ MAX_PORT_NUM=1688
$ REMOTE_IP=<remoteIpAddr> (specify using format XXX.XXX.XXX.0/24)
or
$ REMOTE_GROUP_ID=<secGroupId>
$ SG_ID=<secGroupIdToBeSet>

ingress: RDP (TCP: 3389)

$ DIRECTION=ingress
$ PROTCOL=tcp
$ MIN_PORT_NUM=3389
$ MAX_PORT_NUM=3389
$ REMOTE_IP=<remoteIpAddr> (specify using format XXX.XXX.XXX.0/24)
or
$ REMOTE_GROUP_ID=<secGroupId>
$ SG_ID=<secGroupIdToBeSet>

Refer to the "Service Specification" for other advanced setting items.