S
S
seropaski2016-07-03 14:17:11
Computer networks
seropaski, 2016-07-03 14:17:11

How to implement a proxy server with multiple output interfaces?

There is a physical machine. It has one input interface, for example, eth0. This interface is connected to the local network and has an address, for example 192.168.0.101. And there are 2 (two) output interfaces, such as ppp0 and ppp1, that look at the Internet.

It is necessary to implement the proxy function (socks) on this physical machine so that users of our local network can specify the address 192.168.0.101 and some port as a proxy in the browser and access the Internet. Depending on which port the user specifies, it will be determined through which interface (ppr0 or ppp1) he will access the Internet.


They are not even interested in a specific solution, but at least tips. How and with what help can this miracle be realized? We tried to install one of the socks servers, but the traffic refused to go to the output interface, and the connection in the browser was disconnected by timeout.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Dubrovin, 2016-07-03
@seropaski

In 3proxy
socks -i192.168.0.101 -pport_1 -eaddress_ppp0 interface
socks -i192.168.0.101 -pport_2 -eaddress_ppp1 interface

A
Armenian Radio, 2016-07-03
@gbg

You hang extra responsibility on the proxy, he should not be doing this. A proxy may not know anything at all about which paths packets follow it.
This must be done at the NAT level. To prevent HTTP and HTTPS clients from going crazy, the distribution rule should be like this - all connections from the same host on the internal network go through the same external connection. That is, roughly - even ip - ppp0, odd, ppp1
This is all done at the iptables level.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question