Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

please see the network map:

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:)

share

migration rejected from stackoverflow.com Mar 9 at 5:28

This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as off-topic by Jenny D, Ward, MadHatter, mdpc, fukawi2 Mar 9 at 5:28

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions should demonstrate reasonable business information technology management practices. Questions that relate to unsupported hardware or software platforms or unmaintained environments may not be suitable for Server Fault - see the help center." – Jenny D, Ward, MadHatter, mdpc
If this question can be reworded to fit the rules in the help center, please edit the question.

    
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

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
    
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

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