-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NAT module: allow hot rules replace after nixos-rebuild switch
#15815
Conversation
Without "default.target" your NAT settings won't be applied on normal `nixos-rebuild switch`, you have to manually restart nat service.
By analyzing the blame information on this pull request, we identified @wkennington, @edolstra and @lethalman to be potential reviewers |
The real question is why do we have a |
@edolstra I cannot confirm that reloading is working when firewall enabled. I'm using this declarative container for test:
After I change
This can be fixed by
+1, it is kind of confusing for newbies that nat and firewall are same thing. Also, it would simplify switch to |
Is that on master or 16.03? I tried on 16.03 and it seemed to work. |
I'm on 16.03 too |
Unfortunately I am not able to write test that involves |
@edolstra I have more information on this subject, wrt firewall. When I change option When I disable firewall with But when I enable firewall again with After I manually All tests I'm doing in container. |
Seems like
I think, I should review my PR once more and better understand the difference between |
|
Closing this PR because now I think it's too hackish solution. The root problem is somewhat related to |
I was playing with NAT module and suddenly realized, that nothing changes whatever options I set. Port forwarding didn't work. I checked
iptables -t nat -L
--- it was empty for this configuration:After a bit of struggle and couple of lost hours I added locally this line:
Now I can change nat rules in configuration.nix and they are correctly applied after
switch
.