Question

how to add proxy rules to connect to ftp(proftpd) installed in lxd container from network ?

Posted September 1, 2020 125 views
Linux Commands

i was already created lxd instance, ubuntu18.04 named ‘store’, with apache2, that can be acceded by proxy rule added with

lxc config device add store store90 proxy listen=tcp:0.0.0.0:80 connect=tcp:127.0.0.1:80

working, i can open defaut page, modified to verify..
the host is in virtuelbox with ip 192.168.1.33 and http://192.168.1.33 work like a charm

so, installed proftpd server,and want to connect to it from my network
i was modified proftpd MasqueradeAddress 192.168.1.33 to rely on external host address, and defined
PassivePorts 49152 65534

tried some proxy setting, but connexion fail when passing to passive connection.
filezilla log:

Status: Connecting to 192.168.1.33:21...
Status: Connection established, waiting for welcome message...
Status: Insecure server, it does not support FTP over TLS.
Status: Logged in
Status: Retrieving directory listing...
Command:    PWD
Response:   257 "/" is the current directory
Command:    TYPE I
Response:   200 Type set to I
Command:    PASV
Response:   227 Entering Passive Mode (192,168,1,33,216,239).
Command:    LIST
Error:  The data connection could not be established: ECONNREFUSED - Connection refused by server
Error:  Connection timed out after 20 seconds of inactivity
Error:  Failed to retrieve directory listing

in the host, the devices network are:

devices:
  eth0:
    name: eth0
    nictype: bridged
    parent: lxdbr0
    type: nic
  root:
    path: /
    pool: default
    type: disk
  store80:
    connect: tcp:127.0.0.1:80
    listen: tcp:0.0.0.0:80
    type: proxy
  storeftp21:
    connect: tcp:127.0.0.1:21
    listen: tcp:0.0.0.0:21
    type: proxy
  storeftp22:
    connect: tcp:127.0.0.1:22
    listen: tcp:0.0.0.0:22
    type: proxy
  storeftppassive:
    connect: tcp:127.0.0.1:49152-65534
    listen: tcp:0.0.0.0:49152-65534
    type: proxy

any help ?? or link to real working solution to set proxy for lxd with proftpd ?
i searched and founded very obscur solutions, nothing that i can understand now..
please help..

Submit an answer

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!