Jump to content

Recommended Posts

hello guys,

i once saw a topic talking about a vulnerability in the database,

so to explain this, someone can connect to your db cache server, and also to any account without knowing the password.
(attacker must know id from account->account->id)

the fix was to block any connection coming to your db port except for localhost.

someone also mentioned that adding this: BIND_IP: 127.0.0.1 to your db config will fix this problem.

i tried to look for the BIND_IP in my db config but i didn't find it, i think it's an older thing or something that is not required now idk.
but my question is, how to actually block any connection coming to the db port to prevent this from happening ?

Link to comment
https://metin2.dev/topic/33753-db-vulnerability/
Share on other sites

  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

  • Premium
13 minutes ago, Muffins said:

hello guys,

i once saw a topic talking about a vulnerability in the database,

so to explain this, someone can connect to your db cache server, and also to any account without knowing the password.
(attacker must know id from account->account->id)

the fix was to block any connection coming to your db port except for localhost.

someone also mentioned that adding this: BIND_IP: 127.0.0.1 to your db config will fix this problem.

i tried to look for the BIND_IP in my db config but i didn't find it, i think it's an older thing or something that is not required now idk.
but my question is, how to actually block any connection coming to the db port to prevent this from happening ?

Database port should be closed if you use localhost

Link to comment
https://metin2.dev/topic/33753-db-vulnerability/#findComment-170875
Share on other sites

  • Premium
2 minutes ago, Muffins said:

i'm not really an expert on these type of stuff, but my server currently running on VPS.
how can i check for that ?

For checking ports use kinda https://www.yougetsignal.com/tools/open-ports/

To close the ports use your firewall, ask some AI to help you with rules.

Link to comment
https://metin2.dev/topic/33753-db-vulnerability/#findComment-170877
Share on other sites

thanks for your help,
i asked an AI about this and it showed me that there can be 2 ways for this.
one is by using Packets Firewall, and second is by adding this to my.cnf: bind-address 127.0.0.1 which i did,
but that will only accept connection from the localhost so i can login to the game normally but i can't use Navicat anymore.

so that means i'll have to go for the firewall instead to add a bypass for my ip address to allow me to connect to the database.

is that right ?

Edited by Muffins
Link to comment
https://metin2.dev/topic/33753-db-vulnerability/#findComment-170878
Share on other sites

23 hours ago, WeedHex said:

For checking ports use kinda https://www.yougetsignal.com/tools/open-ports/

To close the ports use your firewall, ask some AI to help you with rules.

thanks for your help,
i asked an AI about this and it showed me that there can be 2 ways for this.
one is by using Packets Firewall, and second is by adding this to my.cnf: bind-address 127.0.0.1 which i did,
but that will only accept connection from the localhost so i can login to the game normally but i can't use Navicat anymore.

so that means i'll have to go for the firewall instead to add a bypass for my ip address to allow me to connect to the database.

is that right ?

Link to comment
https://metin2.dev/topic/33753-db-vulnerability/#findComment-170886
Share on other sites

  • 3 weeks later...
  • Honorable Member

Yeah, because you told the MySQL server to only listen on localhost.

You need to just close the port used by the "db" program. Alternatively you can add BIND_IP = localhost or 127.0.0.1 to the conf.txt for your "db" program.

992404397646696589.png
Former C++ Developer at Gameloft on DML
Join my Discord: Distraught Labs

Link to comment
https://metin2.dev/topic/33753-db-vulnerability/#findComment-171084
Share on other sites

20 hours ago, Distraught said:

Yeah, because you told the MySQL server to only listen on localhost.

You need to just close the port used by the "db" program. Alternatively you can add BIND_IP = localhost or 127.0.0.1 to the conf.txt for your "db" program.

is there a way to close the port and to allow it for navicat on my device only except for the firewall, or i just going to have to go for the firewall anyways,
because i did added 'BIND_IP = 127.0.0.1' and that didn't really do anything, but it was closed when i added it here: my.cnf

Link to comment
https://metin2.dev/topic/33753-db-vulnerability/#findComment-171092
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.