I want to setup VPN server and route (based on my routing algorithm) all traffic through different proxy servers. Let's say I have one host, with many users, connected to my VPN. I want to route all traffic from/to user1@myhost through proxy1, user2@myhost via proxy2 and so on.

That's how it should look like:

main host (user1, user2) <--VPN--> proxy server <--proxies (proxy1 for user1, ect)--> internet

The goal is to give each main host user different IP address.

  • So you want a per user routing table? – SailorCire Dec 6 '14 at 17:04
  • I think so @SailorCire! I have already setup openvpn on my "proxy server" successfully, so now I'm able to establish connection from main host to the internet via "proxy server" IP. Now, I want to setup , as you mentioned, "per user routing table" on my "proxy (openvpn) server" to use different actual proxy address per user (per openvpn user) – mic22 Dec 6 '14 at 19:51

Two main ways to do it.

  1. Setup the proxy server on each user's computer (so, when they go through the VPN, then use the proxy they configured).
  2. Setup openvpn to attribute static IPs to each user. All you have to do then is to setup per-IP routing rules. NB: is the proxy supports it, this can be done with iptables in the same way as a transparent proxy.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.