---
# System prepended metadata

title: virtualbox tips
tags: [' ssh', ' smx', ' virtualbox', ' hacks', M7]

---

---
title: virtualbox tips
tags: M7, hacks, virtualbox, smx, ssh 
description: View the slide with "Slide Mode".
slideOptions:
  spotlight:
    enabled: true
---
# Virtualbox i Nat Network

TLDR: (a la màquina virtual)
```
sudo rm /etc/machine-id && sudo systemd-machine-id-setup
```
https://www.thegeekdiary.com/centos-rhel-7-how-to-change-the-machine-id/
- si treballes amb virtualbox :face_with_one_eyebrow_raised: i vols "easy-peasy" networking, te cal "crear un nou machine-id" peer facilitar-li la vida al dhcpserver de virtualbox

un exemple de xarxa nat amb reenviament de ports :face_with_hand_over_mouth: 
```
VBoxManage natnetwork add --netname nextcloudnet --network 10.19.100.0/24 --enable --dhcp on
VBoxManage natnetwork modify --netname nextcloudnet --port-forward-4 "ssh1:tcp:[]:30022:[10.19.100.4]:22"
VBoxManage natnetwork modify --netname nextcloudnet --port-forward-4 "ssh2:tcp:[]:31022:[10.19.100.5]:22"
VBoxManage natnetwork modify --netname nextcloudnet --port-forward-4 "http:tcp:[]:30080:[10.19.100.4]:80"
```
