LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-23-2010, 09:44 AM   #1
Atwin
Member
 
Registered: Apr 2004
Distribution: FreeBSD 8.0 & Fedora 12
Posts: 50

Rep: Reputation: 15
Remote Network Monitoring


Hello All,

I am trying to implement a Network monitoring system so that I can monitor my home servers from anywhere in the world. I am currently studying Nagios and I have successfully implemented it to monitor my two servers and clients on my LAN.

Now, what I want to do is be able to set up the monitoring server to check for devices at my parent's place. Nagios relies a lot on ping messages (I'm just getting started). How can I set it up to monitor devices in my parent's home network when I do not know the IP addresses on that end? The IPs are supplied by the gateway router through DHCP.

I don't mind using any other tools. I just want to get some ideas of how I can do it. I have checked Zabbix, OpenNMS and pfSense but really don't know which could help accomplish the task.

Any ideas and help is most welcomed,

Cheers and thanks,

Atwin.


P.S. Attached is a simplified illustration of how the network is.

http://i82.photobucket.com/albums/j2...nix/netmag.jpg
 
Old 03-23-2010, 10:18 AM   #2
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 167Reputation: 167
Well you could setup static ips for them and a dyndns service. You could also have one of them initiate a reverse ssh tunnel or a vpn connection to the foreign network you're monitoring from.
 
Old 03-23-2010, 10:40 AM   #3
Atwin
Member
 
Registered: Apr 2004
Distribution: FreeBSD 8.0 & Fedora 12
Posts: 50

Original Poster
Rep: Reputation: 15
Thanks for the reply rweaver. A dyndns service will not really work since it will report the gateway's WAN address (tried that with dyndns.org). I need to be able to access the individual servers/clients behind the NAT/Firewall. Any tutorials on how I could set the VPN tunnel?
 
Old 03-23-2010, 11:02 AM   #4
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,278

Rep: Reputation: 148Reputation: 148
Quote:
when I do not know the IP addresses on that end?
Without knowing IP address, How to communicate with servers or network devices?

Last edited by kirukan; 03-23-2010 at 11:06 AM.
 
Old 03-23-2010, 11:08 AM   #5
Atwin
Member
 
Registered: Apr 2004
Distribution: FreeBSD 8.0 & Fedora 12
Posts: 50

Original Poster
Rep: Reputation: 15
Exactly. Apparently there is a way around this. That is what I am trying to find out.
 
Old 03-23-2010, 11:51 AM   #6
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 167Reputation: 167
Well with dyndns you could port forward from the router to a port behind the router on the actual hosts, it will report if the port is responding or not (snmp would be a good choice say 1161 and 1611 if there are two.)

router:1611->hosta:161
router:1161->hostb:161

Edit: And snmp provides a lot of good information on the machine.

Last edited by rweaver; 03-23-2010 at 12:03 PM.
 
Old 03-24-2010, 03:17 AM   #7
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by Atwin View Post
Exactly. Apparently there is a way around this. That is what I am trying to find out.
how about NSCA using send_nsca. With this, the clients actually send their status to the nagios server, so all that is needed here is the ip address of nagios server.

http://nagios.sourceforge.net/docs/1_0/addons.html#nsca
http://www.unix-tutorials.com/go.php?id=3929

Last edited by centosboy; 03-24-2010 at 03:19 AM.
 
Old 03-24-2010, 10:27 AM   #8
Atwin
Member
 
Registered: Apr 2004
Distribution: FreeBSD 8.0 & Fedora 12
Posts: 50

Original Poster
Rep: Reputation: 15
Thanks for all the help. Will check out these tools and report back. Cheers.
 
Old 03-24-2010, 10:41 PM   #9
kalpapathum
LQ Newbie
 
Registered: Jun 2009
Posts: 2

Rep: Reputation: 0
If u have a Public address of ur end but not with other end then u can setup a VPN connection between ur end and other end using vtun(http://vtun.sourceforge.net/) then use zenoss(www.zenoss.com) network monitoring system where u can enable monitoring traffic via vtun tunnel. this has tested and works smoothly.

Note: setup vtun tunnel as client-server then connect client to server and add routes if needed. then u should be able to access parent's location network from ur zenoss server or any other server in the network. same as from parent's location it should be able to access ur location's servers.
 
Old 03-24-2010, 10:50 PM   #10
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Quote:
Originally Posted by Atwin View Post
Now, what I want to do is be able to set up the monitoring server to check for devices at my parent's place. Nagios relies a lot on ping messages (I'm just getting started). How can I set it up to monitor devices in my parent's home network when I do not know the IP addresses on that end? The IPs are supplied by the gateway router through DHCP.
Can you ssh into the router? Or perhaps the router has an http(s) interface from which you could find out what IP addresses it has assigned.

Evo2.

Last edited by evo2; 03-24-2010 at 10:51 PM. Reason: typo
 
Old 03-29-2010, 04:41 AM   #11
Atwin
Member
 
Registered: Apr 2004
Distribution: FreeBSD 8.0 & Fedora 12
Posts: 50

Original Poster
Rep: Reputation: 15
No, I can't even ssh into the router since my ISP supplies Dynamic DHCP addresses, which changes every now and then and the modem is just an ADSL/USB modem so I can't modify it for dynamic dns.
 
Old 03-29-2010, 04:48 AM   #12
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Quote:
Originally Posted by Atwin View Post
No, I can't even ssh into the router since my ISP supplies Dynamic DHCP addresses, which changes every now and then and the modem is just an ADSL/USB modem so I can't modify it for dynamic dns.
If you do have a machine outside a firewall somewhere (lets call it "A"), you could set up one of the machines behind the routerto automatically start a reverse ssh tunnel (using a passphraseless ssh key) to host A. You could then ssh into that machine by sshing to the correct port on host A.

If you are running a sufficiently sophisticated firmware on the router (eg dd-wrt) you could even get the router itself to setup the tunnel.

I know that this is a fairly clunky way of doing it, but in principle it should work.

Evo2.

Last edited by evo2; 03-29-2010 at 04:51 AM.
 
Old 03-29-2010, 05:15 AM   #13
rizhun
Member
 
Registered: Jun 2005
Location: England
Distribution: Ubuntu, SLES, AIX
Posts: 268

Rep: Reputation: 47
I've done this very same thing before.

Here's how I did it:

NB. All hosts in my case were running Linux.
  1. Create an account on DynDNS.com
  2. Download one of the DynDNS update clients and schedule/cron it to run every hour & on-boot.
  3. Change your local computers to use static internal addresses.
  4. Forward ports from your router to port 22 for each local computer.

    Eg.
    Host_A (192.168.0.2 (static)) Router:51022 -> Local:22
    Host_B (192.169.0.3 (static)) Router:52022 -> Local:22
    Host_C (192.168.0.4 (static)) Router:53022 -> Local:22

Now, from anywhere in the world, if you wanted to connect to Host_B:
Code:
ssh -l username -p 52022 yourdyndns.dyndns.com
Or, Host_A:
Code:
ssh -l username -p 51022 yourdyndns.dyndns.com
When you connect, your router will know, from the port number, which machine it should send the traffic to.

Now you can use the Nagios 'check_by_ssh' to monitor these systems.

Hope this helps.

Last edited by rizhun; 03-29-2010 at 05:19 AM.
 
Old 03-29-2010, 05:23 AM   #14
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Quote:
Originally Posted by rizhun View Post
When you connect, your router will know, from the port number, which machine it should send the traffic to.
I think the problem is that the OP can't even get their router because it is behind a dumb modem (presumably provided by the ISP). This is why I suggested a reverse ssh tunnel to an external host the that OP has control over.

Evo2.
 
Old 03-31-2010, 06:10 AM   #15
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
See my previous post. Ncsa. Passive monitoring
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
remote desktop monitoring s/w ??? sulekha Ubuntu 1 10-16-2009 04:02 AM
network monitoring:unable to launch nagios network monitoring system oladapo1980 Linux - Newbie 0 07-21-2009 01:45 PM
Monitoring the remote Changes Made? your_shadow03 Linux - Newbie 1 09-12-2008 12:35 AM
Some form of remote monitoring Swakoo Linux - General 2 02-12-2006 04:06 AM
Remote monitoring software fechin Linux - Software 1 08-02-2005 03:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration