If the applications you intend to use do not support binding to the / ip interfaces (true, this is unusual), you can use the SOCKS or Proxy software (which is much more common, especially in browsers).
For example, you can install WinGate or Squid http://www.squid-cache.org (this is the one I know the most).
Squid-Cache has the ability to bind to various outgoing addresses based on rules ( http://www.squid-cache.org/Doc/config/tcp_outgoing_address/ ).
Basically you need to do the following:
- install squid
- add ACLs for IP loopback conversion, for example:
acl IP110 src 127.0.0.1/32 acl IP111 src 127.0.0.2/32 [...] tcp_outgoing_address 104.251.111.110 IP110 tcp_outgoing_address 104.251.111.111 IP111 [...]
- And by default, which is just formally necessary:
tcp_outgoing_address 104.251.111.110
Then, each application must be configured using a proxy (or SOCKS, if you do so), which is the most affordable configuration option. On the proxy settings, set the appropriate local IP:
- for outgoing connection using IP.111, use the proxy server at 127.0.0.2
- for outgoing connection using IP.110, use the proxy server at 127.0.0.1
- .. etc.
Make sure that Squid (or WinGate) is bound to localhost 127.0.0.1/24, so you should not have serious security issues, but if it is available on the Internet, you can continue the security check.
Thus, if you decide to disconnect any application remotely, to another server, you can still use the same outgoing IP addresses, you just need to change the squid configuration to allow an external connection, which can be a big plus for scaling .
source share