add-network-policy - Cloud Foundry CLI Reference Guide


NAME

add-network-policy - Create policy to allow direct network traffic from one app to another

USAGE

cf add-network-policy SOURCE_APP DESTINATION_APP [-s DESTINATION_SPACE_NAME [-o DESTINATION_ORG_NAME]] [--protocol (tcp | udp) --port RANGE]

EXAMPLES

cf add-network-policy frontend backend --protocol tcp --port 8081 cf add-network-policy frontend backend -s backend-space -o backend-org --protocol tcp --port 8080-8090

OPTIONS

--port

Port or range of ports for connection to destination app (Default: 8080)

--protocol

Protocol to connect apps with (Default: tcp)

-o

The org of the destination app (Default: targeted org)

-s

The space of the destination app (Default: targeted space)

SEE ALSO

apps, network-policies, remove-network-policy