We moved our repositories to BitBucket!

If you can't login or you can't register to the forums do not rise an issue, instead please write to support (at) l2jserver.com

Check our wiki!

Report server issues here

Forum has been updated to phpBB 3.2, let's see if this fixes some minor bugs we had.

Thank you for visiting http://www.l2jserver.com/

Accept remote connection from your website to your MySQL server (safe way)

Have you created a useful tool? or Do you want to get help building one? This is the right place!
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
User avatar
regenx
Posts: 212
Joined: Sat Jul 17, 2010 6:55 am

Accept remote connection from your website to your MySQL server (safe way)

Post by regenx » Wed Aug 30, 2017 4:52 pm

Use this rules:
UFW rule:

Code: Select all

sudo ufw allow from XXX.XXX.XX.XXX to any port 3306
IPTables rule:

Code: Select all

iptables -A INPUT -p tcp --dport 3306 -s XXX.XXX.XX.XXX -j ACCEPT
where XXX.XXX.XX.XXX is your IP from external web server (where your website is hosted).

User avatar
JMD
Advanced User
Advanced User
Posts: 1349
Joined: Wed Apr 15, 2009 10:07 am
Contact:

Re: Accept remote connection from your website to your MySQL server (safe way)

Post by JMD » Sat Sep 02, 2017 9:39 am

Thanks. :+1:

Attila
Posts: 408
Joined: Mon May 05, 2014 10:15 am

Re: Accept remote connection from your website to your MySQL server (safe way)

Post by Attila » Sat Sep 02, 2017 1:15 pm

regenx wrote:
Wed Aug 30, 2017 4:52 pm
Use this rules:
UFW rule:

Code: Select all

sudo ufw allow from XXX.XXX.XX.XXX to any port 3306
IPTables rule:

Code: Select all

iptables -A INPUT -p tcp --dport 3306 -s XXX.XXX.XX.XXX -j ACCEPT
where XXX.XXX.XX.XXX is your IP from external web server (where your website is hosted).
Where should I look to adjust this :eh:

thanks

User avatar
JMD
Advanced User
Advanced User
Posts: 1349
Joined: Wed Apr 15, 2009 10:07 am
Contact:

Re: Accept remote connection from your website to your MySQL server (safe way)

Post by JMD » Sat Sep 02, 2017 6:21 pm

Attila wrote:
Sat Sep 02, 2017 1:15 pm
regenx wrote:
Wed Aug 30, 2017 4:52 pm
Use this rules:
UFW rule:

Code: Select all

sudo ufw allow from XXX.XXX.XX.XXX to any port 3306
IPTables rule:

Code: Select all

iptables -A INPUT -p tcp --dport 3306 -s XXX.XXX.XX.XXX -j ACCEPT
where XXX.XXX.XX.XXX is your IP from external web server (where your website is hosted).
Where should I look to adjust this :eh:

thanks
its commands you type on putty or command line prompt on a linux server. Logicaly you can reverse them by typing the opposite. example instead of ACCEPT use DROP.

Attila
Posts: 408
Joined: Mon May 05, 2014 10:15 am

Re: Accept remote connection from your website to your MySQL server (safe way)

Post by Attila » Sun Sep 03, 2017 7:27 am

Oke this is only for linux server

Thanks for the reply

User avatar
regenx
Posts: 212
Joined: Sat Jul 17, 2010 6:55 am

Re: Accept remote connection from your website to your MySQL server (safe way)

Post by regenx » Mon Sep 04, 2017 4:43 am

Attila wrote:
Sun Sep 03, 2017 7:27 am
Oke this is only for linux server

Thanks for the reply
Yes, for Linux Debian based.
Do you know another server OS? :)
Windows Server is NOT a server! Do not use Windows Server, it is Windows OS and that's all.


@JWD
Why reverse with DROP? There is "sudo ufw allow" (for DROP is different). This case is ONLY when you need to allow special IP's but in other case when you don't need .. you better DENY to be sure :)

User avatar
Sacrifice
Advanced User
Advanced User
Posts: 866
Joined: Thu Aug 14, 2014 6:31 am
Location: Spain

Re: Accept remote connection from your website to your MySQL server (safe way)

Post by Sacrifice » Mon Sep 04, 2017 9:44 pm

regenx wrote:
Wed Aug 30, 2017 4:52 pm
Use this rules:
UFW rule:

Code: Select all

sudo ufw allow from XXX.XXX.XX.XXX to any port 3306
IPTables rule:

Code: Select all

iptables -A INPUT -p tcp --dport 3306 -s XXX.XXX.XX.XXX -j ACCEPT
where XXX.XXX.XX.XXX is your IP from external web server (where your website is hosted).
As long as the hosting (free in my case), do not have that port closed (which I do not understand since the database server is another server than the hosting) and pretend to charge you for it (like me). Truth hostinger.es ?.
Lineage 2: The Chaotic Throne: High Five (CT2.6)
GitLab https://gitlab.com/Sacrifice GitHub https://github.com/Sacrifice BitBucket https://bitbucket.org/Sacrifice_

User avatar
Sacrifice
Advanced User
Advanced User
Posts: 866
Joined: Thu Aug 14, 2014 6:31 am
Location: Spain

Re: Accept remote connection from your website to your MySQL server (safe way)

Post by Sacrifice » Mon Sep 04, 2017 9:48 pm

Or for php fsockopen() command, to check two simple ports, to be locked... Real hostinger.es?
Lineage 2: The Chaotic Throne: High Five (CT2.6)
GitLab https://gitlab.com/Sacrifice GitHub https://github.com/Sacrifice BitBucket https://bitbucket.org/Sacrifice_

User avatar
regenx
Posts: 212
Joined: Sat Jul 17, 2010 6:55 am

Re: Accept remote connection from your website to your MySQL server (safe way)

Post by regenx » Thu Sep 07, 2017 1:19 pm

I do not understand you. What do you need to know?
I don't know hostinger.es and I don't care about hosting companies, this thread is not about hosting companies.

User avatar
Sacrifice
Advanced User
Advanced User
Posts: 866
Joined: Thu Aug 14, 2014 6:31 am
Location: Spain

Re: Accept remote connection from your website to your MySQL server (safe way)

Post by Sacrifice » Thu Sep 07, 2017 6:41 pm

:think: :wtf: I'm not need to know nothing... for now at least... :lolno:
Lineage 2: The Chaotic Throne: High Five (CT2.6)
GitLab https://gitlab.com/Sacrifice GitHub https://github.com/Sacrifice BitBucket https://bitbucket.org/Sacrifice_

Post Reply