Set up rules for proxies to use only for certain destinations (possibly via iptables)
Hi
I have a small problem that I am currently solving by using multiple configuration files for proxychains, but it is somewhat tedious and I would like to have et simplified a bit
The problem is, I have multiple servers for clients that I have to connect to, but each client have their own SOCKS5 Proxy that I need to go through in order to connect to their network (the proxies allow anonymous access) - I would like somehow to set up rules on machine somewhat like:
- Any outbound traffic to host-1 is routed through SOCKS5 proxy-1
- Any outbound traffic to host-2 is routed through SOCKS5 proxy-2
- Any outbound traffic to host-3 is routed through SOCKS5 proxy-3
- All other traffic - no rules
Is that possible, fx. via IPTables ?
I realize many many posts have been made and many articles written about IPTables, but I have not been able to find any that can solve my problem, so if you know of a post that could it would be helpful - or maybe you know how to solve this :-)..
I have two bonus questions, which are not essential
1: Would it be possible to set up two rules for 1 destination (two proxies) and set it to randomly use one over the other ? for example: "Any outbound traffic to host-4 is either routed through SOCKS5 proxy-4 or SOCKS5 proxy-4x"
2: Would it be possible to route traffic through multiple proxies with IPTables ? For example "Any outbound traffic to host-4 is routed through SOCKS5 proxy-4 AND SOCKS5 proxy-4x"
Thanks in advance
Last edited by swulff; 04-09-2014 at 06:22 AM.
|