我在虚拟机上configuration了两块网卡,每块网卡绑定到特定的networking,一块是DMZ,另一块是内部networking。
我希望MySQL仅在内部networking上侦听,并在DMZ上侦听HTTP和HTTPS。 但是,一旦我添加第二个界面,我遇到了麻烦。 我可以打任何一个接口的HTTP,但不能打内部networking上的MySQL 3306。
这是configuration…有人可以理智检查这个请吗?
auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 10.153.24.230 netmask 255.255.255.240 network 10.153.24.224 broadcast 10.153.24.239 dns-nameservers 8.8.8.8 auto eth1 iface eth1 inet static address 10.153.24.195 netmask 255.255.255.224 gateway 10.153.24.193 broadcast 10.153.23.223
检查/etc/mysql/my.cnf中的绑定地址 – 它应该有内部网卡的IP地址,而不是默认的127.0.0.1。