Port 138 is NetBIOS Datagram, UDP.
UDP
medium risk
App-IDnetbios-dgm
NetBIOS datagram service — used by Windows browser elections and some messaging.
Palo Alto
Create the service object for this port, then allow the App-ID on it. Restricting the rule to the port's service object keeps the rule working on a non-default port and stops the App-ID matching on other ports. Replace the placeholders with your own rule name and zones.
set service udp-138 protocol udp port 138
set rulebase security rules <rule-name> from <from-zone> to <to-zone> source any destination any application netbios-dgm service udp-138 action allow
Risk and exposure
Rated medium risk. Restrict this port to the sources that need it and keep the service patched; avoid exposing it to the whole internet unless the service is meant to be public.
Check it
- Linux
ss -ulnp | grep :138 - nmap
nmap -sU -p 138 <host>