update DNAT routing rules

maisem/egress
Rhea Ghosh 2023-06-30 12:56:20 -05:00
parent 731fecf3af
commit 2637f93cff
No known key found for this signature in database
GPG Key ID: 8EA580B19AD96EF8
1 changed files with 1 additions and 1 deletions

View File

@ -515,7 +515,7 @@ func installEgressForwardingRule(ctx context.Context, dstStr string) error {
// Technically, if the control server ever changes the IPs assigned to this
// node, we'll slowly accumulate iptables rules. This shouldn't happen, so
// for now we'll live with it.
cmd := exec.CommandContext(ctx, argv0, "-t", "nat", "-I", "PREROUTING", "1", "-i", "!tailscale0", "-j", "DNAT", "--to-destination", dstStr)
cmd := exec.CommandContext(ctx, argv0, "-t", "nat", "-I", "PREROUTING", "1", "!", "-i", "tailscale0", "-j", "DNAT", "--to-destination", dstStr)
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
if err := cmd.Run(); err != nil {