Question regarding 2 gateways one proxy and two subnets ?
Hello,
First post and a rather difficult question.
I've tried to solve this my self but I haven't found a solution to this so perhaps some one here might have an idea.
I can't upload my nice network picture so I'll have to describe it.
Scenario:
* 1 wan(internet)
* 1 lan(same wire for both subnets, for now)
* 2 gateways with different(ip) access towards internet.
- 192.168.0.1, dhcp server for lan 192.168.0.x, knows 192.168.1.1 via route add
- 192.168.1.1, is a vpn client and knows 192.168.0.1 via route add. (no dhcp only static ips)
* 1 linux server with two virtual interfaces 192.168.1.4 and 192.168.0.4.
Running a http proxy server apache2..
What I want to happen:
* Any client that is member of the 192.168.1.x network to use the vpn client gateway as default gateway. Using 192.168.0.1 should use the normal gw. Which I think should work out of the box. I haven't tried this yet because the next point is the one I want to get to work.
* The server to be able to do both, access vpn or access the normal gateway depending on how you bind programs to which interface.. Sending/receiving on 192.168.1.4 should use the vpn gateway. If not binding to any interface we should use the normal gw.
* And/or to use http proxy to use the vpn gateway and the rest of the traffic to use the normal gateway.
I've tried to solve this in several ways but I think the way forward trying to add routes on the server... But the result is that I seem to send a HTTP get and I get no answer. Specially if I use squid3 with a forced from ip.
So any ideas on how to proceed ?
iptables or something else ?
Thanks in advanced!
/Bakke
|