binhex / arch-qbittorrentvpn

Docker build script for Arch Linux base with qBittorrent, Privoxy and OpenVPN
GNU General Public License v3.0
431 stars 47 forks source link

iptables default policies not available, exiting script... #257

Closed Brancliff closed 1 month ago

Brancliff commented 1 month ago

Basically, I can't get to the WebUI. I tried disabling my VPN, and in doing so, that was able to get it to work. You might be thinking, that sounds like #203 - it does, but when the issue was closed, the closing statement pointed to a link to the FAQ which only showed me how to get my supervisord logfile, which was just the same as what it said in the container's terminal.

Additionally, within the discussion on that issue, some of the solutions proposed involved pulling an updated image of the container, but I'm already on :latest, so that shouldn't be a factor.

supervisord.log

2024-07-16 19:08:36.404539 [info] System information Linux cdc47d8d7566 5.10.60-qnap #1 SMP Mon May 20 01:54:16 CST 2024 x86_64 GNU/Linux 2024-07-16 19:08:36.662427 [info] SHARED_NETWORK not defined (via -e SHARED_NETWORK), defaulting to 'no' 2024-07-16 19:08:36.817308 [warn] PUID not defined (via -e PUID), defaulting to '99' 2024-07-16 19:08:39.091218 [warn] PGID not defined (via -e PGID), defaulting to '100' 2024-07-16 19:08:39.961614 [warn] UMASK not defined (via -e UMASK), defaulting to '000' 2024-07-16 19:08:40.178558 [info] Permissions already set for '/config' 2024-07-16 19:08:40.542659 [info] Deleting files in /tmp (non recursive)... 2024-07-16 19:08:40.863827 [info] VPN_ENABLED defined as 'yes' 2024-07-16 19:08:41.056334 [info] VPN_CLIENT defined as 'openvpn' 2024-07-16 19:08:41.186157 [info] VPN_PROV defined as 'nordvpn' 2024-07-16 19:08:41.441390 [info] OpenVPN config file (ovpn extension) is located at /config/openvpn/ae60.nordvpn.com.tcp443.ovpn 2024-07-16 19:08:41.802841 [info] VPN remote server(s) defined as '146.70.238.179,' 2024-07-16 19:08:41.902380 [info] VPN remote port(s) defined as '443,' 2024-07-16 19:08:41.995159 [info] VPN remote protcol(s) defined as 'tcp-client,' 2024-07-16 19:08:42.121690 [info] VPN_DEVICE_TYPE defined as 'tun0' 2024-07-16 19:08:42.308203 [info] VPN_OPTIONS not defined (via -e VPN_OPTIONS) 2024-07-16 19:08:42.408746 [warn] NAME_SERVERS not defined (via -e NAME_SERVERS), defaulting to name servers defined in readme.md iptables v1.8.10 (legacy): can't initialize iptables table `filter': Permission denied (you must be root) Perhaps iptables or your kernel needs to be upgraded. 2024-07-16 19:08:42.681308 [crit] iptables default policies not available, exiting script...

docker-compose.yml

arch-qbittorrentvpn: image: binhex/arch-qbittorrentvpn:latest container_name: qbittorrentvpn user: root volumes:

Also, while the container's logs said that I must be root - yeah, I tried that. Still no dice. :/

binhex commented 1 month ago

You are missing a lot of env vars here and other important options, take a look at the readme again

Brancliff commented 1 month ago

That... still is pretty indirect. The readme doesn't tell me which ones are important or - in this case, mandatory, apparently. Surely I don't need every single line of that config? Some of them, I don't even know what it means, let alone what I should put for it. Or why it says I should run as root, and then even that doesn't solve the problem.

In the meantime, I was able to fix the problem by adding this little bit from #201 to my docker-compose.yml

    cap_add:
        - NET_ADMIN
binhex commented 1 month ago

in this case, mandatory, apparently.

Not all env vars are mandatory no, I have been kind by specifying sane defaults, however you cannot guess what the users VPN provider is or know what their username or password for the VPN provider is so some are mandatory and some have defaults

Some of them, I don't even know what it means,

Did you look at the linked 'Documentation'?, see here for an explanation of every option.

Or why it says I should run as root

That is output from iptables, which is not in my control.

In the meantime, I was able to fix the problem by adding this little bit

That is shown in the example commands and is not an env var and thus is mandatory.