i have two server A and B
in server A i install forum and mySQL server !!! :D
now i want server can connect to A mySQL server.
But i want only server B's IP can connect to server A on my define port !!!
how to config mySQL server and iptable !!
Thank in advanced !! :lol: :lol:

Member Avatar for TKSS

Make sure the port is opened...Insert your MySQL IP for 202.54.1.20. Insert your Apache IP for 202.54.1.50

[b]iptables -A INPUT -p tcp -s 202.54.1.50 --sport 1024:65535 -d 202.54.1.20 --dport 3306 -m state --state NEW,ESTABLISHED -j ACCEPT

iptables -A OUTPUT -p tcp -s 202.54.1.20 --sport 3306 -d 202.54.1.50 --dport 1024:65535 -m state --state ESTABLISHED -j ACCEPT[/b]
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.