binhex / arch-qbittorrentvpn

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

Can't Access WebGui without running /sbin/modprobe iptable_mangle #259

Closed CoffeeLovingDad closed 2 months ago

CoffeeLovingDad commented 2 months ago

Every time I restart my server and start Qbittorrent (using VPN) in Docker; I then have to run /sbin/modprobe iptable_mangle and then restart the Qbittorrent Docker container then I'm able to access the Webgui successfully.

ElenaSore commented 1 month ago

Were you ever able to find a solution for this? I'm running into the same issue.

CoffeeLovingDad commented 1 month ago

Yes I actually resolved this using ChatGPT.

It sounds like you're running into a problem where you need to load a kernel module (iptable_mangle) each time you restart Docker to access the web GUI of qBittorrent. This can be inconvenient, so here's how you might address the issue:

1. Automate Module Loading

You can automate the loading of the iptable_mangle module at boot time. Here’s how you can do that:

For Systemd-Based Systems (e.g., Ubuntu 16.04+):

  1. Create a systemd service file:

    Create a new service file, for example /etc/systemd/system/load-iptable-mangle.service, and add the following content:

    [Unit]
    Description=Load iptable_mangle Module
    After=network.target
    
    [Service]
    Type=oneshot
    ExecStart=/sbin/modprobe iptable_mangle
    RemainAfterExit=true
    
    [Install]
    WantedBy=multi-user.target
  2. Enable and start the service:

    sudo systemctl daemon-reload
    sudo systemctl enable load-iptable-mangle.service
    sudo systemctl start load-iptable-mangle.service

This will ensure that the iptable_mangle module is loaded automatically at boot.

2. Ensure Module Persistence Across Reboots

Sometimes, the module might not persist across reboots. To ensure it's always loaded:

  1. Edit the modules configuration file:

    Add iptable_mangle to the /etc/modules file. Open the file with your preferred text editor:

    sudo nano /etc/modules

    Add iptable_mangle on a new line and save the file.

    iptable_mangle

    This will ensure the module is loaded at boot.

CoffeeLovingDad commented 1 month ago

Let me know if you need further help, that should point you in the right direction.

ElenaSore commented 1 month ago

Thanks for the quick reply. Probably should have asked chatgpt but I completely forget that was an option lol. Appreciate the help, ill get this implemented tonight on my server.

CoffeeLovingDad commented 1 month ago

No problem, was something that'd been bugging me for years and I hadn't taken the time to resolve it then resolved it right after posting the question here last month.

Good luck.