I have two Centos VM. The IP Address on VM_1 is 10.99.0.10 and VM_2 is 10.99.0.12. Apache and PHP are in VM_1 and MySQL is in VM_2. Both are having IPTables rules. VM_2 is working fine with rules. Now I am Testing from VM_1.
First, I disabled VM_1 IPTables and connect to VM_2 MySQL (connected successfully).
[root@foster ~]# service IPTables stop
IPTables : Applying firewall rules: [ OK ]
[root@foster ~]# mysql -h 10.99.0.12 -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 16
Server version: 5.6.21 MySQL Community Server (GPL)
Next, I enabled VM_1 IPTables and connect to VM_2 MySQL (It never respond in hours and hours also).
[root@foster ~]# service IPTables start
IPTables : Applying firewall rules: [ OK ]
[root@foster ~]# mysql -h 10.99.0.12 -u root -p
Enter password:
What is wrong with my IPTables rules? My rules are in Pastebin.