!tCyGickeVqkHsYjWnh:nixos.org

NixOS Networking

908 Members
Declaratively manage your switching, routing, wireless, tunneling and more.272 Servers

Load older messages


SenderMessageTime
10 Jun 2021
@rager:synapse.lickmy.appragerhi - anybody dealt with networking with the in-tree kubernetes service?23:24:37
11 Jun 2021
@joerg:bethselamin.deMic92 (Old)@rager: sort of07:54:47
@kraynyan:tchncs.dekraynyan joined the room.09:35:47
@zarel_it:matrix.orgzarel joined the room.10:51:30
@rushmore:matrix.orgrushmore joined the room.14:12:13
12 Jun 2021
@rager:synapse.lickmy.appragerwas trying to use nixos as a router but add k8s16:41:40
@rager:synapse.lickmy.appragerat least the native nat setup can't route into services, just pods - is a problem of ordering of iptables rules?16:42:27
@rager:synapse.lickmy.appragerconfiguration.network.nat16:42:58
@keithy:matrix.orgkeithy joined the room.17:24:53
@keithy:matrix.orgkeithyI have just upgraded to 21.05 and on reboot network-setup is failing with network-setup-start[1654]: Error: Nexthop has invalid gateway.17:25:53
@keithy:matrix.orgkeithyIt seems to work when I manually start it17:26:05
@keithy:matrix.orgkeithyI'm a bit puzzled17:26:32
@keithy:matrix.orgkeithywondered if anyone has any ideas17:26:42
@tnias:stratum0.orgtnias joined the room.17:32:31
@joerg:bethselamin.deMic92 (Old)
In reply to @rager:synapse.lickmy.app
was trying to use nixos as a router but add k8s
I also disabled the firewall. You need to whitelist all incoming ports at least like the api server.
17:38:21
@rager:synapse.lickmy.appragersince it's also my router, I'm going to stick with the firewall for now - problem seems to be that by the time the rules run that forward nat traffic, the tables that route k8s services seem to have already been evaluated17:40:49
@joerg:bethselamin.deMic92 (Old)I rage quitted debugging k8s firewall rules. They go beyond my understanding :)17:41:39
@rager:synapse.lickmy.appragerI'm not far from there17:42:03
@joerg:bethselamin.deMic92 (Old)I guess that's why people just put k8s in another container17:42:04
@rager:synapse.lickmy.appragerput it in a VM, and I can see that making sense17:42:17
@rager:synapse.lickmy.appragerelse, it's all the same kernel17:42:23
@rager:synapse.lickmy.apprageror is namespace enough to make the rules happen when you "want" them to?17:43:12
@joerg:bethselamin.deMic92 (Old)I now how to write network drivers or extend systemd-networkd but I don't understand k8s firewall rules :)17:43:24
@joerg:bethselamin.deMic92 (Old)
In reply to @rager:synapse.lickmy.app
or is namespace enough to make the rules happen when you "want" them to?
yes, a network namespace should be sufficient.
17:43:42
@rager:synapse.lickmy.apprager

I think my iptables issue comes down to these two snippets:

-N nixos-nat-pre
-A PREROUTING -m comment --comment "kubernetes service portals" -j KUBE-SERVICES
-A PREROUTING -j nixos-nat-pre

and

-A nixos-nat-pre -i eno1 -p tcp -m tcp --dport 6666 -j DNAT --to-destination 10.10.142.1:22
-A nixos-nat-pre -i eno1 -j DNAT --to-destination 10.0.0.75

(context: https://hastebin.com/ijusozofeb.yaml)

22:49:47
@rager:synapse.lickmy.appragerthough I'm not sure what happens after a packet gets dnat'd to an ip that corresponds to an device on the same host22:50:33
@rager:synapse.lickmy.appragerbecause I'm real bad at iptables22:50:44
@casey:hubns.netcasey ©the thing i missed most going from a bsd universe to linux, lack of pf.23:14:56
@rager:synapse.lickmy.appragerok... I got it to work23:38:48
@rager:synapse.lickmy.appragerstep 1: don't configure anything from nixos any more23:39:03

Show newer messages


Back to Room ListRoom Version: 6