Multiple ports in "iocage create ....... nat_forwards="tcp(XX:XX)........

thxtex

Dabbler
Joined
Dec 8, 2017
Messages
27
In a jail I have added several port forwardings.

nat_forwards.png



Can I do the same in when creating the jail?

Code:
iocage create my_jail ......... nat_forwards="tcp(9000:9000) ........"


Can't seem to find any examples with several ports being forwarded.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Do an iocage get nat_forwards <jailname> on that jail with the port forwards created in the UI and probably you shall be enlightened :wink:

Any specific reason to use NAT and port forward instead of VNET and bridging?
 
Last edited:

thxtex

Dabbler
Joined
Dec 8, 2017
Messages
27
Do an iocage get nat_forwards <jailname> on that jail with the port forwards created in the UI and probably you shall be enlightened :wink:

Any specific reason to use NAT and port forward instead of VNET and bridging?
Thanks, that worked. Think even I was close but had spaces in the list.

I just moved to a new server. On the previously setup I used static IP’s on each jail which has been worked well for several years.
Setting up the new box I tested a few plugins and noticed that they use NAT, so I went for that approach this time.
Maybe I will regret in a few months.
Event though I have been running Core for several years I’m still in learning phase, but the above is what I understood with your question.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Thanks, that worked. Think even I was close but had spaces in the list.
What is the syntax then, please? I don't run any NAT jail.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
For jails there is a 1:1 mapping of UI to iocage settings. You can do anything offered in the UI in iocage. Not the other way round, because some iocage features are missing in the UI.
 

thxtex

Dabbler
Joined
Dec 8, 2017
Messages
27
For jails there is a 1:1 mapping of UI to iocage settings. You can do anything offered in the UI in iocage. Not the other way round, because some iocage features are missing in the UI.
Yes, this was also my approach. Check what setting a plugin would set in the UI and then figure out the corresponding iocage option.
 
Top