add-network-policy - Cloud Foundry CLI Reference Guide |
cf add-network-policy SOURCE_APP --destination-app DESTINATION_APP [-s DESTINATION_SPACE_NAME [-o DESTINATION_ORG_NAME]] [--protocol (tcp | udp) --port RANGE]
cf add-network-policy frontend --destination-app backend --protocol tcp --port 8081
cf add-network-policy frontend --destination-app backend -s backend-space -o backend-org --protocol tcp --port 8080-8090
Name of app to connect to
Port or range of ports for connection to destination app (Default: 8080)
Protocol to connect apps with (Default: tcp)
The org of the destination app (Default: targeted org)
The space of the destination app (Default: targeted space)