|
|
|
|
|
by nntwozz
1121 days ago
|
|
This looks very useful for torrenting through a VPN, I currently have WireGuard outside of Docker and run my torrent client container with network_mode: host for improved network performance. In order to have the client use the VPN but keep the rest of the system accessible outside the VPN I bind the client IP (VPN IP4 & IP6) in the client config and have WireGuard setup like this: [Interface]
PrivateKey =
Address = IP4, IP6
DNS =
Table = 12345
PostUp = ip -4 rule add from IP4 table 12345
PostUp = ip -6 rule add from IP6 table 12345
PostUp = iptables -I OUTPUT -s IP4 ! -o %i -j DROP
PostUp = ip6tables -I OUTPUT -s IP6 ! -o %i -j DROP
PostDown = ip -4 rule del from IP4 table 12345
PostDown = ip -6 rule del from IP6 table 12345
PostDown = iptables -D OUTPUT -s IP4 ! -o %i -j DROP
PostDown = ip6tables -D OUTPUT -s IP6 ! -o %i -j DROP
[Peer]
PublicKey =
Endpoint =
AllowedIPs = 0.0.0.0/0, ::/0
|
|