How to fix your remote address identified as 192.168.1.5 and http issue

Fix Security issues in nextcloud

Here I installed an nextcloud manual way my personal server (ubuntu 22.04) and I fixed some errors but I cannot fix these following-

  1. Your remote address was identified as “192.168.1.14” and is bruteforce throttled at the moment slowing down the performance of various requests. If the remote address is not your address this can be an indication that a proxy is not configured correctly. Further information can be found in the documentation.

  2. Accessing site insecurely via HTTP. You are strongly advised to set up your server to require HTTPS instead, as described in the security tips. Without it some important web functionality like “copy to clipboard” or “service workers” will not work!

How do I fix this in my personal private next cloud server

Hey @Devji

Here are solutions to your issues:

  1. Nextcloud throttles connections from failed login attempts IP 's and delays login to 30seconds. It is not a bad thing but a security measure and that warning is only informing you that your logins will be throttled for 30seconds when you login using that source iP. To remove the IP from the list use the command :

sudo -u www-data php /var/www/<nextcloud directory>/occ security:bruteforce:reset 192.168.1.14

If that IP is the ip of your proxy server you may have to define it to the config.php file as a trusted proxy like this:

‘trusted_proxies’ => [‘192.168.1.14’],

  1. The error is stating you need to setup https to properly secure your nextcloud server. Which means you need to setup access over https instead of http and this can be done using a valid ssl or self signed ssl certificate. This can be done by setting up apache or nginx.

Another Solution:

I have a script that can be used on ubuntu to install nextcloud and this script will setup ssl for you using a self signed cert on ubuntu(can be changed later to letsencrypt free cert). Before you use this script make sure you completely remove your current install of nextcloud, mariadb or mysql and apache2 if installed or better still a fresh ubuntu install. The script also fixes some install errors.

To remove apache2 run:

sudo apt autoremove apache2 --purge

To remove mariadb run:

sudo apt autoremove mariadb* --purge

Here are instructions on how to use the script:

  1. Open your terminal and run the following commands:

command 1:

wget https://raw.githubusercontent.com/geek2gether/Nextcloud/main/nextcloud-install.sh

command 2:

chmod +x nextcloud-install.sh

command 3:

sudo ./nextcloud-install.sh

Follow the prompts and enter the required information as follows:

Enter Nextcloud Server hostname - e.g cloud.example.com: <enter a preferred hostname for your server>
Enter your servers IP Address: <enter the IP address of your server>

The script will install nextcloud and once completed it will display credentials similar to these:

Nextcloud installation and setup complete
Visit: https://x.x.x.x or https://cloud.example.com
Admin username: ncadmin
Admin password: xxxxx
Database root user password: xxxxxx
Database User: nextcloud_dbadmin
Database user password: xxxxxxx
Access your nextcloud server with the IP: https://x.x.x.x and login using the provided credentials.

I hope this helps.

Please provide feedback

@glitch thankyou sir it process worked. Thank for the pre modified nextcloud.

@Devji,

You are welcome. I’m glad my script helped you get your nextcloud setup working.

Thank you for being part of the geek2gether community.