Route to 2 gateways

Use this forum to post questions relating to WinGate, feature requests, technical or configuration problems

Moderator: Qbik Staff

Route to 2 gateways

Postby slumley » Nov 17 04 7:12 am

Can Wingate route traffic to more that one gateway?

I want to route all traffic via wingate to a cascade proxy server except traffic starting with IP adress starting with 196.*.*.*

Can anyone please help me and explain how to do this.

Thanks for you help in advance.
slumley
 
Posts: 13
Joined: Nov 17 04 6:52 am

Postby genie » Nov 17 04 9:56 am

Yes, you can do that - if you add a system route to 196. range through another gateway (see route add).
genie
Qbik Staff
 
Posts: 1788
Joined: Sep 30 03 10:29 am

Route to 2 gateways

Postby slumley » Nov 18 04 3:18 am

Sorry to ask, but can you please explain how to do this.

Still not sure what to do?

Thanks
slumley
 
Posts: 13
Joined: Nov 17 04 6:52 am

Postby genie » Nov 18 04 11:29 am

Hi,

Sorry I did not read your initial message carefully - does your client use Wingate as a proxy server?
genie
Qbik Staff
 
Posts: 1788
Joined: Sep 30 03 10:29 am

Postby genie » Nov 18 04 11:54 am

Right. If your client uses proxy server to connect, then you can simply specify non-proxy address 196.*.*.* in the browser's proxy settings. Then the client will use proxy for everything except for this particular address which will be connected to directly.
genie
Qbik Staff
 
Posts: 1788
Joined: Sep 30 03 10:29 am

Postby genie » Nov 18 04 10:37 pm

There might be a way around your problem. Check out this:
http://forums.qbik.com/viewtopic.php?p=14027#14027

If you set two proxies in wingate you can change the actual proxy depending on the destination url.
genie
Qbik Staff
 
Posts: 1788
Joined: Sep 30 03 10:29 am

Postby slumley » Nov 19 04 1:07 am

I have tried to get IE to do this but it ignores IP adresses with stars (*). Try it yourself, you will see that it does not work.

IE will only work with a name or a complete IP adress, not 196.*........

Is there not some where in wingate that i can do this?

Why do I want to do this you ask?

OK, I have two PC's with two DSL accounts.

PC-1 (192.168.0.1)
PC-2 (192.168.0.2)

PC-1 must direct (use) only local traffic (196.*.*.*)
All other traffic must be routed to PC-2. (any other wib site (IP adress)
slumley
 
Posts: 13
Joined: Nov 17 04 6:52 am

Postby genie » Nov 19 04 9:05 am

You can use this function:
isInNet(host, "196.0.0.0", "255.0.0.0")
genie
Qbik Staff
 
Posts: 1788
Joined: Sep 30 03 10:29 am

Postby slumley » Nov 19 04 9:11 am

That's nice, Thanks, But what do i do with that?

Where do i enter it?
slumley
 
Posts: 13
Joined: Nov 17 04 6:52 am

Postby genie » Nov 19 04 9:18 am

function FindProxyForURL(url, host)
{
if (isInNet(host, "196.0.0.0", "255.0.0.0"))
return "DIRECT";
else
return "PROXY w3proxy.netscape.com:8080; DIRECT";
}
genie
Qbik Staff
 
Posts: 1788
Joined: Sep 30 03 10:29 am

Postby slumley » Nov 19 04 9:42 am

Many Many thanks for the help, i have created the pac file and thing appear to be working.

Will do more tests and let you know.

I have used the following:

function FindProxyForURL(url, host)
{
if (isInNet(host, "196.0.0.0", "255.0.0.0"))
return "DIRECT";
else
return "PROXY 192.168.0.2:81; DIRECT";
}


You can confirm if ti looks correct.

Thanks again.
slumley
 
Posts: 13
Joined: Nov 17 04 6:52 am

Postby genie » Nov 19 04 9:43 am

Aye, should be fine.
genie
Qbik Staff
 
Posts: 1788
Joined: Sep 30 03 10:29 am

Postby slumley » Nov 19 04 9:59 am

Hi again,

One more twist, what it i want to add a proxy to the local traffic option, the 196.* traffic?

Would it be something like:

function FindProxyForURL(url, host)
{
if (isInNet(host, "196.0.0.0", "255.0.0.0"))
return PROXY 192.168.0.1:80; DIRECT";
else
return "PROXY 192.168.0.2:81; DIRECT";
}


192.168.0.1 : 80 is a proxy on the other PC.
slumley
 
Posts: 13
Joined: Nov 17 04 6:52 am

Postby genie » Nov 19 04 10:00 am

Yeap. And you can add other proxies depending on the destination address.
genie
Qbik Staff
 
Posts: 1788
Joined: Sep 30 03 10:29 am

Postby slumley » Nov 19 04 10:06 am

Thanks very much for the help.

Cheers from South Africa.
slumley
 
Posts: 13
Joined: Nov 17 04 6:52 am

Postby genie » Nov 19 04 10:42 am

Dit is my plesier. Waar is jy in Suid Afrika?
genie
Qbik Staff
 
Posts: 1788
Joined: Sep 30 03 10:29 am

Postby slumley » Nov 19 04 10:48 am

Cape Town.
slumley
 
Posts: 13
Joined: Nov 17 04 6:52 am

Route to 2 gateways

Postby slumley » Nov 24 04 7:51 am

Hi again,

I have one more question?

Below is the exact script that i am using, but i was wondering if i could also route the local traffic via a proxy server (proxy is 192.168.0.1:81)


function FindProxyForURL(url, host)
{
if (isInNet(host, "196.0.0.0", "255.0.0.0")) return "DIRECT";
if (shExpMatch(url, "https://netbank.nedsecure.co.za*")) return "DIRECT";
else
return "PROXY 192.168.0.2:81; DIRECT";
}


Thanks
slumley
 
Posts: 13
Joined: Nov 17 04 6:52 am

Postby genie » Nov 24 04 8:58 am

You sure can - whatever the information you process all you need to do is to return either DIRECT or PROXY reply.
genie
Qbik Staff
 
Posts: 1788
Joined: Sep 30 03 10:29 am

Postby slumley » Nov 24 04 9:05 am

I have tried it but i can not get it to work, could you not show me in my script? Please
slumley
 
Posts: 13
Joined: Nov 17 04 6:52 am

Postby genie » Nov 24 04 9:06 am

Hold on a second - what is your browser setting with regards to the local traffic?
genie
Qbik Staff
 
Posts: 1788
Joined: Sep 30 03 10:29 am

Postby slumley » Nov 24 04 9:23 am

I am only using the script, no other settings.
slumley
 
Posts: 13
Joined: Nov 17 04 6:52 am

Postby genie » Nov 24 04 2:22 pm

Erm... Try adding the line:

if (isInNet(host, "192.168.0.0", "255.255.0.0")) return "PROXY 192.168.0.2:81;";
genie
Qbik Staff
 
Posts: 1788
Joined: Sep 30 03 10:29 am


Return to WinGate

Who is online

Users browsing this forum: No registered users and 11 guests

cron