> For the complete documentation index, see [llms.txt](https://deviceon.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://deviceon.gitbook.io/docs/system/enable-passive-mode-on-ftp-server.md).

# Enable Passive Mode on FTP Server

{% hint style="info" %}
DeviceOn FTP default setting is active mode. However, FTP runs active mode may fail in cases where the server is behind a router or the server deplyed on Azure/AWS or other cloud’s virtual machine. And that will cause DeviceOn initialize failure. To solve this issue, you should change FTP server to passive mode.
{% endhint %}

## **Step 1**: Edit Configuration File

Open the **ftpd-typical.xml** on text editor tool that located in

```
\DeviceOn Path\ftp\res\conf\
```

Add the following XML attribute (data-connection) into listeners tag and give your **passive ports** range and **external DNS**.

```
<data-connection idle-timeout="60">  
  <passive ports="60001-60100" external-address="<YOUR_EXTERNAL_DNS>" address="0.0.0.0" />  
</data-connection>  
```

“**60001-60100**” means in passive mode, ftp client uses port 60001 to 60100 to transfer data. You could change it to any available ports range. “**YOUR\_EXTERNAL\_DNS**” means in passive mode, client’s destination domain name. You should replace it with real domain name which can be access from external side. After that, restart the service (**Apache FtpServer ftpd**) to apply setting.

![](https://i.imgur.com/lopIjzK.png)

## Step 2: Add inbound security rules

Add inbound security rules on your **network security group (ex,&#x20;**<mark style="color:red;">**Azure Network Security Groups and Firewall Rules**</mark>**)**, make sure blow ports are available.

* **2121** (command port)
* **60001-60100** (Passive port)

## Step 3: Restart Service

Restart DeviceOn service, stop/start the “**Management Service**” via server tray icon.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://deviceon.gitbook.io/docs/system/enable-passive-mode-on-ftp-server.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
