On Fri, Jun 21, 2019 at 02:11:53PM +0000, slackwaree wrote:
> Hello,
>
> I wonder if the following scenario can be solved with OpenBSD on 1 single machine or with VMM:
>
> I got 3 OpenBSD vms, all of them are exactly the same running squid except they use different default routers to route their traffic out.
>
> I would like to merge these to one VM if it is possible somehow to tell OpenBSD to use different gateway depending on the squid process.
>
> If not would the same thing be possible with VMMs? All the gateways are in the same IP range.
>
A simple way to solve this is with multiple routing tables.
Create multiple routing tables with:
route -T1 add default <gw1>
route -T2 add default <gw2>
route -T3 add default <gw3>
And start the 3 squid processes with route -T1 exec, route -T2 exec.
You can also use the the *_rtable variable in rc.d(8) to do that
automatically.
This requires that the 3 squids listen on different IPs or ports.
--
:wq Claudio
No comments:
Post a Comment