LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-10-2012, 03:08 PM   #1
bakke
LQ Newbie
 
Registered: Sep 2012
Location: Sweden
Distribution: Ubuntu
Posts: 1

Rep: Reputation: Disabled
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
 
Old 09-11-2012, 08:26 AM   #2
ewtoombs
LQ Newbie
 
Registered: Sep 2012
Posts: 5

Rep: Reputation: Disabled
I've never heard of using different gateways depending on the bound address. I guess it is possible, but the only way I know of of using two gateways at once is for balancing two internet connections. If there is a way of doing it, it might be in the ip-route manpage. Maybe some extra tools are required. I don't know. But it seems possible. Two gateways on a lan is simple, though. Each client just selects whatever gateway it needs. You could even do that without two seperate subnets.

Last edited by ewtoombs; 09-11-2012 at 08:28 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
2 gateways and 1 proxy server piforever Fedora 0 08-19-2007 10:58 AM
how config proxy to serve two subnets timdog28 Linux - Server 1 02-14-2007 12:41 PM
Proxy with two gateways. Possible? cowuser Linux - Networking 1 03-03-2006 08:58 AM
Web Proxy can't ping subnets - SuSE 9.0 kmack1023 Linux - Networking 8 08-10-2005 01:46 PM
Debian proxy server: can't access shares across gateways Mr. Phukkitt Linux - Networking 0 01-21-2004 01:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration