LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-02-2010, 06:22 AM   #1
nagman
LQ Newbie
 
Registered: Jun 2010
Posts: 8

Rep: Reputation: 0
Nagios-Nagvis-Nconf -> Only access to web / commandline from 1 PC


Hi!

I am a complete knobhead when it comes to Linux. Apart from that, my job has tasked me with setting up one Nagios-installation. How nice of them.

But I kind of like it :-)

So I installed an Iso I found online (nnortux.no) complete with Nagios, Nagvis and Nconf.

But from some strange reason I can't comprehend ( I turned of Firewall), I can only log in to the Nagios installation from my personal PC (Both web and command line) and from the VM-ware...

Noone else have access.

Anyone have any ideas on how this works?
 
Old 06-02-2010, 11:21 AM   #2
alli_yas
Member
 
Registered: Apr 2010
Location: Johannesburg
Distribution: Fedora 14, RHEL 5.5, CentOS 5.5, Ubuntu 10.04
Posts: 559

Rep: Reputation: 92
Is Nagios installed on your personal machine or another machine?

Also, what distro and version are you using?
 
Old 06-04-2010, 02:15 AM   #3
nagman
LQ Newbie
 
Registered: Jun 2010
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by alli_yas View Post
Is Nagios installed on your personal machine or another machine?

Also, what distro and version are you using?
It's installed on VMware, and the distro used is based on:

CentOS 54
Nagios 3.1.2
Nagiosgraph
NdoUtils
Nagvis
Nconf
 
Old 06-04-2010, 06:56 AM   #4
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by nagman View Post
It's installed on VMware, and the distro used is based on:

CentOS 54
Nagios 3.1.2
Nagiosgraph
NdoUtils
Nagvis
Nconf
Ok....you didnt say what your error was so i have to guess around here...

There is a file called nagios.conf.
mine is located here /etc/httpd/conf.d

Code:
# SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER
# Last Modified: 11-26-2005
#
# This file contains examples of entries that need
# to be incorporated into your Apache web server
# configuration file.  Customize the paths, etc. as
# needed to fit your system.

ScriptAlias /nagios/cgi-bin "/usr/lib/nagios/cgi"

<Directory "/usr/lib/nagios/cgi">
#  SSLRequireSSL
   Options ExecCGI
   AllowOverride None
   Order allow,deny
   Allow from all
#  Order deny,allow
#  Deny from all
#  Allow from 127.0.0.1
   AuthName "Nagios Access"
   AuthType Basic
   AuthUserFile /etc/nagios/htpasswd.users
   Require valid-user
</Directory>

Alias /nagios "/usr/share/nagios"

<Directory "/usr/share/nagios">
#  SSLRequireSSL
   Options None
   AllowOverride None
   Order allow,deny
   Allow from all
#  Order deny,allow
#  Deny from all
#  Allow from 127.0.0.1
   AuthName "Nagios Access"
   AuthType Basic
   AuthUserFile /etc/nagios/htpasswd.users
   Require valid-user
</Directory>

The Allow from lines determines where access is allowed from.

remove 127.0.0.1 - i am sure i dont need to tell you what that does
add ip/ip block of your choice or even the all directive.
Restart httpd.

Paste any errors along with the command being run here.
 
Old 06-04-2010, 08:47 AM   #5
nagman
LQ Newbie
 
Registered: Jun 2010
Posts: 8

Original Poster
Rep: Reputation: 0
doesn't it mean, that when it says # Allow from 127.0.0.1 it's already commented out, hence not valid?

a snippet of nanos.conf

# SSLREquireSSL
Options ExecCGI
AllowOverride None
Order allow, deny
Allow from All
# Order deny, allow
# Deny from all
# Allow from 127.0.0.1
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</directory>

Alias /nagios "/usr/local/nagios/share"

<Directory "/usr/local/nagios/share">
# SSLRequireSSL
Options None
AutType Basic
AutUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</Directory>

Alias /nagios "/usr/local/nagios/share"

<Directory "usr/local/nagios/share">
#SSLRequireSSL
Options None
AllowOverride None
Order allow, deny
Allow from all
#Order deny, allow
#Deny from all
#Allow from 127.0.0.1
AuthName "Nagios access"
Authtype Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</Directory>





Quote:
Originally Posted by centosboy View Post
Ok....you didnt say what your error was so i have to guess around here...

There is a file called nagios.conf.
mine is located here /etc/httpd/conf.d

Code:
# SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER
# Last Modified: 11-26-2005
#
# This file contains examples of entries that need
# to be incorporated into your Apache web server
# configuration file.  Customize the paths, etc. as
# needed to fit your system.

ScriptAlias /nagios/cgi-bin "/usr/lib/nagios/cgi"

<Directory "/usr/lib/nagios/cgi">
#  SSLRequireSSL
   Options ExecCGI
   AllowOverride None
   Order allow,deny
   Allow from all
#  Order deny,allow
#  Deny from all
#  Allow from 127.0.0.1
   AuthName "Nagios Access"
   AuthType Basic
   AuthUserFile /etc/nagios/htpasswd.users
   Require valid-user
</Directory>

Alias /nagios "/usr/share/nagios"

<Directory "/usr/share/nagios">
#  SSLRequireSSL
   Options None
   AllowOverride None
   Order allow,deny
   Allow from all
#  Order deny,allow
#  Deny from all
#  Allow from 127.0.0.1
   AuthName "Nagios Access"
   AuthType Basic
   AuthUserFile /etc/nagios/htpasswd.users
   Require valid-user
</Directory>

The Allow from lines determines where access is allowed from.

remove 127.0.0.1 - i am sure i dont need to tell you what that does
add ip/ip block of your choice or even the all directive.
Restart httpd.

Paste any errors along with the command being run here.
 
Old 06-05-2010, 05:17 AM   #6
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Means access is allowed from anywhere. Can you post your conf file please
 
Old 06-07-2010, 06:32 AM   #7
nagman
LQ Newbie
 
Registered: Jun 2010
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by centosboy View Post
Means access is allowed from anywhere. Can you post your conf file please
How can I do this easily on Linux? As you know, I no longer have acess to Nagios via WinSCP..

Only via Vmware...
 
Old 06-07-2010, 11:55 AM   #8
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by nagman View Post
How can I do this easily on Linux? As you know, I no longer have acess to Nagios via WinSCP..

Only via Vmware...
You will have to open this file in a text editor with something like kwrite
or browse to it in konquerer
 
Old 06-08-2010, 02:03 AM   #9
nagman
LQ Newbie
 
Registered: Jun 2010
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by centosboy View Post
You will have to open this file in a text editor with something like kwrite
or browse to it in konquerer
How do I transfer the file from CentOS to The Internet? Sorry, I am a bit slow (when it comes to Linux) :-)
 
Old 06-08-2010, 03:42 AM   #10
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by nagman View Post
How do I transfer the file from CentOS to The Internet? Sorry, I am a bit slow (when it comes to Linux) :-)
You dont.

You need to edit the file on the machine.
either browse to the file using the internet browser on local machine
Code:
file:///path/to/file
or open a command prompt
if using kde -

Code:
Alt+F2
then in the command field, type

Code:
kwrite /path/to/file


all assuming you are using kde as your window manager
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
LXer: Nagios and Oreon (Nagios web front end) installation and Configuration LXer Syndicated Linux News 1 05-31-2016 08:26 AM
Nagios 3.1.2 + RHEL 5.3 You don't have permission to access /nagios/ on this server psix Linux - Server 13 08-04-2015 03:25 AM
Nagios web access for a particular host group bkcreddy17 Linux - Server 1 02-16-2010 05:39 AM
cannot find Nagios web interface (Nagios 3.2.0) and O/S = Fedora 10 gutiojj Linux - Newbie 7 02-04-2010 09:55 AM
LXer: Nagios 2.5 and Oreon 1.3 (Nagios web front end) installation with screenshots LXer Syndicated Linux News 0 08-11-2006 06:33 PM


All times are GMT -5. The time now is 10:30 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration