Skip to content

Commit b9979d1

Browse files
committed
Enable 'loose' reverse-path filter mode on the container ingress network (and bump to v3.1.0)
1 parent 8a1ad26 commit b9979d1

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ For service container nodes:
2121
3. Map any connection mark on reverse path traffic to a firewall mark on the individual packets
2222
4. Create a custom routing table for each load-balancing node/TOS value/connection mark value/firewall mark value.
2323
5. Select which custom routing table to use, according to the firewall mark on the outgoing packet.
24+
6. Enable 'loose' reverse-path filter mode on the container ingress network interface.
2425

2526
The daemon must be run on both load-balancer nodes and nodes running service containers, but the ingress network IPs of all nodes intended to be used as load-balancers must be specified using `--ingress-gateway-ips` as a launch-time argument.
2627

docker-ingress-routing-daemon

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/bash
22

3-
VERSION=3.0.1
3+
VERSION=3.1.0
44

5-
# Ingress Routing Daemon v3.0.1
5+
# Ingress Routing Daemon v3.1.0
66
# Copyright © 2020-2021 Struan Bartlett
77
# ----------------------------------------------------------------------
88
# Permission is hereby granted, free of charge, to any person
@@ -279,6 +279,10 @@ docker events \
279279
# 3. Map any connection mark on outgoing traffic to a firewall mark on the individual packets.
280280
nsenter -n -t $NID iptables -t mangle -A OUTPUT -p tcp -j CONNMARK --restore-mark
281281

282+
# 3.1 Enable 'loose' rp_filter mode on interface $CIF (and 'all' as required by kernel
283+
# see https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt)
284+
nsenter -n -t $NID sysctl net.ipv4.conf.all.rp_filter=2 net.ipv4.conf.$CIF.rp_filter=2
285+
282286
for NODE_IP in $INGRESS_NODE_GATEWAY_IPS
283287
do
284288
NODE_ID=$(echo $NODE_IP | cut -d'.' -f4)

0 commit comments

Comments
 (0)