lxc-create -n transmission3 -t ubuntu --/var/lib/lxc/transmission3/config: lxc.mount.entry = /yoko/dl /yoko/lxc/transmission3/rootfs/yoko/dl none bind 0 0
mkdir /yoko/lxc/transmission3/rootfs/dllxc-start transmission3lxc-attach transmission3passwd ubuntu apt update apt install transmission-daemon openvpn resolvconfiptables -I FORWARD -p tcp -d 192.168.122.225 --dport 9091 -j ACCEPT iptables -t nat -I PREROUTING -i eth0 -p TCP -d 192.168.0.10/32 --dport 9093 -j DNAT --to-destination 192.168.122.225:9091apt install iptables-persistent iptables-save > /etc/iptables/rules.v4unzip vpn_profile.zip cp -r vpn_profile /etc/openvpn/vim /etc/openvpn/vpn_profile/user.txt Username Password
/etc/openvpn/openvpn.conf: auth-user-pass /etc/openvpn/vpn_profile/user.txt ca /etc/openvpn/vpn_profile/ca.crt cert /etc/openvpn/vpn_profile/client.crt key /etc/openvpn/vpn_profile/client.key
At the bottom, add:
up /etc/openvpn/update-resolv-conf down /etc/openvpn/update-resolv-conf
/usr/local/bin/vpn_profile.sh#!/bin/sh /usr/bin/mkdir /dev/net /usr/bin/mknod /dev/net/tun c 10 200 /usr/sbin/openvpn --config /etc/openvpn/vpn_profile/openvpn.ovpn --route 192.168.0.0 255.255.255.0 192.168.122.1
chmod +x /usr/local/bin/vpn_profile.sh/etc/systemd/system/vpn_profile.service [Unit] Description=Start OpenVPN PartOf=graphical.target [Service] ExecStart=/usr/local/bin/vpn_profile.sh ExecStop=/bin/kill -s STOP $MAINPID Type=daemon [Install] WantedBy=graphical.target
systemctl daemon-reload systemctl enable vpn_profilesettings.json for Transmission /yoko/transmission-daemon3/settings.json { "alt-speed-down": 50, "alt-speed-enabled": false, "alt-speed-time-begin": 540, "alt-speed-time-day": 127, "alt-speed-time-enabled": false, "alt-speed-time-end": 1020, "alt-speed-up": 50, "bind-address-ipv4": "0.0.0.0", "bind-address-ipv6": "::", "blocklist-enabled": false, "blocklist-url": "http://www.example.com/blocklist", "cache-size-mb": 4, "dht-enabled": true, "download-dir": "/yoko/dl", "download-limit": 100, "download-limit-enabled": 0, "download-queue-enabled": true, "download-queue-size": 5, "encryption": 1, "idle-seeding-limit": 30, "idle-seeding-limit-enabled": false, "incomplete-dir": "/var/lib/transmission-daemon/Downloads", "incomplete-dir-enabled": false, "lpd-enabled": false, "max-peers-global": 200, "message-level": 1, "peer-congestion-algorithm": "", "peer-id-ttl-hours": 6, "peer-limit-global": 200, "peer-limit-per-torrent": 50, "peer-port": 51413, "peer-port-random-high": 65535, "peer-port-random-low": 49152, "peer-port-random-on-start": false, "peer-socket-tos": "default", "pex-enabled": true, "port-forwarding-enabled": false, "preallocation": 1, "prefetch-enabled": true, "queue-stalled-enabled": true, "queue-stalled-minutes": 30, "ratio-limit": 2, "ratio-limit-enabled": false, "rename-partial-files": true, "rpc-authentication-required": true, "rpc-bind-address": "192.168.122.225", "rpc-enabled": true, "rpc-host-whitelist": "", "rpc-host-whitelist-enabled": false, "rpc-password": "INSERT PASSWORD HERE", "rpc-port": 9091, "rpc-url": "/transmission3/", "rpc-username": "wolfo", "rpc-whitelist": "127.0.0.1", "rpc-whitelist-enabled": false, "scrape-paused-torrents-enabled": true, "script-torrent-done-enabled": false, "script-torrent-done-filename": "", "seed-queue-enabled": false, "seed-queue-size": 10, "speed-limit-down": 5, "speed-limit-down-enabled": true, "speed-limit-up": 100, "speed-limit-up-enabled": false, "start-added-torrents": true, "trash-original-torrent-files": false, "umask": 18, "upload-limit": 100, "upload-limit-enabled": 0, "upload-slots-per-torrent": 14, "utp-enabled": true }
systemctl stop transmission-daemon systemctl disable transmission-daemon/etc/systemd/system/transmission3.service [Unit] Description=Transmission BitTorrent [Service] Type=forking User=ubuntu ExecStart=/usr/bin/transmission-daemon -g /yoko/transmission-daemon3 -e /yoko/transmission-daemon3/logfile ExecStop=/bin/kill -s STOP $MAINPID [Install] WantedBy=multi-user.target
systemctl daemon-reload systemctl enable transmission3