Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

please see the network map from http://i.stack.imgur.com/HqT7h.jpg

a busy cat

I want to connect to network3 from network1 but i want to connect by network2!

I have a PC which has Ubuntu 11.04 and it can connect to network3 by network2.

I have a client on network1 with default gateway=192.168.76.5(eth0 on PC).

so if the client want to connect to network 3,pc should route the traffic to network 2!

i want a help for configuring the PC:)

Thanks:)

share|improve this question

migrated from stackoverflow.com Oct 15 '11 at 22:12

This question came from our site for professional and enthusiast programmers.

    
I am not sure what you mean. Do you mean that the PC is the client or is the client within the network1 circle? Do you want the PC to get to network3 within both interfaces? –  Rilindo Oct 15 '11 at 22:47
    
Your drawing is incomplete. –  MDMarra Oct 16 '11 at 12:18
    
No!! I want to connect from network1 to network3 by PC and network2 –  Ali Oct 16 '11 at 14:51
    
You don't show how anything is connected to network 3, first of all. You also are a little unclear about exactly what traffic you want routed to network 2. –  MDMarra Oct 16 '11 at 16:29

2 Answers 2

You can either

1) Add a static route on your workstation that tells everything with a destination of 192.168.1.0/24 to use 192.168.51.5 as the gateway.

2) Make this route on your router. This will cause everyone's traffic to behave this way. It's unclear if you want this behavior for just your workstation or for everyone.

share|improve this answer
    
I think 192.168.51.5 is an IP on a different interface, not the gateway. –  Rilindo Oct 15 '11 at 22:49
    
@Rilindo He says I have a client on network1 with default gateway=192.168.76.5(eth0 on PC). So I assume that it actually is a gateway. –  MDMarra Oct 15 '11 at 22:51
    
adding a static route is probly best the only other way would be to reverse proxy it so it automatically sends it. the static route will be faster. –  WojonsTech Oct 16 '11 at 6:36
    
my problem was routing all packet from interface 192.168.76.5 to interface 192.168.51.5 –  Ali Oct 16 '11 at 14:47
up vote 0 down vote accepted

Since packets with destination 192.168.76.x from network3 route to network1 directly, we can't use another gateway to route all traffic!!! the only way to force IP packets routing to network2 is NAT! the Computer with 2 interface should do NAT, and IP forwarding is not enough.

Thanks for all of answers.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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