March 6Mar 6 I have a few Docker containers that I need to be behind VPN.Previously, it has worked great to set up Tunnel wg0 as shown below.I got this all set up and working great until yesterday. I was working fine in Unraid 7.2.3, and after upgrading to 7.2.4, something stopped working very recently. I did not change anything in my settings or config. Even after I restarted it is still not working as expected. I am not able to determine if this is a 7.2.4 upgrade problem because it did not stop working directly after the upgrade.The next step I usually do is add it under the network type in the Docker config, but it disappeared and no longer shows up there.I would expect it to be listed as a Network Type "wg0" under this drop-down menu but it is no longer located there.Thanks in advance for any help!!VPN setup shown here: Edited March 6Mar 6 by Darkoptix added extra information
March 7Mar 7 Community Expert 11 hours ago, Darkoptix said:I am not able to determine if this is a 7.2.4 upgrade problem because it did not stop working directly after the upgrade.You can confirm by downgrading to 7.2.3 and retesting.
March 10Mar 10 Community Expert Solution This happened to me (on 7.2.4). Something had killed the docker network (check with docker network list). When I created another wg tunnel device (say wg1) it was then visible in the docker network list( via CLI and in the Edit page for docker containers). So try either creating a new one or deleting and recreating your wg0. Or recreate the docker network using docker network create. Good luck! Edited March 10Mar 10 by asa666
March 10Mar 10 Author Thanks for the replies. I was able to "fix" it by recreating a new Tunnel. First, I added a new wg1 like you mentioned in 7.2.4. I did this before going back to 7.2.3 so was not able to verify if just going back to 7.2.3 would have fixed the original wg0 that stopped showing up.I went back to 7.2.3, and nothing broke. Then I upgraded to 7.2.4, and nothing broke.So its all working correctly now!Thanks for the commands you shared I will keep them handy for future reference!
May 4May 4 I found that sometimes the tunnel breaks because the token for it has a lifespan. So I set up a user script that runs every hour to refresh the tunnel as needed. Attaching it in case it helps anyone.Edit: Oh, and I forgot. That script also includes routing rules so that (1) local traffic doesn't go out the VPN, and (2) the host doesn't lose network if the tunnel goes down. I also had to put this in the /boot/config/go:# Ensure that the docker bridged containers never use wg1ip rule add from 172.17.0.0/16 lookup main priority 5201ip rule add from 172.19.0.0/16 lookup main priority 5202ip rule add from 192.168.122.0/24 lookup main priority 5203VPN_Check_and_Repair.sh.txt Edited May 4May 4 by coppit Added info on routing rules.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.