Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Differeng gateways with different ports...

Status
Not open for further replies.

Nordlund

Programmer
Jul 17, 2001
458
SE
Hi there.
If my net has to gateways, for example: 192.168.21.254 and 192.168.21.1.

I want to use the .254 gateway when surfing (Port 80, 443)
and I want to use .1 gateway when using Ftp (Port 20,21).

Is this possible without using stateful firewalls....

The best way would be to install some kind of application om my client machine...




-----------------------------------------------------
-"There is always a different way to solve it"

//Nordlund
 
You can't do that. Your machine will use the gateway with the lower metric, unless it can't reach that gateway, then it will try the other gateway.
 
I think it is likely your Broadcast address for your network segment as well.
 
No way at all?

Darnit! as they say... :)


-----------------------------------------------------
-"There is always a different way to solve it"

//Nordlund
 
You could setup a script that changes the metric on the default address then run the script before launching whatever application you want to use with whatever gateway. Its a bit manual, but it would work for you.

What is the reason you want to use different gateways for different ports? Perhaps if you explained what you are trying to accomplish we could help you with a better solution.
 
I want to surf the net on one connection, and do datatransfer between my work and home on the other connection.

A simple way of network balancing...



-----------------------------------------------------
-"There is always a different way to solve it"

//Nordlund
 
If you only want to access your work IP using one interface you can add a static route (use the 'route add -p' command to make it persisten across boots of the system) which should do what you want.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top