I'm having a default DROP
policy on the INPUT
and OUTPUT
chain configured for iptables and I am trying to configure proper iptables rules for two servers that mirror data via drbd.
The resource configuration:
resource data {
on data001 {
device /dev/drbd0;
disk /dev/mapper/vg--system-data;
meta-disk internal;
address 10.0.0.10:7788;
}
on data002 {
device /dev/drbd0;
disk /dev/mapper/vg--system-data;
meta-disk internal;
address 10.0.0.11:7788;
}
}
For iptables, the following rules are set on both drbd nodes:
-A INPUT -p tcp -s 10.0.0.10 --sport 7788 -j ACCEPT
-A OUTPUT -p tcp -d 10.0.0.10 --dport 7788 -j ACCEPT
-A INPUT -p tcp -s 10.0.0.11 --sport 7788 -j ACCEPT
-A OUTPUT -p tcp -d 10.0.0.11 --dport 7788 -j ACCEPT
However, drbd cannot properly set up a connection between the hosts. Updating the default policies on both hosts to ACCEPT
works as expected.