Secure Connect Gateway - Disable FTP Port 21
Summary: If the customer security team advises disabling Port 21, which is used for File Transfer Protocol (FTP), it is due to security concerns. Port 21 transmits data in plain text, making it susceptible to interception and attacks. Disabling this port helps prevent unauthorized access and data breaches, thereby enhancing the protection of sensitive information. ...
This article applies to
This article does not apply to
This article is not tied to any specific product.
Not all product versions are identified in this article.
Instructions
- If the service must be disabled temporarily:
docker exec -it esrsde-app bash wd status esrshttpdftp
If it is running, use the following command to stop it:
wd stop esrshttpdftp
NOTE: If the gateway reboots, the FTP service is enabled again.
- If the service must be disabled permanently: Removing port 21 and 4021 on a running container:
- If we are still in the docker command shell from the steps above we must issue the exit command to return to the bash prompt.
- Now we must find the port id of the container we must edit using the command:
docker ps --no-trunc
- Now we must stop the container so we can change it using the command below.
docker stop esrsftp-app
- Now go to the folder:
cd /var/lib/docker/containers/<Full port id form step 2> - Create a backup of files that we are to edit:
cp config.v2.json config.v2.json.bakcp hostconfig.json hostconfig.json.bak
- Modify file
config.v2.jsonremoving entry"4021/tcp":{}- A new entry should look like:
"ExposedPorts":{"4443/tcp":{},"5400/tcp":{ },
- A new entry should look like:
- Modify the file
hostconfig.jsonremoving entry"4021/tcp":[{"HostIp":"","HostPort":"21"}],- A new entry should look like:
"PortBindings":{"4443(....and so forth)
- A new entry should look like:
-
systemctl restart docker
-
docker start esrsftp-app- If the container will not start you have most likely missed a bracket or quote in one of your files. Compare the backup files to the new edited files to verify everything is correct.
- Verify that ports are not mapped by performing command:
docker ps
To disable from SCG host level -
If the customer is on SCG, remove the port 21 references from the SuSEfirewall2-srs-custom file.
-
cd /etc/sysconfig/scripts/
Create a backup copy before modifying:
cp SuSEfirewall2-srs-custom SuSEfirewall2-srs-custom.bak
- Now we edit the
SuSEfirewall2-srs-customfile and comment out the line containing--dport 21ending in4021using # this should now look like:#-A SCG-DOCKER -p tcp -m tcp --dport 21 -j DNAT --to-destination [${srsIpAddr}]:4021 - After that restart the
esrsve.serviceandesrsve.tfp-appusing below commandssystemctl restart esrsve.service systemctl restart esrsve.ftp-app - Verify everything is working as expected.
Affected Products
Secure Connect Gateway - Virtual EditionArticle Properties
Article Number: 000227892
Article Type: How To
Last Modified: 13 مايو 2026
Version: 5
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.