I’m trying to to setup NAT tunelling on my NixOS server. My server has only one physical interface, which is pointed to the world. So I need to create a virtual network interface to define it as internal interface for NAT. My physical interface(let’s assume that it’s eth0) is defined as external interface.
So I’m wondering. how to create a virtual network interface in NixOS configs. I tried doing this way, but it didn’t gave any results:
nat0 = {
ipv4.addresses = [
{ address="10.10.10.3"; prefixLength=24; }
];
};
};
};