If you want to enforce IP Table Rules, then yes, you would need to check the Restrict network access to cloud endpoint
box. At that point you would add the rules you want enforced, such as: 192.0.0.1
9000
(single IP and port), 192.0.0.1-192.0.0.5
5000:5005
(range of IPs and range of ports), or any combination therein.
If you are creating your private destinations with cURL, you could use a command like:
curl "https://sgmanager.ng.bluemix.net/v1/sgconfig/<gateway_id>/destinations" \
-H "Authorization: Bearer <security_token>" \
-H "Content-type: application/json" \
-d '{"desc":"My Private Destination","ip":"1.1.1.1","port":8000,"private":true}' -k
Once your private destination is created, you can add IP table rules with commands like:
curl -X PUT "https://sgmanager.ng.bluemix.net/v1/sgconfig/<gateway_id>/destinations/<destination_id>/ipTableRule" \
-H "Authorization: Bearer <security_token>" \
-H "Content-type: application/json" \
-d '{"src":"192.0.0.1","spt":"9000"}' -k
and
curl -X PUT "https://sgmanager.ng.bluemix.net/v1/sgconfig/<gateway_id>/destinations/<destination_id>/ipTableRule" \
-H "Authorization: Bearer <security_token>" \
-H "Content-type: application/json" \
-d '{"src_range":"192.0.0.1-192.0.0.5","spt":"5000:5005"}' -k
Please note that the first command here is uses src
to provide a single IP whereas the second uses src_range
to provide a range of IPs.