Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
PHPMyAdmin - Local installation - remote IP
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 3368
Location: de

PostPosted: Wed Dec 02, 2020 10:39 am    Post subject: PHPMyAdmin - Local installation - remote IP Reply with quote

Hi there,

I've installed PHPMyAdmin (just downloaded the tar.xz from the project site) and got it running via Nginx.

Configuration:
NAS (192.168.109.10): MariaDB, Nginx, PHPMyAdmin
Remote machine (192.168.109.85): Webbrowser

MySQL-Users::
+-------------+-----------+-------------------------------------------+
| User        | Host      | Password                                  |
+-------------+-----------+-------------------------------------------+
| root        | localhost | *4C48E0A90CFEF601B9F377E50xxxx


When I load on the Remote machine the phpmyadmin page and try to login, I get the following error:
journal:
Dez 02 11:17:43 kobold phpMyAdmin[28558]: user denied: root (mysql-denied) from 192.168.109.85


I understand the problem, but it's confusing me.

Expected:
Browser (Remote machine, 192.168.109.85) -> PHPMyadmin (Kobold, 192.168.109.10) ---> [Connection via Socket/Localhost (127.0.0.1)] ----> MariaDB (Kobold, 192.168.109.10)

Instead PHPMyAdmin is forwarding my real IP to the database. That's a disadvantage, because I have to open the database for the database root user in the whole network. Is there a way to get the expected behaviour?
Back to top
View user's profile Send private message
Banana
Moderator
Moderator


Joined: 21 May 2004
Posts: 1864
Location: Germany

PostPosted: Wed Dec 02, 2020 12:01 pm    Post subject: Reply with quote

that is indeed strange. Maybe the error message is misleading. Does is work if you connect with that user on 192.168.109.10 directly?

PS: did you get the hardware from https://shop.kobol.io/ or do you use only the OS?
_________________
Forum Guidelines

PFL - Portage file list - find which package a file or command belongs to.
My delta-labs.org snippets do expire
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Wed Dec 02, 2020 12:45 pm    Post subject: Reply with quote

That error's coming from phpmyadmin, it's not actually forwarding your IP to mysql (it can't do that).
Back to top
View user's profile Send private message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 3368
Location: de

PostPosted: Wed Dec 02, 2020 3:13 pm    Post subject: Reply with quote

Banana wrote:
that is indeed strange. Maybe the error message is misleading. Does is work if you connect with that user on 192.168.109.10 directly?

192.168.109.10 doesn't have any graphical environment installed.

Banana wrote:
PS: did you get the hardware from https://shop.kobol.io/ or do you use only the OS?

Hardware: Bought it in January and received it 2 months ago. Nice gadget. Currently I'm building up my homeserver for everything on it.

Ant P. wrote:
That error's coming from phpmyadmin, it's not actually forwarding your IP to mysql (it can't do that).

Thanks. Nevertheless I found this description.

So I created a different user with root privileges allowed from localhost and from '%'. And it works. That's not, what I wanted, but I didn't find any better solution.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Wed Dec 02, 2020 4:08 pm    Post subject: Reply with quote

If you know it's only going to be accessed over localhost, bind_address=127.0.0.1 in the config file should help. Other local processes can still get in, but it's better than nothing (the default).
Back to top
View user's profile Send private message
Banana
Moderator
Moderator


Joined: 21 May 2004
Posts: 1864
Location: Germany

PostPosted: Wed Dec 02, 2020 4:18 pm    Post subject: Reply with quote

Quote:
192.168.109.10 doesn't have any graphical environment installed.

If you have terminal access you should be able to use the cli interface from mysql.

Quote:
So I created a different user with root privileges allowed from localhost and from '%'. And it works. That's not, what I wanted, but I didn't find any better solution.

could be that using 127.0.0.1 instead of localhost can solve this issue for you. Using from % is not a good idea. If it is only accessable from your local LAN, well then it is up to you.

Quote:
Hardware: Bought it in January and received it 2 months ago. Nice gadget. Currently I'm building up my homeserver for everything on it.

Damn. Looks good, but sold out in the store.
_________________
Forum Guidelines

PFL - Portage file list - find which package a file or command belongs to.
My delta-labs.org snippets do expire
Back to top
View user's profile Send private message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 3368
Location: de

PostPosted: Wed Dec 02, 2020 10:07 pm    Post subject: Reply with quote

Banana wrote:
If you have terminal access you should be able to use the cli interface from mysql.

Accessing mysql/mariadb via cli isn't the problem, PHPMyAdmin was.

Banana wrote:
Using from % is not a good idea. If it is only accessable from your local LAN, well then it is up to you.

I know. But the databases aren't really important. It's just my Wiki and the Kodi database.

Banana wrote:
Damn. Looks good, but sold out in the store.

I was looking at this gadget for about 3 years (precessor Helios4). And 2 weeks ago I bought in Mediamarkt 1 Crucial SSD 2TB for 166€ and 2 WD My Book disks (12TB, WD Red Plus CMR) for 170€/each. So I have currently 3 disks with 26 TB (ok 23.6 TiB) inside the Helios. It's a perfect 24/7 server for everything (except Virtual machines).
Back to top
View user's profile Send private message
Banana
Moderator
Moderator


Joined: 21 May 2004
Posts: 1864
Location: Germany

PostPosted: Thu Dec 03, 2020 7:37 am    Post subject: Reply with quote

Quote:
I was looking at this gadget for about 3 years (precessor Helios4). And 2 weeks ago I bought in Mediamarkt 1 Crucial SSD 2TB for 166€ and 2 WD My Book disks (12TB, WD Red Plus CMR) for 170€/each. So I have currently 3 disks with 26 TB (ok 23.6 TiB) inside the Helios. It's a perfect 24/7 server for everything (except Virtual machines).

I added this device to my whishlist. Current running a raspberry and 4 USB3 disks as a small NAS. Not running 24/7 so it is enough for me right now.
_________________
Forum Guidelines

PFL - Portage file list - find which package a file or command belongs to.
My delta-labs.org snippets do expire
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum