Creating Group-to-Group Rules
Group-to-group rules allow virtual machines belonging to specific groups to connect with members of the security group. To create a group to group rule from the security group details page you will need to supply the port range (start port and end port), account and security group name to authorize.You may additionally provide a description for the rule.
A new popup form will appear. First, you need to select a protocol. Most of the standard, commonly used ports are available by expanding the drop down list. You also can select "All" or "Custom".
If you select "Custom", the popup will change so that you can enter a port or port range that you wish to open.
The next option is to select a group into which to apply this rule. Clicking on the up/down arrow will present all of the groups you have previously defined. If you wish to create a new group, click on the "Show Advanced" line. That will cause the popup to change to allow for entry of a unique group name.
Note: Each group must have a unique name. If you try to create a group with a name that is already in use, the system will give you an error.
When everything has been filled in to your satisfaction, click on the "Create Ingress Rule" button to complete the creation process.