On Mon, Jun 24, 2019 at 08:47:38AM +0000, slackwaree wrote: > Hello, > > > Could you maybe provide a full case study for this as it is fairly > uncommon task? > > Do you mean that I will also need +2 ip aliases next to the boxes main ip?
No. You can use either option. The question is how are the proxy users talking to those 3 different proxies? If you want to use port 8080 for all of them you want 3 different IPs. > Eg instead of > 192.168.10.1: 3128 3129 3130 > > 192.168.10.1:3128 using gateway 192.168.10.250 > 192.168.10.2:3128 using gateway 192.168.10.251 > 192.168.10.3:3128 using gateway 192.168.10.252 > Try it out yourself. Create an extra table and run a proxy in it. Use tools like tcpdump, nc, etc to check if it works. Start with: route -T1 add default 192.168.10.250 route -T1 exec "squid command to run ideal with debugging on" -- :wq Claudio > ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ > On Friday, June 21, 2019 8:27 PM, Brian Brombacher > <brian.brombac...@planetunix.net> wrote: > > > You’ll also need PF rules to allow incoming traffic from your squid clients > > to go to the routing table where your squid process is running. > > > > > On Jun 21, 2019, at 10:28 AM, Claudio Jeker cje...@diehard.n-r-g.com > > > wrote: > > > > > > > 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