I'm planning to switch from a Windows VM to using containers for my applications. Right now, I have a Windows VM with two virtual NICs managed under IPs 192.168.1.250 and 192.168.251. My home router (192.168.1.1) is set up to route traffic from 192.168.1.251 through a dedicated VPN interface. I'm unclear on how to configure my Ubiquiti Gateway Max to route traffic from the containers since they are given private IPs that use NAT. Is there a way to assign a specific IP, like 192.168.1.251, to a container to achieve the same routing as my VM setup?
2 Answers
I've been using gluetun, and it's been great for routing container traffic through a VPN. If you're looking for a user-friendly solution, you might want to check it out! It handles the VPN connection and simplifies the setup for you.
Using Docker Compose along with MACVLAN or IPVLAN can make managing your network settings much easier. By defining them in a configuration file, you can assign fixed IPs directly from your home network to each container, making routing through your VPN a breeze.
Related Questions
How To Get Your Domain Unblocked From Facebook
How To Find A String In a Directory of Files Using Linux