I have a firewall that has 3 IP aliases on 1 physical interface. Packets get dropped between these 3 interfaces (either ICMP, HTTP, or anything else). We tracked it down to these packets being marked INVALID in the FORWARD rule and dropped due to the this rule:
chain FORWARD {
policy DROP;
# connection tracking
mod state state INVALID LOG log-prefix 'INVALID FORWARD DROP: ';
mod state state INVALID DROP;
mod state state (ESTABLISHED RELATED) ACCEPT;
}
(That is, we see the INVALID FORWARD DROP
logs in dmesg
)
What could be causing this?
The
INVALID
state means that the packet is not associated with a known connection (and isn't starting a new connection either). The only reasons I can think of is that something is clearing the connection tracking table, the table is overflowing, or the entries are timing out too quickly. You can check the size of the connection tracking table withsudo conntrack -L | wc -l
and the maximum number of entries withcat /proc/sys/net/netfilter/nf_conntrack_max
.Use macvlan in bridge mode instead of IP aliases and keep the physical interface in promisc mode.
e.g.
Refer below sequence for creating a macvlan interface.
Refer below command to make promisc mode on for eno2