We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 55d8839 commit 0082653Copy full SHA for 0082653
client/main.go
@@ -186,4 +186,21 @@ func main() {
186
fmt.Printf("Failed to add iptables nat rule: %v\n", err)
187
os.Exit(ExitSetupFailed)
188
}
189
+
190
+ // Insert or replace iptables accept rule for host peer IP address,
191
+ // allowing only tunnel packets to be forwarded and routed
192
+ err = ipt.DeleteIfExists("filter", "DOCKER",
193
+ "-s", hostPeerIp,
194
+ "-j", "ACCEPT")
195
+ if err != nil {
196
+ fmt.Printf("Failed to delete iptables filter rule: %v\n", err)
197
+ os.Exit(ExitSetupFailed)
198
+ }
199
+ err = ipt.Insert("filter", "DOCKER", 1,
200
201
202
203
+ fmt.Printf("Failed to insert iptables filter rule: %v\n", err)
204
205
206
0 commit comments