[geeks] virtual machine routing
Charles Shannon Hendrix
shannon at widomaker.com
Tue Oct 4 07:55:30 CDT 2016
Hopefully there are some Unraid users here, or at least some good Linux
routing GURUsb&
Its been awhile since I did a lot of routing work, so forgive my clumsiness
in
explaining what I want to do here.
I have two main servers: UNRAID and QNAP.
Originally the QNAP was to replace the Unraid, but I find it too useful and
capable to get rid of. The QNAP has hardware accelerated media, so its great
for actually serving music and video, but I like Unraid for actually running
most of the virtual machines.
The QNAP is running a VPN client, which connects via
privateinternetaccess.com <http://privateinternetaccess.com/>. However, I do
NOT have it set up as my LANs default
gateway. Its slower, and some services have to originate where I really am.
Of course, its relatively easy to point any given machine to the QNAP if I
want its traffic encrypted, just make it the default gateway instead of the
main router. The QNAP also has a fancy virtual interface configuration tool
which supposedly lets you do a lot of creative routing for your VMs and
containers.
I tend to be conservative with the QNAP so its performance is dedicated to
media serving and backup, so the UNRAID server is my playground and heavy
lifter.
By default, UNRAID creates virtbr0, assigned to another private LAN
(192.168.100/24), which is then routed through the hosts br0 interface and
the
main gateway. Works great. Port forwarding gives my LAN access to virtualized
services.
However, now I want to make some services that use the VPN gateway.
Since by default, UNRAID puts new VMs on virtbr0 which is routed through the
main gateway, I created a new one called virtbr1, with a new private LAN.
That also works great.
With that in place and tested, I figured it should be easy to have any hosts
on virtbr1 use my QNAP as the default gateway, but so far this seemingly
simple task has eluded me.
Unraid is mostly Linux, so it has all the routing tools, and I have the
secondary bprivateb virtual bridge set up so it is persistent now. Like I
said, it works great, it just isnbt going via the gateway I want it to.
I understand that by default Linux is going to route virtual machines through
its own main gateway, I just want those hosted on virtbr1 to go through an
alternate.
Ibll try to diagram things a bit:
More information about the geeks
mailing list