debianを利用して下の構成のネットワークとサーバーを構築したいです
debian...debian-8.5.0-amd64-netinst.iso
現在、上の図のようなネットワーク構成のサーバーを構築する練習をVirtualboxを利用しておこなっています。
ただ、firewalldの設定が上手くいかないため、質問させてください。
現在、GSVと書かれたサーバーの/etc/netwark/interfacesは下記となっております。
This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
auto eth0
iface eth0 inet static
address 172.22.1.100
netmask 255.255.252.0
network 172.22.1.0
broadcast 172.22.3.255
gateway 172.22.0.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 172.22.255.1
auto eth1
iface eth1 inet static
address 192.168.1.1
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
auto eth2
iface eth2 inet static
address 192.168.2.1
netmask 255.255.255.0
network 192.168.2.0
broadcast 192.168.2.255
また、firewalldの設定はfirewall-cmd --list-all-zonesより下記となっております。
block
interfaces:
sources:
services:
ports:
masquerade: no
forward-ports:
icmp-blocks:
rich rules:
dmz (active)
interfaces: eth1
sources:
services: http smtp
ports:
masquerade: yes
forward-ports:
icmp-blocks:
rich rules:
drop
interfaces:
sources:
services:
ports:
masquerade: no
forward-ports:
icmp-blocks:
rich rules:
external (active)
interfaces: eth0
sources:
services: ssh
ports:
masquerade: yes
forward-ports:
icmp-blocks:
rich rules:
home
interfaces:
sources:
services: dhcpv6-client mdns samba-client ssh
ports:
masquerade: no
forward-ports:
icmp-blocks:
rich rules:
internal (active)
interfaces: eth2
sources: 192.168.1.0/24
services: mysql
ports:
masquerade: yes
forward-ports:
icmp-blocks:
rich rules:
public (default)
interfaces:
sources:
services: dhcpv6-client http ssh
ports:
masquerade: yes
forward-ports:
icmp-blocks:
rich rules:
trusted
interfaces:
sources:
services:
ports:
masquerade: no
forward-ports:
icmp-blocks:
rich rules:
work
interfaces:
sources:
services: dhcpv6-client ssh
ports:
masquerade: no
forward-ports:
icmp-blocks:
rich rules:
困っている点はeth2のmysqlへの送信元を192.168.1.0/24に絞ったにもかかわらず、localhostからmysqlにアクセスできてしまっているところです。
具体的にはmampを使って、phpからmysqlにつなげてデータを取得できてしまっています。
これは、firewalldの設定ミスですよね?
一体、どうすれば良いのでしょうか?
アドバイスよろしくお願いいたします。