!tCyGickeVqkHsYjWnh:nixos.org

NixOS Networking

911 Members
Declaratively manage your switching, routing, wireless, tunneling and more.273 Servers

Load older messages


SenderMessageTime
16 Aug 2021
@schnecfk:ruhr-uni-bochum.deCRTifiedAnd I don't have enough time right now to test it on the real hardware, as there's a somewhat urgent deadline coming 🤐21:22:43
@matthewcroughan:defenestrate.itmatthewcroughan - nix.zoneIs it possible for anyone to tell me how to port forward?23:15:28
@matthewcroughan:defenestrate.itmatthewcroughan - nix.zoneI'm trying to provide someone access to a libvirt vm that is using the default nat interface. This would be great, since then the person I'm giving access to this VM wouldn't be able to snoop around my network.23:16:03
@matthewcroughan:defenestrate.itmatthewcroughan - nix.zoneI was hoping I could do it entirely in the libvirt xml config, but can someone tell me how to set it up in Nix code, since I don't want to manually be playing with iptables!23:16:27
@matthewcroughan:defenestrate.itmatthewcroughan - nix.zoneSo I want to port forward: 192.168.3.4:2222 -> 192.168.122.x:222223:19:32
@schnecfk:ruhr-uni-bochum.deCRTified
In reply to @matthewcroughan:defenestrate.it
So I want to port forward: 192.168.3.4:2222 -> 192.168.122.x:2222
Probably networking.nat.forwardPorts?
23:25:12
@matthewcroughan:defenestrate.itmatthewcroughan - nix.zoneis that the only option I need to set?23:25:20
@matthewcroughan:defenestrate.itmatthewcroughan - nix.zone * is that the only option I need to set and use?23:25:22
@matthewcroughan:defenestrate.itmatthewcroughan - nix.zone what about .enable .internalIPs and externalInterface? 23:25:38
@schnecfk:ruhr-uni-bochum.deCRTifiedYou'll probably need to enable nat, too23:25:38
@schnecfk:ruhr-uni-bochum.deCRTifiedOh yes, at least ne internal and 3xternql interfaces should be set23:25:59
@schnecfk:ruhr-uni-bochum.deCRTified* Oh yes, at least the internal and external interfaces should be set23:26:12
@matthewcroughan:defenestrate.itmatthewcroughan - nix.zoneIs it possible for me to lock myself out of the machine?23:26:28
@schnecfk:ruhr-uni-bochum.deCRTified(Sorry, on mobile/in bed already)23:26:33
@schnecfk:ruhr-uni-bochum.deCRTified
In reply to @matthewcroughan:defenestrate.it
Is it possible for me to lock myself out of the machine?
Yes, definitely
23:26:41
@matthewcroughan:defenestrate.itmatthewcroughan - nix.zone I wish nixos-rebuild test had a --rollback-timer option :D 23:26:53
@schnecfk:ruhr-uni-bochum.deCRTified
In reply to @matthewcroughan:defenestrate.it
I wish nixos-rebuild test had a --rollback-timer option :D
Shouldn't that be doable? One-shot systemd timer in a different root config? 🤔
23:28:05
@matthewcroughan:defenestrate.itmatthewcroughan - nix.zonedeploy-rs does it, somehow 23:28:18
@eyjhb:eyjhb.dkeyJhbNixus ;)23:35:37
17 Aug 2021
@putch4r:matrix.orgputchar joined the room.09:51:02
@nixinator:nixos.devnixinator
In reply to @matthewcroughan:defenestrate.it
I wish nixos-rebuild test had a --rollback-timer option :D
`nixos-rebuild switch; sleep 60; nixos-rebuild switch --rollback" :-)
11:25:02
@nixinator:nixos.devnixinator
In reply to @matthewcroughan:defenestrate.it
I wish nixos-rebuild test had a --rollback-timer option :D
* nixos-rebuild switch; sleep 60; nixos-rebuild switch --rollback :-)
11:25:15
@nixinator:nixos.devnixinatoryou may have to nohup that if you loose your shell connection.11:25:48
@nixinator:nixos.devnixinatorif you don't want the complexities of nat translation you can socat, ncat,goproxy and all sorts of other tcp forwarding goodies, some also have cool features :-)11:35:45
@nixinator:nixos.devnixinatoryou'll probably loose a slight bit of performance as it's not in kernel, but depends what your loads are.11:42:11
@schnecfk:ruhr-uni-bochum.deCRTified
In reply to @matthewcroughan:defenestrate.it
Is it possible for me to lock myself out of the machine?
Didn't properly think about this. It depends on how you access the machine. Messing with networking can easily lock you out of SSH or other network-based administration options, but if you're at the machine (i.e. keyboard/mouse/screen or UART or something similar), it's hard to not be able to fix it
11:45:48
@nixinator:nixos.devnixinatornetworking, there a lot to think about, more developers than you care to think about don't understand it, especially the lower layers... but thats the beauty of abstractions, you don't have to understand what they are doing :-)13:03:45
@eyjhb:eyjhb.dkeyJhbAlso recommend looking at nftables instead of iptables. I still do suck at it, but there are some experts in here, as well as some people in #netfilter on Libera that are very nice! 15:28:26
@hexa:lossy.networkhexaI do love ferm, but it's "stuck" with iptables15:52:22
@hexa:lossy.networkhexaIt has the most convenient syntactic sugar15:52:45

Show newer messages


Back to Room ListRoom Version: 6