ownCloud: Admin page loads very slowly

ownCloud logoOne day, when I logged in as admin to my ownCloud installation I noticed, that the page loads very slowly. Additionally I got the following error message:

Internet connection not working
This server has no working internet connection. This means that some of the features like mounting of external storage, notifications about updates or installation of 3rd party apps don´t work. Accessing files from remote and sending of notification emails might also not work. We suggest to enable internet connection for this server if you want to have all features.

What has happend?

The intrusion detection system (IDS) Suricata that I use with Snorby was warning me. There was a strange behavior initiated by a server with the ip 188.138.x.x
So, for that reason I set the firewall to drop all incoming connections from this network. I’m using iptables to configure the packet filtering ruleset and added:

-A INPUT -s 188.138.0.0/16 -j DROP

But ownCloud obviously needs access to apps.owncloud.com and vice versa. In terms of a firewall the ownCloud server must accept incoming connections from apps.owncloud.com. I did a ping test and it failed because the server can’t read any answers.
# ping -c 4 apps.owncloud.com
PING main.hive01.com (188.138.118.86) 56(84) bytes of data.
^C
--- main.hive01.com ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3023ms

I commented out the statement in my iptables settings file: (no good idea at all, but suitable only for testing purpose):
#-A INPUT -s 188.138.0.0/16 -j DROP
and run a ping test once again:

# ping -c 4 apps.owncloud.com
PING main.hive01.com (188.138.118.86) 56(84) bytes of data.
64 bytes from s4.hive01.com (188.138.118.86): icmp_req=1 ttl=55 time=25.7 ms
64 bytes from s4.hive01.com (188.138.118.86): icmp_req=2 ttl=55 time=25.6 ms
64 bytes from s4.hive01.com (188.138.118.86): icmp_req=3 ttl=55 time=25.7 ms
64 bytes from s4.hive01.com (188.138.118.86): icmp_req=4 ttl=55 time=25.9 ms
--- main.hive01.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 25.632/25.781/25.962/0.199 ms

Now when you log in, the admin page of ownCloud loads faster and there is no error message anymore.

Valid for ownCloud 7.0.2

Share

One thought on “ownCloud: Admin page loads very slowly

  1. Hi – you might also want to try adding this as one of your first rules – because (as i see it), that ip only want to talk “back” to you after your server initiates the connection (for instance when going to the “apps” page in you owncloud)

    iptables -A INPUT -m conntrack –ctstate RELATED,ESTABLISHED -j ACCEPT

    It fixed the problem for me, and iptables no longer drops the packets (and the pages load quickly again)

Leave a Reply

Your email address will not be published. Required fields are marked *