Skip to content

Static IPs for jails #24

Answered by spusuf
spusuf asked this question in Q&A
Aug 13, 2023 · 6 comments · 22 replies
Discussion options

You must be logged in to vote

Here's how to run Static IPs for jails/containers WITHOUT using bridges. This is identical to the behavior of TrueNAS Core's jails when a Static IP is set.

Add --network-macvlan=eno1 --resolv-conf=bind-host to user flags either during creation or after by editing the config.
Run nano /etc/systemd/network/mv-dhcp.network (you will need to install the nano editor, or you can use a remote file browser like WinSCP to edit the file manually).
Change the contents to:

[Match]
Virtualization=container
Name=mv-*

[Network]
DHCP=false
Address=192.168.X.X/24 
Gateway=192.168.X.X

Remembering to replace the X's with your desired IP and Gateway's (Router) IP. For an example it was Address=192.168.1.10 G…

Replies: 6 comments 22 replies

Comment options

You must be logged in to vote
4 replies
@spusuf
Comment options

@Jip-Hop
Comment options

@Jip-Hop
Comment options

@spusuf
Comment options

Comment options

You must be logged in to vote
5 replies
@spusuf
Comment options

@Lockszmith-GH
Comment options

@Lockszmith-GH
Comment options

@spusuf
Comment options

@Lockszmith-GH
Comment options

Comment options

You must be logged in to vote
3 replies
@ghost
Comment options

@spusuf
Comment options

@Jip-Hop
Comment options

Answer selected by spusuf
Comment options

You must be logged in to vote
7 replies
@Jip-Hop
Comment options

@Jip-Hop
Comment options

@spusuf
Comment options

@Jip-Hop
Comment options

@spusuf
Comment options

Comment options

You must be logged in to vote
3 replies
@Jip-Hop
Comment options

@spusuf
Comment options

@mrstux
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants