VPS - DOCKER - Use an Container with VPN as Gateway for other Container - iptables - add routes
Budget: €8 – €30 EUR
THE PROJECT:
Hello. I have an vps with docker, portainer, nginx installed.
THE PROJECT IS SUSSEEDED IF WE HAVE:
1. AN DOCKER CONTAINER AS WIREGUARD GATEWAY (Mullvad VPN Installed)
2. AN DOCKER CONTAINER AS WIREGUARD SERVER ROUTED VIA WIREGUARD GATEWAY (where i can connect to)
- clients should not connect to each other
- all container on same network, routung via iptables
################################################################################################################################
Here is the Tutorial:
https://www.linuxserver.io/blog/routing-docker-host-and-container-traffic-through-wireguard
(from passage "Routing a container's traffic through the WireGuard container via routing table")
################################################################################################################################
Detail:
I have tested all, but i think there is a little iptable rule which just forgot. I installed the container incl. nxinx on same docker network interface "vpnnet". I use a VPN Mullvad subscription with docker container, and it is working flawlessly, container configuration is ok and tested. i just cant get routed the other container throug this vpn container into inet.
#######################################################################
WHAT YOU WILL FIND WHEN LOG IN
------------------------------------------------------------
- You get login to my windows pc via teamviewer or ruskdesk
- ssh logged in as root into vps
- portainer opened in firefox
- nxginx opened in firefox
-----------------------------------------------------------
system:
- debian
- preinstalled docker, portainer, nginx
- preinstalled network interface "wgnet"
- preinstalled container: linuxserver/wireguard (clientmode - works - connected to mullvad - public ip: Mullvad IP)
- preinstalled container: easy-wg (wireguard server - woks, clients can connect : public ip: vps ip)
Just login, ad the routes and finish. 5 minutes for pros. hope someone can help me out.
Hello. I have an vps with docker, portainer, nginx installed.
THE PROJECT IS SUSSEEDED IF WE HAVE:
1. AN DOCKER CONTAINER AS WIREGUARD GATEWAY (Mullvad VPN Installed)
2. AN DOCKER CONTAINER AS WIREGUARD SERVER ROUTED VIA WIREGUARD GATEWAY (where i can connect to)
- clients should not connect to each other
- all container on same network, routung via iptables
################################################################################################################################
Here is the Tutorial:
https://www.linuxserver.io/blog/routing-docker-host-and-container-traffic-through-wireguard
(from passage "Routing a container's traffic through the WireGuard container via routing table")
################################################################################################################################
Detail:
I have tested all, but i think there is a little iptable rule which just forgot. I installed the container incl. nxinx on same docker network interface "vpnnet". I use a VPN Mullvad subscription with docker container, and it is working flawlessly, container configuration is ok and tested. i just cant get routed the other container throug this vpn container into inet.
#######################################################################
WHAT YOU WILL FIND WHEN LOG IN
------------------------------------------------------------
- You get login to my windows pc via teamviewer or ruskdesk
- ssh logged in as root into vps
- portainer opened in firefox
- nxginx opened in firefox
-----------------------------------------------------------
system:
- debian
- preinstalled docker, portainer, nginx
- preinstalled network interface "wgnet"
- preinstalled container: linuxserver/wireguard (clientmode - works - connected to mullvad - public ip: Mullvad IP)
- preinstalled container: easy-wg (wireguard server - woks, clients can connect : public ip: vps ip)
Just login, ad the routes and finish. 5 minutes for pros. hope someone can help me out.