Controlling opened ports is very important security requirement. Several modules can detect or import opened ports into model.
Parent object used for open port is "L4Interface" which is linked to Host.
Use nmap to import data. Best to use two separate scans, one internal and one external and tag corresponding objects there.
Example:
nmap -oX nmap-internal.xml 192.168.1.0/24
nmap -oX nmap-external.xml x.x.x.x y.y.y.y z.z.z.z ...
fcpc tag add nmap:internal
fcpc tag add nmap:external
fcpc --tag nmap:internal nmap import nmap-internal.xml
fcpc --tag nmap:external nmap import nmap-external.xml
fcpc qualys download-and-import-all
fcpc --search.filter.limit=0 \
--output.column=right_ip \
--output.column=left_ipport \
--output.column=left_ipprotocol \
search 'l4interface+/{ ipport:22 }/' ~is-on 'host+/{ tag: "qualys:external-scan" OR tag: "nmap:external" }/'
fcpc --search.filter.limit=0 \
--output.column=right_ip \
--output.column=left_ipport \
--output.column=left_ipprotocol search \
'l4interface+/{ ipport:22 OR ipport:3389 }/' ~is-on 'host+'
The generated report is created in .csv format.