1

I have got two NICs configured on a VM - each is tied to a specific network, one is a DMZ, the other is an internal network.

I want MySQL to listen on the internal network only and Apache on the DMZ listening for HTTP and HTTPS. But as soon as I add the second interface I run into trouble. I can hit HTTP on either interface, but can not hit 3306 on the internal network for MySQL.

Here's the config... could someone sanity check this please?

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
jerichorivera
  • 489
  • 1
  • 4
  • 12
  • can you ping and log in to from the the 'mysql' nic or is it just the mysql port that is closed? If you cannot ping it, I would think about routing problems (solvable adding static routes on the interface without default gateway). Otherwise it could be indeed that the mysql server only listens on the other interface and you should change my.cnf to change it. – natxo asenjo Sep 23 '10 at 18:04

1 Answers1

1

Check bind-address in /etc/mysql/my.cnf - it should have the ip address of the internal card instead of the default 127.0.0.1.

jneves
  • 1,041
  • 6
  • 15