Ad Widget

Collapse

Allowing remote connections to Zabbix frontend

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Absilon
    Junior Member
    • Jul 2010
    • 5

    #1

    Allowing remote connections to Zabbix frontend

    When the Zabbix appliance first boots it says:

    access to frontend currently is allowed from:
    127.0.0.1
    192.168.0.0/16
    10.0.0.0/8
    ::1

    Does anyone here know how what changes I need to make in order to allow access to the front end from external IP addresses? I searched all over the web and on this forum and have not seen this mentioned.

    I am trying to use the Droid App called "Zabbix on the go" and am unable to connect to the zabbix server because it is not allowing connections from external IP addresses.

    Also, does anyone have any feedback regarding the "Zabbix on the go" app? Is it any good?

    Thank you in advance for your help.
  • richlv
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2005
    • 3112

    #2
    see http://www.zabbix.com/documentation/...rontend_access
    Zabbix 3.0 Network Monitoring book

    Comment

    • Absilon
      Junior Member
      • Jul 2010
      • 5

      #3
      Thank you so much richlv. I don't know how I could have missed that in the manual. I guess that's what I get for working on 3 hours of sleep.

      I added the line:

      Allow from any

      But it is still not working. What is the proper line that I need to add in order to allow all external IP addresses?

      Thanks

      Comment

      • richlv
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Oct 2005
        • 3112

        #4
        well... did you restart apache ?
        Zabbix 3.0 Network Monitoring book

        Comment

        • Absilon
          Junior Member
          • Jul 2010
          • 5

          #5
          Yes, I restarted apache. I even tried rebooting the zabbix appliance server and adding a line allowing remote accessf from a specific IP block.

          I think there is something else wrong. My router has been dropping wireless connections lately, so I'm thinking that perhaps it may not be farwarding the ports properly. I will get another router later this week and see if that resolves the problem.

          Comment

          • sunmicroman
            Junior Member
            • May 2011
            • 3

            #6
            Originally posted by Absilon
            Thank you so much richlv. I don't know how I could have missed that in the manual. I guess that's what I get for working on 3 hours of sleep.

            I added the line:

            Allow from any

            But it is still not working. What is the proper line that I need to add in order to allow all external IP addresses?

            Thanks
            I had this same EXACT problem and adding the line "Allow from any" DID NOT work.

            After doing some research, I had to actually search for Apache configuration items, since no one else seemed to have this issue when I did Zabbix searches.

            This is the fix.

            Add the line:

            Allow from all

            (instead of "any") to your zabbix.conf file and it works.

            Just wanted to post this to save some time for others who might also have this issue.

            Comment

            • mystycs
              Member
              • Aug 2013
              • 56

              #7
              niether worked for me i did allow from any and allow from all and i cant access it from outside my house.

              ports are forwarded on my router as well

              Comment

              • Pada
                Senior Member
                • Apr 2012
                • 236

                #8
                Make sure that your zabbix machine has Internet access, because if it does not have routes to the Internet, then you won't be able to access it from outside, even if you add allow rules in Apache HTTPd.

                Secondly, try the following allow rules for Apache:
                Code:
                <Directory "/usr/share/zabbix">
                    Options FollowSymLinks
                    AllowOverride None
                    Order allow,deny
                    Allow from all
                </Directory>
                * Of course you'll need to use the correct directory and restart/reload Apache too.

                Comment

                • mystycs
                  Member
                  • Aug 2013
                  • 56

                  #9
                  Yup thats exactly what i edited my file to in

                  /etc/apache2/conf.d/zabbix.conf

                  But it still isnt working. That is why im confused.

                  My zabbix has internet because i have over a few graphs already processing on SNMP.

                  I also did service apache2 restart and reload

                  And when i login to zabbix on the system it still says frontend is only allowed from those internal IPs

                  Comment

                  • Pada
                    Senior Member
                    • Apr 2012
                    • 236

                    #10
                    mystycs: could you post the exact error message that you're getting when trying to access the frontend from the Internet?

                    Perhaps you should also have a look at your Apache error logs. eg.
                    tail /var/log/apache2/*error_log

                    Comment

                    • mystycs
                      Member
                      • Aug 2013
                      • 56

                      #11
                      It just sits there loading the website for a minute then says


                      The connection has timed out







                      The server at X.X.X.X is taking too long to respond.





                      The site could be temporarily unavailable or too busy. Try again in a few
                      moments.
                      If you are unable to load any pages, check your computer's network
                      connection.
                      If your computer or network is protected by a firewall or proxy, make sure
                      that Firefox is permitted to access the Web.

                      I will check my apache logs right now to see.

                      Comment

                      • mystycs
                        Member
                        • Aug 2013
                        • 56

                        #12
                        I dont see any errors pertaining to me accessing it

                        Basically if i go to the domain i pointed to it (zabbix.mydomain.com) within my own network it works fine. Outside my network, friends internet ect just loads forever and times out.

                        Im assuming zabbix just isnt allowing outside connections. My ports are forwarded correctly ofcourse.

                        And i am running this on a VM

                        Comment

                        • Pada
                          Senior Member
                          • Apr 2012
                          • 236

                          #13
                          If it just "loads forever and times out", then it isn't an Apache/Zabbix configuration, UNLESS you've binded Apache to the local IP address (eg. 10.0.0.2) instead of to any address (0.0.0.0).

                          Run `netstat -nlt | grep 80`.
                          It is supposed to show a line as follow in Ubuntu:
                          Code:
                          tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN
                          and not like
                          Code:
                          tcp        0      0 10.0.0.2:80             0.0.0.0:*               LISTEN
                          In Ubuntu you can configure the bind port to listen on any address by changing the /etc/apache2/ports.conf to have the listen line as follow:
                          Code:
                          Listen 80
                          and then restart (not just reload) the apache2 service.

                          If your Apache2 server is now listening on 0.0.0.0:80 (check with netstat again) and it still loads forever, then you should look at your machine's firewall, as well as your router's firewall and port forwarding.
                          If you don't have a default gateway specified on your machine, then it won't have Internet access and then it won't work either - but you said the machine does have Internet access, so this shouldn't be an issue.
                          It could also be that your ISP is blocking incoming TCP port 80 connections or that you don't have a public IP address.
                          Last edited by Pada; 11-08-2013, 06:26.

                          Comment

                          • mystycs
                            Member
                            • Aug 2013
                            • 56

                            #14
                            My grep 80 showed this below


                            tcp 0 0 :::80 :::* LISTEN

                            Comment

                            • Pada
                              Senior Member
                              • Apr 2012
                              • 236

                              #15
                              Thats 100%. Your Apache2 is listening on all addresses.

                              I disabled IPv6 on all my devices, which is why mine said 0.0.0.0:80 and yours says :::80.
                              Last edited by Pada; 11-08-2013, 10:18.

                              Comment

                              Working...