VM networking

bfudn

Dabbler
Joined
Dec 2, 2021
Messages
13
Hi,

I need a little help in how to setup networking for my VM :
  • NAT : the VM have to connect to internet
  • PAT : VM run some services (http...) that need to be reach from internet
My truenas scale host have one physical network card "eno1" connect to internet with public ip.

Thanks,
 

willis936

Cadet
Joined
Dec 4, 2021
Messages
6
I'm also having this issue. I would like to replicate the behavior of a "NAT" NIC in VM host software in TrueNAS SCALE. I've played around with different hierarches of VLAN and bridge interfaces, but I'm not getting closer.
 

bfudn

Dabbler
Joined
Dec 2, 2021
Messages
13
What ever change i made to network (add bridge, vlan...) and test them, they are not apply ?
No error message ?

Very frustating and no doc available
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
After clicking on "test" you need to click on "save" after the UI reloaded. This is a safety measure intended to prevent locking yourself out of the UI.
 

bfudn

Dabbler
Joined
Dec 2, 2021
Messages
13
i will reply in this thread.

i don't see the "save" popup so i think the config was wrong and truenas rollback to previous config ?
 

bfudn

Dabbler
Joined
Dec 2, 2021
Messages
13
well, i'm an idiot. I just understrand that i've 60 second to reconnect to UI to prove Truenas the new settings are working ?

so i made br0 dhcp with eno1 member, but the dhcp reservation are from MAC address which seems to be different in the br0
so truenas rollback.

when i force ip static address, i can reconnect to the new one and valid changes.
 

bfudn

Dabbler
Joined
Dec 2, 2021
Messages
13
so i know understand how the change process work.

what config i must to set for my VM have internet access ?

very thanks
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
I just noticed - are you running TrueNAS SCALE? Not CORE? In that other thread I was discussing CORE. I don't have a clue how networking in KVM as opposed to bhyve is supposed to work. Also the multiple steps I outlined to configure the bridge and VLAN interface apply to CORE, not SCALE. These are fundamentally different products, folks!
 
Last edited:

bfudn

Dabbler
Joined
Dec 2, 2021
Messages
13
I run truenas scale for docker reasons (later) but now i need to use VM.

VM will use their own private network and i suppose a need some routing in order things work correctly. But i don't know how to do it with truenas.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Sorry, in that case I cannot help you. You first joined the thread about bhyve and networking. I don't know KVM at all.
 

bfudn

Dabbler
Joined
Dec 2, 2021
Messages
13
In truenas : how to config routing for VM which are in a private (ie: 192.168.0x) can access internet using the bridge in public an ip like 141.x.x.x ?


At last, very thanks for your help
 
Top