YouTransfer

De MochilaWiki
Ir para navegaçãoIr para pesquisar

Instalação via Docker

docker run -d -v /home/youtransfer/uploads:/opt/youtransfer/uploads -v /home/youtransfer/config:/opt/youtransfer/config -p 127.0.0.1:5000:5000 remie/youtransfer:stable

Proxy reverso no Nginx

em /etc/nginx/sites-enabled/share.dean.com.br.conf

server {
        listen   80;

        client_max_body_size 128m;
        access_log /var/log/nginx/share.dean.com.br.access.log;
        error_log /var/log/nginx/share.dean.com.br.error.log info;

        server_name share.dean.com.br;

        location / {
            proxy_pass         http://localhost:5000;
            proxy_redirect     off;
            proxy_set_header   Host $host;
            proxy_set_header   X-Real-IP $remote_addr;
            proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header   X-Forwarded-Host $server_name;
        }

}

Iptables no Docker

iptables -t nat -A POSTROUTING -s 172.17.0.0/16 ! -o docker0 -j MASQUERADE
iptables -t filter -A FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
iptables -t filter -A FORWARD -i docker0 ! -o docker0 -j ACCEPT
iptables -t filter -A FORWARD -i docker0 -o docker0 -j ACCEPT

Docker com CSF

Referências