Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Check the connectivity from one host IP to another IP

 
Binesh Veetil
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I need to test the connectivity from a source IP to destination IP. The source IP is different from the server in which my application is running. Can you please help me understand how this can be done.
Thanks in Advance.
 
Henry Wong
author
Marshal
Pie
Posts: 20836
75
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Binesh Veetil wrote:
I need to test the connectivity from a source IP to destination IP. The source IP is different from the server in which my application is running. Can you please help me understand how this can be done.
Thanks in Advance.


The most reliable way to do this is to have a service on the source IP, that pings the destination IP, and reports the result to you. And even in this case, it is not guaranteed, as you can lose the connection to the source IP, while the connection between the source and destination IP is fine.

Henry
 
Binesh Veetil
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Henry Wong wrote:
Binesh Veetil wrote:
I need to test the connectivity from a source IP to destination IP. The source IP is different from the server in which my application is running. Can you please help me understand how this can be done.
Thanks in Advance.


The most reliable way to do this is to have a service on the source IP, that pings the destination IP, and reports the result to you. And even in this case, it is not guaranteed, as you can lose the connection to the source IP, while the connection between the source and destination IP is fine.

Henry


Is there a way to connect to source IP and do a telnet to destination IP and check for the connectivity? There is authentication required to login to source IP unix box which I need to bypass. I tried to use telnet java API, but all these prompts for username/pswd to login to source IP.
 
Jeff Verdegan
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Binesh Veetil wrote:
Is there a way to connect to source IP and do a telnet to destination IP and check for the connectivity?


IF the source is a public IP address, or is on your LAN, AND the source is running a service such as sshd or telnetd that lets remote users log on, AND you have an account on the source AND the destination is running a service you can connect to AND the destination has a public IP address or is on the same LAN as the destination, then, yes.

There is authentication required to login to source IP unix box which I need to bypass.


Er, no. If you can bypass it, it's pretty useless authentication, isn't it?

 
Jeff Verdegan
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Binesh Veetil wrote:Hi,

I need to test the connectivity from a source IP to destination IP.


Why? Even if there's connectivity now, that doesn't mean there will be when you try to connect "for real." When you're ready to connect, do so. If it succeeds, there's connectivity, and if it fails, there's no connectivity.

What are you actually trying to accomplish? That is, what is the purpose for doing this test?
 
Binesh Veetil
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeff Verdegan wrote:
Binesh Veetil wrote:Hi,

I need to test the connectivity from a source IP to destination IP.


Why? Even if there's connectivity now, that doesn't mean there will be when you try to connect "for real." When you're ready to connect, do so. If it succeeds, there's connectivity, and if it fails, there's no connectivity.

What are you actually trying to accomplish? That is, what is the purpose for doing this test?


Both the source and dest is in our LAN. I need to test the firewall between these. Both the source and dest are running ssh service(with authentication).
 
Paul Clapham
Sheriff
Pie
Posts: 20196
26
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Binesh Veetil wrote:Both the source and dest is in our LAN. I need to test the firewall between these. Both the source and dest are running ssh service(with authentication).


Normally you would do that by sitting down at "source", signing on, and doing the test. Once the test passes, then the firewall is okay. Having to produce an automated testing procedure would go much farther than simply testing the firewall. So I also ask you:

What are you actually trying to accomplish? That is, what is the purpose for doing this test?
 
Binesh Veetil
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:What are you actually trying to accomplish? That is, what is the purpose for doing this test?


we have n number of source and dest IPs for which we need to check if the firewall is opened or not, and we are planning to do it via an appl.
 
Jeff Verdegan
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Binesh Veetil wrote:
Paul Clapham wrote:What are you actually trying to accomplish? That is, what is the purpose for doing this test?


we have n number of source and dest IPs for which we need to check if the firewall is opened or not, and we are planning to do it via an appl.


Okay, so you have suggestions on how to do what you want, so you should be all set now.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic