Broke NPM after trying to setup AdGuard on macvlan reddit / selfhosted ---------------------------------------------------------------------- Jirarchi 路 2023-12-18 20:12 Hello! The other day, as the title says, I was trying to setup AdGuard on a macvlan to avoid the port conflicts with NPM, so I could use it as a DHCP server (I know it's possible to change the port after the initial configuration but for some reason my system didn't like that trick). Things worked half-good, meaning that adguard was accessible via its own ip and the whole network was using it as dns and dhcp server BUT I could no longer access the other services hosted on that server, big no. So I peacefully gave up only to find, to my horror, that nothing worked after deleting the container and its macvlan. I can access my services via ip:port but I can't make it work with reverse-proxy. I tried re-installing NPM from scratch but it still didn't work: even if NPM and ServiceX are in the same network, I can't setup a proxy host with its container hostname (but I found out that using the ip of said network works for some reason). My guess is that the problem lies in some docker name-resolving mechanism that got fucked up (but I could easily be wrong). Can anyone help me? Please don't let me go maniac and reinstall the whole system under Christmas. My setup: Ubuntu server 22.04, CasaOS, Portainer, NPM, services in containers (Immich, Changedetection, etc.). Not very informative, I know 馃ズ ---------------------------------------------------------------------- Square_Lawfulness_33 路 2023-12-18 20:34 Is the vpn still active? ---------------------------------------------------------------------- Jirarchi 路 2023-12-18 20:35 What vpn? ---------------------------------------------------------------------- Square_Lawfulness_33 路 2023-12-18 20:36 Install both adguard and npm in containers and change or disable the ports that conflict. ---------------------------------------------------------------------- Square_Lawfulness_33 路 2023-12-18 20:39 Sorry, I confused macvlan with the vpn service mullvad, my stupid dyslexia. ---------------------------------------------------------------------- Jirarchi 路 2023-12-18 20:40 No blame in trying to help! ---------------------------------------------------------------------- Square_Lawfulness_33 路 2023-12-18 20:43 Run (docker system prune -a) which will remove any unused lingering network configurations. Also, look up the code before running it. ---------------------------------------------------------------------- Jirarchi 路 2023-12-18 21:08 >docker system prune -a It's still giving me 502 Bad Gateway when I try to use docker container's hostname :( ---------------------------------------------------------------------- Square_Lawfulness_33 路 2023-12-18 21:11 This is above my expertise but check your computer鈥檚 network settings (ip a) and see if something was added by docker that shouldn鈥檛 be there or isn鈥檛 needed. If you find something look up how to remove it with a command line program. ---------------------------------------------------------------------- Jirarchi 路 2023-12-18 21:13 Thank you! Yes, I had already checked this and it shows a bunch of virtual interfaces but I honestly have no idea if they're there for a legit reason or they're the reason of my pain. I'll try looking up some more. Thanks again :) ---------------------------------------------------------------------- Jirarchi 路 2023-12-18 21:38 UPDATE: After stopping every container, removing every network and veth it started working again. It's weird because that's literally what docker system prune -a does but it didn't work initially. ---------------------------------------------------------------------- dg8a 路 2023-12-19 15:48 Hi, I'm very interested in your set-up, as I tried to something similar, but using pi-hole instead, plus wireguard with no luck. Could you please share your network configuration? ---------------------------------------------------------------------- Jirarchi 路 2023-12-29 11:17 Hello! Sorry for the super-late reply, I don't really understand what interests you the most, but you can DM me and I'll try to help you at my best (now I managed to make AdGuard work on a macvlan).