0

My current network has the following logic. Each router has a public IP.

Router 1
192.168.0.1
255.255.255.0

Router 2
192.168.0.2
255.255.255.0

Server 1
192.168.0.7
255.255.255.0

I want to configure BIND to work with both public IPs, but has worked only with one. My question is whether this depends on Network configuration or Bind configuration and how to configure.

ifcfg-eth0

DEVICE=eth0
HWADDR=00:0A:E6:76:F5:06
TYPE=Ethernet
UUID=2d5ca15c-c32d-45f2-9522-19a679a8f909
ONBOOT=yes
NETWORKING=yes
NM_CONTROLLED=yes
BOOTPROTO=static
IPADDR=192.168.0.7
NETMASK=255.255.255.0
GATEWAY=192.168.0.1

ifcfg-eth0:0

DEVICE=eth0:0
TYPE=Ethernet
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.0.8
NETMASK=255.255.255.0
GATEWAY=192.168.0.2

named.conf

...
options {
        listen-on port 53 { any; };
        listen-on-v6 port 53 { any; };
        directory       "/var/named";
        dump-file       "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
        allow-query     { any; };
        recursion no;
        allow-recursion { none; };
};
...

1 Answer 1

0

Solved with the following commands:

ip route add 192.168.0.0/24 dev eth0 src 192.168.0.7 table rt1
ip route add 192.168.1.0/24 dev eth0:0 src 192.168.1.8 table rt2

ip route add default via 192.168.0.1 table rt1
ip route add default via 192.168.1.1 table rt2

ip rule add from 192.168.0.7 table rt1
ip rule add from 192.168.1.8 table rt2

Detail: I changed the default network address of router 2.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .