Body: <p>I built my docker image and run it:</p>
  
  <pre><code>docker run --rm -P -d test:latest
  </code></pre>
  
  <p>Then I entered the command and opened connection:</p>
  
  <pre><code>ftp
  open XXX
  </code></pre>
  
  <p>I successfully connected and entered user data. After that I try to execute:</p>
  
  <pre><code>ls
  </code></pre>
  
  <p>And received these messages:</p>
  
  <pre><code>200 Command okay.
  425 Can't open data connection.
  </code></pre>
  
  <p>P.S.</p>
  
  <p>I run a Linux image from Windows cmd.</p>
  
Comments: CC BY-SA 4.0
Comments: 2020-06-13T22:24:26.453Z
Comments: Is there any firewall enabled? I’ve seen this error with FTP servers. See if this helps: https://github.com/microsoft/WSL/issues/2973
Comments: pm1391
Comments: CC BY-SA 4.0
Comments: 2020-08-05T02:01:55.067Z
Comments: you want to run FTP to connect to a r emote server from within your container?
Comments: gmolaire
Tags: <docker><linux><windows>
Title: Remote connection from Docker container by FTP
UserDisplayName: Leonid
ThreadText: # Remote connection from Docker container by FTP
  
  (Asked by: username_0 on 2020-06-11)
  
  I built my docker image and run it:
  
  ```
  docker run --rm -P -d test:latest
  
  ```
  
  Then I entered the command and opened connection:
  
  ```
  ftp
  open XXX
  
  ```
  
  I successfully connected and entered user data. After that I try to execute:
  
  ```
  ls
  
  ```
  
  And received these messages:
  
  ```
  200 Command okay.
  425 Can't open data connection.
  
  ```
  
  P.S.
  
  I run a Linux image from Windows cmd.
  
  **Tags:** docker, linux, windows
  
  > **Comments:**
  > **username_1**: Is there any firewall enabled? I’ve seen this error with FTP servers. See if this helps: https://github.com/microsoft/WSL/issues/2973  
  > **username_2**: you want to run FTP to connect to a r emote server from within your container?  
  
  ---
  
  ## 0 answers
  
  