computer A(192.168.1.134) needs to establish a UDP connection to computer C(192.168.0.30).

As you can see both are on a different subnetwork. Now I have computer B which has 2 IP addresses, one for each subnetwork (192.168.1.135 and 192.168.0.37). A can ping B and B can C but A cant ping C. How can I use computer B to establish the connection between A and B. Remember that computer A needs to connect with a program I made so I cant do any command line stuff. Would port forwarding work? How would I do this?

Im thinking of doing SSH -L 10002:192.168.0.30:10002 192.168.1.135 but then even if this works will I still have create another forwarding so that communication will go both ways?

link|improve this question

67% accept rate
There's probably a mistake in your question, since both computers A and C are on network 192.168.1.0/24 – Raphink Dec 23 '09 at 18:26
your right my bad that was a typo – user16654 Dec 23 '09 at 18:32
Which O/S are A/B/C? – harrymc Dec 23 '09 at 18:48
A= windows B=Ubuntu C= no OS its an embedded device without any OS – user16654 Dec 23 '09 at 18:50
feedback

1 Answer

i think you just have to enable packet forwarding on computer B. For example on Ubuntu that is done by running:

echo 1 > /proc/sys/net/ipv4/ip_forward

Now the computer can take packets received on one interface and send them out on another interface.

Edit: On Ubuntu that doesn't work with sudo, I had to use "sudo su" and then run the above as root.

link|improve this answer
thx i'll give it as try – user16654 Dec 23 '09 at 18:51
there is only one interface though – user16654 Dec 23 '09 at 19:05
can you post the outputs of "ifconfig" and "route", please? – Nick Dec 23 '09 at 19:12
Check A's "route" as well. Does it have a route (host, network or default) for a packet bound for C (192.168.0.30)? And does C by default forward everything to B? – shank Dec 23 '09 at 20:18
feedback

Your Answer

 
or
required, but never shown

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