Hi all, I am currently working on load balancer project for DNS. For now the Direct Server Return are working well. But I really want to try to make this as a HA cluster setup. For now the setup is as bellow
LB config
EM0: 10.10.10.1
EM1: 192.168.0.1
CARP:172.16.0.1 (MASTER)
DNS1 config
EM0: 10.10.10.2
EM1: 192.168.0.2
CARP:172.16.0.1 (BACKUP)
DNS2 config
EM0: 10.10.10.3
EM1: 192.168.0.3
CARP:172.16.0.1 (BACKUP)
Note: all EM1 port for each server are connected to a private network switch.
My PF configs are as below:
This config works.. but I want to try to make all the server to be LB/DNS HA cluster.
For now I try to add server1 (LB itself ) into the route-to rules but once I reload and try making a query to (VIP 172.16.0.1), It will work for all outside server, but once it reach it self it like there is a loop and the server itself just crash. I have to hard reset the server.
Do I have to do something.. about the rule so that the current LB server also can works as a DNS server too. I am quite noob in this area.
and Thanks for all helps.
Code:
Client
|
|
LB<------|
|
|
DNS1<---------|-----------> DNS2
LB config
EM0: 10.10.10.1
EM1: 192.168.0.1
CARP:172.16.0.1 (MASTER)
DNS1 config
EM0: 10.10.10.2
EM1: 192.168.0.2
CARP:172.16.0.1 (BACKUP)
DNS2 config
EM0: 10.10.10.3
EM1: 192.168.0.3
CARP:172.16.0.1 (BACKUP)
Note: all EM1 port for each server are connected to a private network switch.
My PF configs are as below:
Code:
#server1="192.168.0.1"
server2="192.168.0.2"
server3="192.168.0.3"
pass in quick on em0 route-to { (em1 $server2), (em1 $server3) } round-robin \
proto { udp, tcp } from any to 172.16.0.1 port 53 keep state
pass in all
pass out all keep state
This config works.. but I want to try to make all the server to be LB/DNS HA cluster.
For now I try to add server1 (LB itself ) into the route-to rules but once I reload and try making a query to (VIP 172.16.0.1), It will work for all outside server, but once it reach it self it like there is a loop and the server itself just crash. I have to hard reset the server.
Do I have to do something.. about the rule so that the current LB server also can works as a DNS server too. I am quite noob in this area.
and Thanks for all helps.