1

The situation is like this: I have three machines A , B , C . A is my laptop installed MACOS, B is a remote server installed redhat and can access to the Internet, C is another server installed redhat and connected to B directly with a Cable . So B and C are in one group , C has an internal ip address 192.168.222.2 and lampp is intalled on it. I can first ssh on B , then I can ssh on C via B. Now I want to brower web application installed on C on my local machine. But I can even not ping C successfully because A and C are not connected.

Any suggesions or ideas ? Thanks !!

xuqin1019
  • 202
  • 3
  • 12

2 Answers2

1

How about executing the following command on A,

$ ssh -L 8080:C:80 user@B

and then accessing the following web page,

http://127.0.0.1:8080/index.php
ymnk
  • 1,145
  • 7
  • 7
  • Thank you for your answer , But It still not work. When I accessing the web page , It turns out the error in terminor like that : " channel 3: open failed: connect failed: No route to host ". Could you please explain what the command means , Thanks a lot . – xuqin1019 Mar 09 '12 at 07:42
  • 1
    So, how about following command on host A, $ ssh -L 8080:127.0.0.1:8080 user@B and then executing the following on host B $ ssh -L 8080:127.0.0.1:80 user@C – ymnk Mar 09 '12 at 08:24
0

If all of the machines are connected to the same local network, Example: If you have a ISP with a dynamic IP address and all these machines are connected to a router that's providing your local address then you should be able to connect with the other devices without a problem. This is all pending what firewall/iptable settings (if any) you have changed on the web server (C).

What is happening exactly when you try to ping 'C' from 'A', is it showing packet loss or no response from 'C' at all?

If you could better explain how your local network is set-up and configured, if necessary post the error or any config files directly associated with how you have the network configured.

What happens if you attempt to access the web server by pointing your browser to

http://192.168.222.2/index.php or http://192.168.222.2/

ityler22
  • 372
  • 2
  • 3
  • 15
  • Thanks for your post !! I am quit sure 'A' and 'C' are not in the same local network , so when I try to ping 'C' from 'A' , It's showing packet loss. the ip address of my labtop is '10.10.2.223'. And B is '202.122.32.156' . Someone suggest I can use ssh tunnel to do that . But I just don't know what to do. – xuqin1019 Mar 09 '12 at 06:06