X
X
xsash2016-02-04 08:41:53
Debian
xsash, 2016-02-04 08:41:53

How to open specific sites from the user through certain proxies and certain interfaces (debian, squid)?

The issue of replacing the current Internet gateway was raised and was formed by the joint efforts of the TK, where there is a task to redirect user traffic through different proxies and different providers, depending on which resource is trying to open.
While everything is in theory, I collect information, I search / read, because in this case it’s very green.
So, let's say we have three network
LAN0 (looks at LAN 192.168.1.*)
WAN0 (first provider, our ip 11.0.0.2)
WAN1 (second provider, our ip 22.0.0.2)
WAN0 - normal broadband Internet, which will be conditionally main. There we will cut all sorts of porn, toys, social networks during working hours)
WAN1 - "Internet from the institute", inst acts as a provider, it has "proxy.edu.ru:3128".
When we work without a proxy, we are seen by ip 22.0.0.2, if through their proxy - as 22.0.0.7
Proxy "proxy.edu.ru:3128" is available only from the WAN1 provider's network.
Part of the access of scientific resources / journals is tied to ip 22.0.0.2, part to 22.0.0.7
Therefore, the logical scheme, for me, looks like this

если запрашиваемый домен входит в массив1
  {
    направляем трафик через WAN1 + proxy
  }
иначе_если запрашиваемый домен входит в массив2
  {
    направляем трафик через WAN1
  }
иначе
  {
    направляем трафик через WAN0
  }

Now there is only an institute provider, so it is organized tritely through the browser - turn the proxy on / off. But this is not our method!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Dubrovin, 2016-02-04
@z3apa3a

The problem can be solved in two ways, see for yourself which one is more convenient.
1. Install an intermediate proxy that will provide the necessary exit scheme. Use one proxy on all clients. I can help with 3proxy configuration.
2. Use WPAD (Proxy Auto-Configuration Protocol) and static routing on each machine for channel selection. Routing can be controlled using the DHCP static route option, or you can implement the desired network routing scheme on the router. WPAD allows you to use a script to determine the proxy, it is supported by all major browsers.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question