Untrusted domains, local network

help

#1

Hello everyone. I’m a noob at Linux and I set up Ubuntu desktop as a server and installed owncloud. When connecting from outside of my local network I can connect fine if I added the domain in the config.php file. I added the local 192.168.1.11 - my laptop, but with it when I connect to https://192.168.1.12 I am greeted with untrusted domain. In the apache log I confirmed that the connecting computer’s ip is 192.168.1.11 That is my first issue.

Second issue: I cannot add domains in the settings when I log into owncloud on my server machine. It just refreshes when I hit enter. Also no domains that I added in the config.php are listed there.

Third issue: I don’t understand how trusted domains work when I use my laptop at the school’s wifi network. Do I have to add each single different IP I will connect from to the php beforehand? That seems very tedious to me. I’d rather have it open to all domains so I can connect from everywhere normally. I understand that this is probably terrible from a security standpoint. But Dropbox allows me to log in from everywhere.

All this is very complex and hard to me still, I appreciate all the help, thank you!

Luka


#2

Yes, this might be because the two IPs differ.

You should give more info, eg your config.php


#3

You should have something like:

 'trusted_domains' => array (
    0 => 'my.external.domain',
    1 => 'internal domain or ip',
  ),

Please note, that both are related to the server, not the accessing client.


#4

This is m config:

<?php
$CONFIG = array (
  'updatechecker' => false,
  'instanceid' => 'ocjl5t1z8miu',
  'passwordsalt' => '3mHDjYKIENgeNt99h1BiQMWQJ/HaBC',
  'secret' => 'oOYKTREu7OvTSy5tIJhB6Y4nQBckaKU8mWx+2zLCGGjiBuLf',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => '95.176.169.149',
    2 => '192.168.1.11','192.168.1.7'
  ),
  'datadirectory' => '/var/www/owncloud/data',
  'overwrite.cli.url' => 'https://localhost',
  'dbtype' => 'mysql',
  'version' => '10.1.0.4',
  'dbname' => 'owncloud',
  'dbhost' => 'localhost',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'owncloud',
  'dbpassword' => 'Sadni tekoci jogurt ananas in kokos 1,1%',
  'logtimezone' => 'UTC',
  'installed' => true,
  'mail_domain' => 'server.com',
  'mail_from_address' => 'server',
  'mail_smtpmode' => 'php',
);

#5

Please remove passwords and other secret stuff!


#6

I assume this is wrong, only one IP per line.

Try this

 'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => '95.176.169.149',
    2 => '192.168.1.12',
  ),

Assuming that

  • ‘95.176.169.149’ is your external IP
  • ‘192.168.1.12’ is your internal IP, as stated above.