diff options
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/host/default.nix | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/modules/host/default.nix b/modules/host/default.nix index 94a44b4..e2421c0 100644 --- a/modules/host/default.nix +++ b/modules/host/default.nix @@ -310,13 +310,19 @@ ${lib.concatMapStrings (u: '' flags interval } '') userNames} + # Before the host's own NAT rules (which are for connections to the + # host, like a redirect of some port to its sshd), so they don't get + # applied to the guests' connections: the first NAT a connection gets + # is the only one, so everything else gets a NAT that changes + # nothing. chain prerouting { - type nat hook prerouting priority dstnat; + type nat hook prerouting priority dstnat - 1; iifname "fcbr0" tcp dport 443 redirect to :${toString proxyPort} + iifname "fcbr0" meta nfproto ipv4 meta l4proto { tcp, udp } dnat ip to ip daddr } chain postrouting { - type nat hook postrouting priority srcnat; + type nat hook postrouting priority srcnat - 1; iifname "fcbr0" masquerade } |
