Securing host communications
About securing host traffic
When you deploy the enforcer as a Linux or Windows service, Microsegmentation creates a processing unit that represents the host, allowing you to control and monitor all host communications.
We deploy enforcers in discovery mode, a very permissive initial configuration.
This allows the host to function as it was before you deployed the enforcer, with no impact to its accustomed communications or applications.
We recommend allowing your host to run in discovery mode for some time, perhaps a week.
During this interval, Microsegmentation collects the URLs, IP addresses, protocols, and ports it communicates with.
A comprehensive list of its communications ensures that you don’t miss anything when you allow the connections, ensuring a seamless experience when you disable discovery mode.
After disabling discovery mode, your host rejects any traffic not explicitly allowed.
Do not disable discovery mode before allowing the desired traffic.
Doing so could cause you to lose access to the host.
We provide guidance for the most common and critical traffic.
You should gain enough familiarity with the process to be able to allow additional traffic on your own, according to the specificities of your circumstances.
While the port numbers used in the following procedures should match up with yours, there is a small chance that they will not.
You may need to modify the port numbers if the host deviates from well-known defaults.
Before you begin
We recommend reviewing basic network ruleset concepts.
In the under
Network Security
section of the Prisma Cloud web interface, select Agent
Manage
, and navigate to the namespace of the enforcer.
Expand the details of your target enforcer.
Review the Microsegmentation tags of the enforcer and determine which one you want to use to identify it.
In our examples, we use the enforcer’s ID, which is the 5f1f2ad0f0fe17061e24ed7d value in the following tag: $id=5f1f2ad0f0fe17061e24ed7dReview the flows
Take a few moments to review your host’s communication patterns.
- In theNetwork Securitysection of the Prisma Cloud web interface, selectApp Dependency Map.
- Click the dashed green flows from the host toSomewhere.
- Select theAccesstab.
- Scroll through the list of connections, paying particular attention to the ports.
Allow SSH connections
For Linux hosts, SSH often represents the primary means of access.
Neglecting to allow inbound SSH connections to Linux hosts may lock you and others out of the host when you disable discovery mode.
- In theNetwork Securitysection of the Prisma Cloud web interface, selectNetwork Lists, selectExternal networks, and click theCreatebutton.
- ClickCreate.
- SelectRulesetsand click theCreatebutton.
- Type the tag you wish to use to identify the enforcer in theApplies tofield.If we were using the enforcer’s ID, we would type $enforcerid=5f1f2ad0f0fe17061e24ed7d
- UnderIncoming, clickAdd Ingress Rule.
- Click theFromfield, click in the empty box, type externalnetwork:name=ssh, and click outside of the dialog to close it.
- ClickCreate.
- SSH into the host.
- SelectApp Dependency Map.
- You should see a new external network namedsshwith a solid green flow to your host, as shown below.
Allow network time protocol communications
Microsegmentation requires accurate time-keeping.
If you have not already configured the host to synchronize times with authoritative sources, take a few moments to do so now.
Complete the following steps to allow network time protocol (NTP) traffic from the host to UDP port 123.
- In theNetwork Securitysection of the Prisma Cloud web interface, selectNetwork Lists, selectExternal networks, and click theCreatebutton.
- ClickCreate.
- SelectRulesetsand click theCreatebutton.
- Type the tag you wish to use to identify the enforcer in theApplies tofield.If we were using the enforcer’s ID, we would type $enforcerid=5f1f2ad0f0fe17061e24ed7d
- UnderOutgoing, clickAdd Egress Rule.
- Click theTofield, click in the empty box, type externalnetwork:name=ntp, and click outside of the dialog to close it.
- ClickCreate.
- SelectApp Dependency Map.
- After some time, you should see a new external network namedntpwith a solid green flow from your host, as shown below.To see the results immediately, you can restart the NTP service.You should observe UDP port 123 flows from the host to theSomewhereexternal network, as well as to the thentpexternal network. Compare the time stamps. The flows to thentpexternal network are newer. Thentpexternal network contains all of the UDP port 123 flows from now on.
Allow domain name system communications
Microsegmentation requires domain name system (DNS) resolution.
If you do not allow DNS, the enforcers won’t be able to connect to the Microsegmentation Console.
Complete the following steps to allow DNS connections.
- In theNetwork Securitysection of the Prisma Cloud web interface, selectNetwork Lists, selectExternal networks, and click theCreatebutton.
- ClickCreate.
- SelectRulesetsand click theCreatebutton.
- Type the tag you wish to use to identify the enforcer in theApplies tofield.If we were using the enforcer’s ID, we would type $enforcerid=5f1f2ad0f0fe17061e24ed7d
- UnderOutgoing, clickAdd Egress Rule.
- Click theTofield, click in the empty box, type externalnetwork:name=dns, and click outside of the dialog to close it.
- ClickCreate.
- SelectApp Dependency Map.
- After some time, you should see a new external network nameddnswith a solid green flow from your host, as shown below.To see the results immediately, you can flush the DNS cache and run ping google.com.You should observe UDP port 53 flows from the host to theSomewhereexternal network, as well as to the thednsexternal network. Compare the time stamps. The flows to thednsexternal network are newer. Thednsexternal network contains all of the UDP port 53 flows from now on.
Allow dynamic host configuration protocol communications
If your host uses dynamic host configuration protocol (DHCP), you must enable it by creating an external network to represent UDP ports 67-68.
Then create two bidirectional network policies with source and target inverted.
Failure to allow communications between the host and the DHCP server can result in a total lack of access to the host. If the host is using DHCP, ensure that you allow this traffic to prevent yourself from getting locked out. If you’re not sure, after allowing the host to run in discovery mode for some time, click the
Somewhere
flow, select the Access
tab, click the search icon, select Port
, press ENTER twice, type "67" and "68" as filters.- In theNetwork Securitysection of the Prisma Cloud web interface, selectNetwork Lists, selectExternal networks, and click theCreatebutton.
- ClickCreate.
- SelectRulesetsand click theCreatebutton.
- Type the tag you wish to use to identify the enforcer in theApplies tofield.If we were using the enforcer’s ID, we would type $enforcerid=5f1f2ad0f0fe17061e24ed7d
- UnderIncoming, clickAdd Ingress Rule.
- Click theFromfield, click in the empty box, type externalnetwork:name=dhcp, and click outside of the dialog to close it.
- UnderOutgoing, clickAdd Egress Rule.
- Click theTofield, click in the empty box, type externalnetwork:name=dhcp, and click outside of the dialog to close it.
- ClickCreate.
- SelectApp Dependency Map.
- After some time, you should see a new external network nameddhcpwith a solid green flow from your host, as shown below.This could take up to a half hour.To see the results immediately, you can install and run sudo dhcping against the IP address of your DHCP server.
Allow lightweight directory access protocol communications
If the host needs to connect to an lightweight directory access protocol (LDAP) server, you must enable TCP communications, typically over port 389.
We assume in this procedure that your LDAP servers use IPv4 addresses.
If you are using LDAPS, open ports 636, 3268, and 3269 instead of port 389.
- In theNetwork Securitysection of the Prisma Cloud web interface, selectNetwork Lists, selectExternal networks, and click theCreatebutton.
- ClickCreate.
- SelectRulesetsand click theCreatebutton.
- Type the tag you wish to use to identify the enforcer in theApplies tofield.If we were using the enforcer’s ID, we would type $enforcerid=5f1f2ad0f0fe17061e24ed7d
- UnderOutgoing, clickAdd Egress Rule.
- Click theTofield, click in the empty box, type externalnetwork:name=ldap, and click outside of the dialog to close it.
- ClickCreate.
- SelectApp Dependency Map.
- After some time, you should see a new external network namedldapwith a solid green flow from your host, as shown below.You should observe TCP port 389 flows from the host to theSomewhereexternal network, as well as to the theldapexternal network. Compare the time stamps. The flows to theldapexternal network are newer. Theldapexternal network contains all of the TCP port 389 flows from now on.
Allow internet control message protocol
To prevent denial of service and other attacks, we recommend allowing just the internet control message protocol (ICMP) types and codes used for troubleshooting, as described below.
- If you do not already see ICMP connections, SSH into the enforcer host and issue a ping request.
- In theNetwork Securitysection of the Prisma Cloud web interface, selectNetwork Lists, selectExternal networks, and click theCreatebutton.
- Type externalnetwork:name=icmp, press ENTER, and clickCreate.
- SelectRulesetsand click theCreatebutton.
- Type the tag you wish to use to identify the enforcer in theApplies tofield.If we were using the enforcer’s ID, we would type $enforcerid=5f1f2ad0f0fe17061e24ed7d
- UnderIncoming, clickAdd Ingress Rule.
- Click theFromfield, click in the empty box, type externalnetwork:name=icmp, and click outside of the dialog to close it.
- UnderOutgoing, clickAdd Egress Rule.
- Click theTofield, click in the empty box, type externalnetwork:name=icmp, and click outside of the dialog to close it.
- ClickCreate.
- Access the enforcer host and issue a ping request.
- Return to theNetwork Securitysection of the Prisma Cloud web interface and selectApp Dependency Map. .
- You should see a new external network namedicmpwith a solid green flow from your host, as shown below.You should observe ICMP flows from the host to theSomewhereexternal network, as well as to the theicmpexternal network. Compare the time stamps. The flows to theicmpexternal network are newer. Theicmpexternal network contains all of the ICMP flows from now on.
Allow cloud instance metadata queries
Instances hosted in public clouds like AWS, GCP, and Azure make periodic requests to a link-local address at 169.254.169.254 over port 80.
This is the cloud instance metadata endpoint.
Complete the following steps to allow these connections.
- In theNetwork Securitysection of the Prisma Cloud web interface, selectNetwork Lists, selectExternal networks, and click theCreatebutton.
- ClickCreate.
- SelectRulesetsand click theCreatebutton.
- Type the tag you wish to use to identify the enforcer in theApplies tofield.If we were using the enforcer’s ID, we would type $enforcerid=5f1f2ad0f0fe17061e24ed7d
- UnderOutgoing, clickAdd Egress Rule.
- Click theTofield, click in the empty box, type externalnetwork:name=meta, and click outside of the dialog to close it.
- ClickCreate.
- SelectApp Dependency Map.
- After some time, you should see a new external network namedmetadatawith a solid green flow from your host, as shown below. These connections may occur infrequently, such as once an hour. You can trigger one immediately with the following command curl http://169.254.169.254You should observe TCP port 80 flows from the host to theSomewhereexternal network, as well as to the themetadataexternal network. Compare the time stamps. The flows to themetadataexternal network are newer. Themetadataexternal network contains all of the cloud metadata flows from now on.
Allow additional communications
After completing the procedures above, you should observe a much shorter list of flows from your host to the
Somewhere
external network.
Next, you must decide which of the remaining flows you want to allow and which you want to deny.
Create external networks and policies for the protocol and port(s) you want to allow, as in the previous procedures.If you see connections to
Somewhere
on port 443, expand Monitor
, select Logs
, and click DNS Lookup Logs
.
If you see domain names listed which seem legitimate, create external networks and network policies to allow the traffic, using the domain name.
For example, Ubuntu instances may make periodic requests to api.snapcraft.io to check for snap package updates.To assist you, a list of common additional traffic follows, along with hyperlinks to their common ports.
The Internet Assigned Numbers Authority (IANA) provides a searchable Service Name and Transport Protocol Port Number Registry that may be useful as you complete your list of allowed traffic.
Harden further
You may also wish to further harden your security by modifying the external networks from 0.0.0.0/0 to a specific IP or CIDR.
We recommend this when you have static IPs or at least a known range.
Disable discovery mode
Prerequisites
: to disable discovery mode, you must have namespace administrator
privileges in the namespace above the VM namespace and apoctl.- Set a VM_NS to the namespace of your host.This should be a grandchild-level namespace. An example follows.export VM_NS=/803920923337065472/aws-dev-826088932159/vmSet a CLOUD_NS to the namespace above the host’s namespace.This should be a child-level namespace. An example follows.export CLOUD_NS=/803920923337065472/aws-dev-826088932159Issue the following command to disable discovery mode.cat <<EOF | apoctl api update namespace $VM_NS -n $CLOUD_NS -f - name: $VM_NS namespace: $CLOUD_NS defaultPUIncomingTrafficAction: Reject defaultPUOutgoingTrafficAction: Reject EOFYou may see a new external network namedSomewherewith red flows or red flows between pods.If you click on the red lines you can see that the connections were denied due to Microsegmentation’s defaultReject allruleset.Congratulations! You have secured your host. Microsegmentation denies any traffic not explicitly allowed by a network ruleset.
Most Popular
Recommended For You
Recommended Videos
Recommended videos not found.