Find the answer to your Linux question:
Results 1 to 8 of 8
Hi guys, I did a bit of searching (on a very slow net connection so forgive me if I missed the answer) but couldn't find what I was after. Keep ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2010
    Posts
    4

    can't access nagios web interface on network


    Hi guys, I did a bit of searching (on a very slow net connection so forgive me if I missed the answer) but couldn't find what I was after.

    Keep in mind I'm very new to linux so please be gentle.

    I have set up nagios on Suse 11.2 and it is working fine on the localhost. I can access localhost/nagios, <ipaddress>/nagios in the browser and it loads up the nagios webinterface. If I try on a computer on the network with <ipaddress>/nagios the request times out. I have tested that I can ping to and from both machines (nagios machine and the machine I am trying to access the interface from).

    Some details:
    Nagios is running in a hyper-v VM. I installed it through yast2.
    Communication is run via a switch and sonicwall firewall but firewall has allow all within the network.


    I have a feeling it's some apache2 setting that I haven't configured or something blocking port 80.

    Any help would be much appreciated.

  2. #2
    Linux Enthusiast meton_magis's Avatar
    Join Date
    Oct 2006
    Location
    arizona
    Posts
    699
    can you ping that IP address?

    do you have a firewall denying connections to port 80?

    try to run

    nc ipaddress 80

    and type
    GET /nagios/ HTTP/1.1

    hit enter a couple times, does stuff spout out at you in HTML?
    New to the internet, technical forums, or the hacker / open source community??
    Read this to learn good posting habits http://www.catb.org/~esr/faqs/smart-questions.html

    RHCE for RHEL version 5
    RHCT for RHEL version 4

  3. #3
    Just Joined!
    Join Date
    Mar 2010
    Posts
    4
    Hey thanks for your interest in helping me out.

    I tried nc -l <ipaddress> 80

    I got this: nc: Address already in use

    I couldn't run the GET command because it says GET command not found.

    I checked the firewall logs and can't see any TCP 80 connection drop on path to the ip address (there shouldn't be as all access is allowed).

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Enthusiast meton_magis's Avatar
    Join Date
    Oct 2006
    Location
    arizona
    Posts
    699
    you need to NOT use the -l switch on nc. using the -l will setup a local server to accept incomming connections (which won't work on port 80, because you have (most likely) apache running allready. you need to use nc to connect to port 80, not host on port 80.

    Get is not a command, it is a request to a web server, and I was saying to put it into the input for nc once you made a connection. If it works, it will request the default page at /nagios/


    the firewall may not log all dropped attemps (can you immagine the number of logs you'd get?)

    run `iptables --list`
    post output.

    and you're welcome, you'd be surprised how many people aren't thankful until their problem is fixed (or even after that.)
    New to the internet, technical forums, or the hacker / open source community??
    Read this to learn good posting habits http://www.catb.org/~esr/faqs/smart-questions.html

    RHCE for RHEL version 5
    RHCT for RHEL version 4

  6. #5
    Linux Enthusiast scathefire's Avatar
    Join Date
    Jan 2010
    Location
    Western Kentucky
    Posts
    626
    you don't have any weird allow/deny rules in apache do you?

    like
    Code:
    deny from all
    allow from 127.0.0.1
    if so you need to change the address to something like your network range or that specific host.
    linux user # 503963

  7. #6
    Just Joined!
    Join Date
    Mar 2010
    Posts
    4
    Meton magis, sorry about that! I thought I broke the nc command because it didn't do anything first time I tried but it was actually waiting for me to type that GET line. I did it and I got a permission error (but also got some html). I looked at my apache2 error log and I can see that there is a repeated error "Directory index forbidden by options directive: /srv/www/htdocs/"

    Also when I ran Iptables --list, all the settings were DROP and REJECT to anywhere anywhere. It had REJECT TCP anywhere anywhere. I'd post it here but I don't have mouse functionality due to integration component problems and I don't know how to.

    Oh and scathefire - I quite possibly do have something stupid in apache but all settings are completely left default upon installation of apache2. Do I have to change some initial settings? I know in ubuntu I didn't have to change a thing and it all just worked after installation.

    Thanks again guys.

  8. #7
    Linux Enthusiast scathefire's Avatar
    Join Date
    Jan 2010
    Location
    Western Kentucky
    Posts
    626
    seeing some config files and maybe some logs might help
    linux user # 503963

  9. #8
    Just Joined!
    Join Date
    Mar 2010
    Posts
    4
    Thanks for the help guys. It turns out it was just a firewall issue. I just opened up the firewall settings through /sbin/yast2 and added port 80 on the allow list.

    Not used to the firewall exceptions as it wasn't a step in Ubuntu.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •