DyonR / docker-qbittorrentvpn

Docker container which runs a qBittorent-nox client with an optional WireGuard or OpenVPN connection
https://hub.docker.com/r/dyonr/qbittorrentvpn/
GNU General Public License v3.0
254 stars 79 forks source link

iptables-restore error while starting container #63

Open sportsziggy opened 3 years ago

sportsziggy commented 3 years ago

Running the :latest image on docker running on windows.

[#] iptables-restore -n iptables-restore v1.8.2 (nf_tables): Couldn't load match 'addrtype':No such file or directory Error occurred at line: 2

thewax commented 2 years ago

Was this ever figured out?

DyonR commented 2 years ago

Can you try to see if setting the environment variable LEGACY_IPTABLES to yes changes anything?

thewax commented 2 years ago

Just tried that. Didn't work.

Some notes: I'm using Docker on Windows with WSL. I'm a bit new to that, so it could entirely be user error here.

here's a dump (masked my vpn with x.x.x.x)

2021-11-02 19:02:09.086460 [INFO] VPN_ENABLED defined as 'yes'

2021-11-02 19:02:09.111492 [INFO] The container is currently running iptables v1.8.7 (nf_tables).

2021-11-02 19:02:09.132892 [INFO] LEGACY_IPTABLES is set to 'yes'

2021-11-02 19:02:09.151391 [INFO] Setting iptables to iptables (legacy)

update-alternatives: using /usr/sbin/iptables-legacy to provide /usr/sbin/iptables (iptables) in manual mode

2021-11-02 19:02:09.181721 [INFO] The container is now running iptables v1.8.7 (legacy).

2021-11-02 19:02:09.203313 [INFO] VPN_TYPE defined as 'wireguard'

2021-11-02 19:02:09.241812 [INFO] WireGuard config file is found at /config/wireguard/wg0.conf

2021-11-02 19:02:09.283540 [INFO] VPN remote line defined as 'x.x.x.x:1443'

2021-11-02 19:02:09.305276 [INFO] VPN_REMOTE defined as 'x.x.x.x'

2021-11-02 19:02:09.328630 [INFO] VPN_PORT defined as '1443'

2021-11-02 19:02:09.362114 [INFO] VPN_PROTOCOL set as 'udp', since WireGuard is always udp.

2021-11-02 19:02:09.390756 [INFO] VPN_DEVICE_TYPE set as 'wg0', since WireGuard will always be wg0.

2021-11-02 19:02:09.415435 [INFO] LAN_NETWORK defined as '192.168.50.0/24,fe80::d4f8:8522:a4bb:4811%53'

2021-11-02 19:02:09.441294 [WARNING] NAME_SERVERS not defined (via -e NAME_SERVERS), defaulting to CloudFlare and Google name servers

2021-11-02 19:02:09.466929 [INFO] Adding 1.1.1.1 to resolv.conf

2021-11-02 19:02:09.492054 [INFO] Adding 8.8.8.8 to resolv.conf

2021-11-02 19:02:09.515441 [INFO] Adding 1.0.0.1 to resolv.conf

2021-11-02 19:02:09.538316 [INFO] Adding 8.8.4.4 to resolv.conf

2021-11-02 19:02:09.559511 [INFO] PUID not defined. Defaulting to root user

2021-11-02 19:02:09.580078 [INFO] PGID not defined. Defaulting to root group

2021-11-02 19:02:09.603034 [INFO] Starting WireGuard...

dos2unix: converting file /config/wireguard/wg0.conf to Unix format...

Warning: `/config/wireguard/wg0.conf' is world accessible

[#] ip link add wg0 type wireguard

[#] wg setconf wg0 /dev/fd/63

[#] ip -4 address add 10.13.xxx.xx/24 dev wg0

[#] ip link set mtu 1420 up dev wg0

[#] resolvconf -a wg0 -m 0 -x

[#] wg set wg0 fwmark 51820

[#] ip -4 route add 0.0.0.0/0 dev wg0 table 51820

[#] ip -4 rule add not fwmark 51820 table 51820

[#] ip -4 rule add table main suppress_prefixlength 0

[#] iptables-restore -n

iptables-restore v1.8.7 (legacy): unknown option "--save-mark"

Error occurred at line: 5

Try `iptables-restore -h' or 'iptables-restore --help' for more information.

[#] resolvconf -d wg0 -f

[#] ip -4 rule delete table 51820

[#] ip -4 rule delete table main suppress_prefixlength 0

[#] ip link delete dev wg0

dos2unix: converting file /config/wireguard/wg0.conf to Unix format...
sportsziggy commented 2 years ago

Was this ever figured out?

nope, ended up switching to binhex/arch-qbittorrentvpn

nickgreen43 commented 2 years ago

I am having the same issue on Docker on Windows with WSL