Is it possible to create VM with NAT Interface?

bahaaza

Cadet
Joined
Mar 7, 2023
Messages
1
The version I am using is TrueNAS-SCALE-22.12.1
I have one physical network interface with public static IP on it and I am using a default ip4 gateway suitable to my static IP.

Is there a way to create a NAT interface over my physical and then attach it to the virtual machine?
I tried a few things without success I can't access the internet from the VM.

I hope that my question is clear I am not sure how to explain what I am looking for because this feature is working by default on Ubuntu KVM,
and I am not sure what is the default network configuration there.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
First point would be to understand if you really mean "public IP"?

TrueNAS isn't a product that should be exposed directly to the public Internet.

If you have the intention to create a virtual switch (called a bridge in TrueNAS) and attach your VM to that on a different subnet (a private one) to the host, then use the host to route and/or NAT to/from that subnet... yes it can be done.

I don't think there's a great number of step-by-step guides out there for that as it's really an edge case (even completely discouraged if you're talking about the host on the Internet directly).
 
Top