3月 052018
 

当vsftpd在容器里面,而且容器IP又是host内部的私有IP的情况,client采用passive模式来下载数据能行得通吗? 可以的

  1. passive模式下,vsftpd需要listen临时端口来传输数据,所以docker创建容器时,不仅要暴露21端口,还要暴露可能listen的临时端口,为了不映射太多端口,可以在vsftpd的配置文件中配置可能的临时端口的范围
  2. passive模式下,vsftpd需要通过协议内容告知client临时端口及IP地址,然而,容器网卡IP地址显然是不能被client直接访问到的,庆幸的是,vsftpd配置文件中有关于可以告知client的ip地址的配置,该ip地址并不要求本机上必须有的,显然该配置是给类似情况准备的

 Posted by at 下午 6:13

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

(required)

(required)

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据