Find out how to install Home assistant (supervised) from scratch on UBUNTU as virtual machine using the KVM Hypervisor.
Commands:
ifconfig
sudo iptables -I FORWARD -o virbr0 -d 192.168.122.242 -j ACCEPT
sudo iptables -t nat -I PREROUTING -p tcp --dport 80 -j DNAT --to 192.168.122.242:8123
- virbr0 = Virtual interface name (Gateway)
- 192.168.122.242 = Virtual Machine IP Address
- 80 = incoming port (80 is the standard web port)
- 192.168.122.242:8123 = Home Assistant Virtual Machine Address + :8123 –
NOTE: You’ll need this command for any additional ports you need forwarded eg (1883, 1884, 8883, 8884 for MQTT)
*** IF YOU WANT TO MAKE THE IPTABLES RULES PERMANENT, RUN THE FOLLOWING ***
sudo iptables-save
Music: https://www.bensound.com
Video: Free Stock Video Footage by Videezy!