Install Package Related Ports Information into DSM

If your package service uses specific ports for communication (e.g. Surveillance Station uses ports 19997/udp for source port and 19998/udp for destination port), you should prepare a service configuration file for this package to describe which ports will be used. After that, once the user creates firewall rules or port forwarding rules from the build-in application, your package service will also be listed for selection.

Service Configure File Name

The file name should follow the naming convention SYNOPKG.sc (ex: SurveillanceStation.sc). SYNOPKG should be the package name that is specified by the key "package" in the INFO file, and sc means Service Configure file.

Configure Format Template

Please see the following example:

[service_name]
title="English title"
desc="English description"
port_forward="yes" or "no"
src.ports="ports/protocols"
dst.ports="ports/protocols"

[service_name2]
…

Section/Key Descriptions

Please see the following statements for the strings and keys:

Section/Key Description Value Default Value DSM Requirement
service_name Required

Usually a package only has one unique service name. If your package needs more than one port description, you can define service_name2, service_name3, …

Note: service_name cannot be empty and can only include characters “a~z”, “A~Z”, “0~9”, “-”, “\
”, “.”
Unique service name N/A 4.0-2206
title Required

English title which will be shown on field Protocol at firewall build-in selection menu.
English title N/A 4.0-2206
desc Required

English description which will be shown on field Applications at firewall build-in selection menu.
English description N/A 4.0-2206
port_forward Optional

If set to “yes,” your package service related ports will be listed when users set port forwarding rule from build-in applications. Otherwise they will not be listed.
“yes” or “no” “no” 4.0-2206
src.ports Optional

If your package service has specified source ports, you can set them in this key. The value should contain at least the port numbers, and a default protocol that is tcp + udp.

Ex: 6000,7000:8000/tcp,udp means source ports are 6000, 7000 to 8000, all ports are tcp + udp.
ports/protocols
ports: 1~65535
(separated by ‘,’ and use ‘:’ to represent port range)
protocols:
tcp,udp
(separated by ‘,’)
ports:
N/A
protocols:
tcp,udp
4.0-2206
dst.ports Required

Each service should have destination ports. The value should contain at least the port numbers, and a default protocol that is tcp + udp.

Ex: 6000,7000:8000/tcp,udp means destination ports are 6000, 7000 to 8000, all ports are tcp + udp.
ports/protocols
ports: 1~65535
(separated by ‘,’ and use ‘:’ to represent port range)
protocols:
tcp,udp
(separated by ‘,’)
ports:
N/A
protocols:
tcp,udp
4.0-2206

Please see the following example (SurveillanceStation.sc):

[ss_findhostd_port]
title="Search Surveillance Station"
desc="Surveillance Station"
port_forward="yes"
src.ports="19997/udp"
dst.ports="19998/udp"

After the service configuration file is ready, add the following content to the resource specification file. Please refer to Port Config for more detail.

"port-config": {
    "protocol-file": "port_conf/xxdns.sc"
 }