Pomoc Transmission przez OpenVPN

---===PIOTR===---

Passing Basics
Beginner
12 Marzec 2017
20
3
3
QNAP
TS-x51
Ethernet
100 Mbps
Jest ktoś zorientowany (lub widział w internecie tutorial i poda link) jak skonfigurować Transmission przez VPN?
Chodzi o to, żeby jedynie Transmission korzystało z połączenia OpenVPN, a cała reszta usług NAS-a z normalnego łącza internetowego.
 
Nikt nie ma pomysłu? Już nawet zamierzałem podpiąć drugi internet z routerem skonfigurowanym tylko na VPN do drugiej karty sieciowej w NAS-ie... ale akurat transmission nie ma opcji powiązania z daną kartą sieciową.
 
Chyba zdecyduję się na instalację dockera:
Docker Hub
Niestety w Linuksie nie jestem oblatany.

Mniej więcej według tego powinienem dać radę?

Link: https://www.youtube.com/watch?v=Fp8GF226yjU&t=310s



Zainstalowałem, ale mam problem. Kontener startuje na chwilę, ale od razu się zamyka. Co może być źle?

Tutaj film jak ustawiany jest ten kontener, ale nie na QNAPIE:

Link: https://www.youtube.com/watch?v=MRgZ9oZQ7ds


Zmienne środowiskowe: (da się je edytować po utworzeniu? Obecnie tworzę coraz to nowe kontenery)

Kod:
DROP_DEFAULT_ROUTE 		
ENABLE_UFW 	false 	
GLOBAL_APPLY_PERMISSIONS 	true 	
HEALTH_CHECK_HOST 	google.com 	
OPENVPN_PASSWORD 	<<<poprawne>>>
OPENVPN_PROVIDER 	NORDVPN 	
OPENVPN_USERNAME 	<<<mój mail>>>
PATH 	/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 	
PGID 		
PUID 		
TRANSMISSION_ALT_SPEED_DOWN 	50 	
TRANSMISSION_ALT_SPEED_ENABLED 	false 	
TRANSMISSION_ALT_SPEED_TIME_BEGIN 	540 	
TRANSMISSION_ALT_SPEED_TIME_DAY 	127 	
TRANSMISSION_ALT_SPEED_TIME_ENABLED 	false 	
TRANSMISSION_ALT_SPEED_TIME_END 	1020 	
TRANSMISSION_ALT_SPEED_UP 	50 	
TRANSMISSION_BIND_ADDRESS_IPV4 	192.168.0.102/24 	
TRANSMISSION_BIND_ADDRESS_IPV6 	:: 	
TRANSMISSION_BLOCKLIST_ENABLED 	false 	
TRANSMISSION_BLOCKLIST_URL 	http://www.example.com/blocklist 	
TRANSMISSION_CACHE_SIZE_MB 	4 	
TRANSMISSION_DHT_ENABLED 	true 	
TRANSMISSION_DOWNLOAD_DIR 	/data/completed 	
TRANSMISSION_DOWNLOAD_LIMIT 	100 	
TRANSMISSION_DOWNLOAD_LIMIT_ENABLED 	0 	
TRANSMISSION_DOWNLOAD_QUEUE_ENABLED 	true 	
TRANSMISSION_DOWNLOAD_QUEUE_SIZE 	5 	
TRANSMISSION_ENCRYPTION 	1 	
TRANSMISSION_HOME 	/data/transmission-home 	
TRANSMISSION_IDLE_SEEDING_LIMIT 	30 	
TRANSMISSION_IDLE_SEEDING_LIMIT_ENABLED 	false 	
TRANSMISSION_INCOMPLETE_DIR 	/data/incomplete 	
TRANSMISSION_INCOMPLETE_DIR_ENABLED 	true 	
TRANSMISSION_LPD_ENABLED 	false 	
TRANSMISSION_MAX_PEERS_GLOBAL 	200 	
TRANSMISSION_MESSAGE_LEVEL 	2 	
TRANSMISSION_PEER_CONGESTION_ALGORITHM 		
TRANSMISSION_PEER_ID_TTL_HOURS 	6 	
TRANSMISSION_PEER_LIMIT_GLOBAL 	200 	
TRANSMISSION_PEER_LIMIT_PER_TORRENT 	50 	
TRANSMISSION_PEER_PORT 	51413 	
TRANSMISSION_PEER_PORT_RANDOM_HIGH 	65535 	
TRANSMISSION_PEER_PORT_RANDOM_LOW 	49152 	
TRANSMISSION_PEER_PORT_RANDOM_ON_START 	false 	
TRANSMISSION_PEER_SOCKET_TOS 	default 	
TRANSMISSION_PEX_ENABLED 	true 	
TRANSMISSION_PORT_FORWARDING_ENABLED 	false 	
TRANSMISSION_PREALLOCATION 	1 	
TRANSMISSION_PREFETCH_ENABLED 	1 	
TRANSMISSION_QUEUE_STALLED_ENABLED 	true 	
TRANSMISSION_QUEUE_STALLED_MINUTES 	30 	
TRANSMISSION_RATIO_LIMIT 	2 	
TRANSMISSION_RATIO_LIMIT_ENABLED 	false 	
TRANSMISSION_RENAME_PARTIAL_FILES 	true 	
TRANSMISSION_RPC_AUTHENTICATION_REQUIRED 	false 	
TRANSMISSION_RPC_BIND_ADDRESS 	0.0.0.0 	
TRANSMISSION_RPC_ENABLED 	true 	
TRANSMISSION_RPC_HOST_WHITELIST 		
TRANSMISSION_RPC_HOST_WHITELIST_ENABLED 	false 	
TRANSMISSION_RPC_PASSWORD 	password 	
TRANSMISSION_RPC_PORT 	9091 	
TRANSMISSION_RPC_URL 	/transmission/ 	
TRANSMISSION_RPC_USERNAME 	username 	
TRANSMISSION_RPC_WHITELIST 	127.0.0.1 	
TRANSMISSION_RPC_WHITELIST_ENABLED 	false 	
TRANSMISSION_SCRAPE_PAUSED_TORRENTS_ENABLED 	true 	
TRANSMISSION_SCRIPT_TORRENT_DONE_ENABLED 	false 	
TRANSMISSION_SCRIPT_TORRENT_DONE_FILENAME 		
TRANSMISSION_SEED_QUEUE_ENABLED 	false 	
TRANSMISSION_SEED_QUEUE_SIZE 	10 	
TRANSMISSION_SPEED_LIMIT_DOWN 	100 	
TRANSMISSION_SPEED_LIMIT_DOWN_ENABLED 	false 	
TRANSMISSION_SPEED_LIMIT_UP 	100 	
TRANSMISSION_SPEED_LIMIT_UP_ENABLED 	false 	
TRANSMISSION_START_ADDED_TORRENTS 	true 	
TRANSMISSION_TRASH_ORIGINAL_TORRENT_FILES 	false 	
TRANSMISSION_UMASK 	2 	
TRANSMISSION_UPLOAD_LIMIT 	100 	
TRANSMISSION_UPLOAD_LIMIT_ENABLED 	0 	
TRANSMISSION_UPLOAD_SLOTS_PER_TORRENT 	14 	
TRANSMISSION_UTP_ENABLED 	true 	
TRANSMISSION_WATCH_DIR 	/data/watch 	
TRANSMISSION_WATCH_DIR_ENABLED 	true 	
TRANSMISSION_WATCH_DIR_FORCE_GENERIC 	false 	
TRANSMISSION_WEB_HOME 		
TRANSMISSION_WEB_UI 	transmission-web-control 	
UFW_ALLOW_GW_NET 	false 	
UFW_DISABLE_IPTABLES_REJECT 	false 	
UFW_EXTRA_PORTS 		
WEBPROXY_ENABLED 	true 	
WEBPROXY_PORT 	8888


W sieci zrobiłem 9092 na 9091, bo już jedno transmission na Qnapie mi pracuje.

Zaznaczyłem "Uruchamiaj kontenery w trybie uprzywilejowanym", bo inaczej wyskakiwały jakieś błędy TUN/TAP



Foldery współdzielone:

Kod:
/data 	/share/Download/data 	Odczyt/Zapis
/config 	/share/Download/config 	Odczyt/Zapis





Konsola:

Kod:
Using OpenVPN provider: NORDVPN                                                                                                                                                                                                         
2019-04-18 17:41:50 Checking curl installation                                                                                                                                                                                         
2019-04-18 17:41:50 Removing existing configs                                                                                                                                                                                           
2019-04-18 17:41:50 Selecting the best server...                                                                                                                                                                                       
2019-04-18 17:41:50 Searching for group: legacy_p2p                                                                                                                                                                                     
2019-04-18 17:41:50 Searching for technology: openvpn_udp                                                                                                                                                                               
2019-04-18 17:41:50 Best server : pl77.nordvpn.com                                                                                                                                                                                     
2019-04-18 17:41:50 Downloading config: default.ovpn                                                                                                                                                                                   
2019-04-18 17:41:50 Downloading from: https://downloads.nordcdn.com/configs/files/ovpn_udp/servers/pl77.nordvpn.com.udp.ovpn                                                                                                           
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current                                                                                                                                                         
                                 Dload  Upload   Total   Spent    Left  Speed                                                                                                                                                           
100  2809  100  2809    0     0   5073      0 --:--:-- --:--:-- --:--:--  5116                                                                                                                                                         
2019-04-18 17:41:50 Checking line endings                                                                                                                                                                                               
2019-04-18 17:41:50 Updating configs for docker-transmission-openvpn                                                                                                                                                                   
Starting OpenVPN using config default.ovpn                                                                                                                                                                                             
Setting OPENVPN credentials...                                                                                                                                                                                                         
Thu Apr 18 17:41:55 2019 OpenVPN 2.4.7 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Feb 19 2019                                                                                       
Thu Apr 18 17:41:55 2019 library versions: OpenSSL 1.0.2g  1 Mar 2016, LZO 2.08                                                                                                                                                         
Thu Apr 18 17:41:55 2019 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts                                                                                                         
Thu Apr 18 17:41:55 2019 Outgoing Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication                                                                                                           
Thu Apr 18 17:41:55 2019 Incoming Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication                                                                                                           
Thu Apr 18 17:41:55 2019 TCP/UDP: Preserving recently used remote address: [AF_INET]212.7.222.107:1194                                                                                                                                 
Thu Apr 18 17:41:55 2019 Socket Buffers: R=[212992->212992] S=[212992->212992]                                                                                                                                                         
Thu Apr 18 17:41:55 2019 UDP link local: (not bound)                                                                                                                                                                                   
Thu Apr 18 17:41:55 2019 UDP link remote: [AF_INET]212.7.222.107:1194                                                                                                                                                                   
Thu Apr 18 17:41:55 2019 TLS: Initial packet from [AF_INET]212.7.222.107:1194, sid=9f54cd80 3a55d53b                                                                                                                                   
Thu Apr 18 17:41:55 2019 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this                                                                                                       
Thu Apr 18 17:41:55 2019 VERIFY OK: depth=2, C=PA, O=NordVPN, CN=NordVPN Root CA                                                                                                                                                       
Thu Apr 18 17:41:55 2019 VERIFY OK: depth=1, C=PA, O=NordVPN, CN=NordVPN CA3                                                                                                                                                           
Thu Apr 18 17:41:55 2019 VERIFY KU OK                                                                                                                                                                                                   
Thu Apr 18 17:41:55 2019 Validating certificate extended key usage                                                                                                                                                                     
Thu Apr 18 17:41:55 2019 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication                                                                                                             
Thu Apr 18 17:41:55 2019 VERIFY EKU OK

Thu Apr 18 17:41:55 2019 VERIFY OK: depth=0, CN=pl77.nordvpn.com                                                                                                                                                                       
Thu Apr 18 17:41:56 2019 Control Channel: TLSv1.2, cipher TLSv1/SSLv3 ECDHE-RSA-AES256-GCM-SHA384, 4096 bit RSA                                                                                                                         
Thu Apr 18 17:41:56 2019 [pl77.nordvpn.com] Peer Connection Initiated with [AF_INET]212.7.222.107:1194                                                                                                                                 
Thu Apr 18 17:41:57 2019 SENT CONTROL [pl77.nordvpn.com]: 'PUSH_REQUEST' (status=1)                                                                                                                                                     
Thu Apr 18 17:41:57 2019 PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1,dhcp-option DNS 103.86.96.100,dhcp-option DNS 103.86.99.100,sndbuf 524288,rcvbuf 524288,explicit-exit-notify,comp-lzo no,route-gateway 10.8.3.1,top
ology subnet,ping 60,ping-restart 180,ifconfig 10.8.3.20 255.255.255.0,peer-id 18,cipher AES-256-GCM'                                                                                                                                   
Thu Apr 18 17:41:57 2019 OPTIONS IMPORT: timers and/or timeouts modified                                                                                                                                                               
Thu Apr 18 17:41:57 2019 OPTIONS IMPORT: explicit notify parm(s) modified                                                                                                                                                               
Thu Apr 18 17:41:57 2019 OPTIONS IMPORT: compression parms modified                                                                                                                                                                     
Thu Apr 18 17:41:57 2019 OPTIONS IMPORT: --sndbuf/--rcvbuf options modified                                                                                                                                                             
Thu Apr 18 17:41:57 2019 Socket Buffers: R=[212992->425984] S=[212992->425984]                                                                                                                                                         
Thu Apr 18 17:41:57 2019 OPTIONS IMPORT: --ifconfig/up options modified                                                                                                                                                                 
Thu Apr 18 17:41:57 2019 OPTIONS IMPORT: route options modified                                                                                                                                                                         
Thu Apr 18 17:41:57 2019 OPTIONS IMPORT: route-related options modified                                                                                                                                                                 
Thu Apr 18 17:41:57 2019 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified                                                                                                                                               
Thu Apr 18 17:41:57 2019 OPTIONS IMPORT: peer-id set                                                                                                                                                                                   
Thu Apr 18 17:41:57 2019 OPTIONS IMPORT: adjusting link_mtu to 1657                                                                                                                                                                     
Thu Apr 18 17:41:57 2019 OPTIONS IMPORT: data channel crypto options modified                                                                                                                                                           
Thu Apr 18 17:41:57 2019 Data Channel: using negotiated cipher 'AES-256-GCM'                                                                                                                                                           
Thu Apr 18 17:41:57 2019 Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key                                                                                                                                       
Thu Apr 18 17:41:57 2019 Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key                                                                                                                                       
Thu Apr 18 17:41:57 2019 ROUTE_GATEWAY 10.0.3.1/255.255.255.0 IFACE=eth0 HWADDR=02:42:0a:00:03:02                                                                                                                                       
Thu Apr 18 17:41:57 2019 TUN/TAP device tun0 opened                                                                                                                                                                                     
Thu Apr 18 17:41:57 2019 TUN/TAP TX queue length set to 100                                                                                                                                                                             
Thu Apr 18 17:41:57 2019 /sbin/ip link set dev tun0 up mtu 1500                                                                                                                                                                         
Thu Apr 18 17:41:57 2019 /sbin/ip addr add dev tun0 10.8.3.20/24 broadcast 10.8.3.255                                                                                                                                                   
Thu Apr 18 17:41:57 2019 /etc/openvpn/tunnelUp.sh tun0 1500 1585 10.8.3.20 255.255.255.0 init                                                                                                                                           
Up script executed with tun0 1500 1585 10.8.3.20 255.255.255.0 init                                                                                                                                                                     
Updating TRANSMISSION_BIND_ADDRESS_IPV4 to the ip of tun0 : 10.8.3.20                                                                                                                                                                   
Using Transmission Web Control  UI, overriding TRANSMISSION_WEB_HOME
                                                                                                                                                            
Generating transmission settings.json from env variables                                                                                                                                                                               
sed'ing True to true                                                                                                                                                                                                                   
                                                                                                                                                                                                                                       
-------------------------------------                                                                                                                                                                                                 
Transmission will run as                                                                                                                                                                                                               
-------------------------------------                                                                                                                                                                                                 
User name:  root                                                                                                                                                                                                                     
User uid:    0                                                                                                                                                                                                                         
User gid:    0                                                                                                                                                                                                                         
-------------------------------------                                                                                                                                                                                                 
                                                                                                                                                                                                                                       
STARTING TRANSMISSION                                                                                                                                                                                                                 
NO PORT UPDATER FOR THIS PROVIDER                                                                                                                                                                                                     
Transmission startup script complete.                                                                                                                                                                                                 
STARTING TINYPROXY                                                                                                                                                                                                                     
Found config file /etc/tinyproxy.conf, updating settings.                                                                                                                                                                             
Setting tinyproxy port to 8888                                                                                                                                                                                                         
Starting tinyproxy: tinyproxy.                                                                                                                                                                                                         
Tinyproxy startup script complete.                                                                                                                                                                                                     
Thu Apr 18 17:41:57 2019 /sbin/ip route add 212.7.222.107/32 via 10.0.3.1                                                                                                                                                             
Thu Apr 18 17:41:58 2019 /sbin/ip route add 0.0.0.0/1 via 10.8.3.1                                                                                                                                                                     
Thu Apr 18 17:41:58 2019 /sbin/ip route add 128.0.0.0/1 via 10.8.3.1                                                                                                                                                                   
Thu Apr 18 17:41:58 2019 Initialization Sequence Completed


w samym transmission.log mam:

Kod:
[2019-04-18 17:41:59.165] Transmission 2.94 (d8e60ee44f) started (session.c:740)
[2019-04-18 17:41:59.181] RPC Server Adding address to whitelist: 127.0.0.1 (rpc-server.c:971)
[2019-04-18 17:41:59.181] RPC Server Serving RPC and Web requests on port 127.0.0.1:9091/transmission/ (rpc-server.c:1213)
[2019-04-18 17:41:59.181] Port Forwarding Stopped (port-forwarding.c:180)
[2019-04-18 17:41:59.181] UDP Failed to set receive buffer: requested 4194304, got 425984 (tr-udp.c:84)
[2019-04-18 17:41:59.181] UDP Please add the line "net.core.rmem_max = 4194304" to /etc/sysctl.conf (tr-udp.c:89)
[2019-04-18 17:41:59.181] UDP Failed to set send buffer: requested 1048576, got 425984 (tr-udp.c:95)
[2019-04-18 17:41:59.182] UDP Please add the line "net.core.wmem_max = 1048576" to /etc/sysctl.conf (tr-udp.c:100)
[2019-04-18 17:41:59.182] DHT Generating new id (tr-dht.c:311)
[2019-04-18 17:41:59.182] Using settings from "/data/transmission-home" (daemon.c:528)
[2019-04-18 17:41:59.182] Saved "/data/transmission-home/settings.json" (variant.c:1266)
[2019-04-18 17:41:59.182] Watching "/data/watch" for new .torrent files (daemon.c:573)




Drugi, jeszcze bardziej popularny na repozytorium, ale bez VPN ( Docker Hub ) wystartował bez problemu z podobnymi parametrami i z tym samym przekierowaniem 9092->9091.
 

Załączniki

  • adoc.elabftw.net__images_mysql_env.png
    adoc.elabftw.net__images_mysql_env.png
    61,7 KB · Wyświetleń: 91

Użytkownicy znaleźli tą stronę używając tych słów:

  1. whitelist transmission