How to use one host server public IP to access multiple guest VMs?

taken from https://www.systutorials.com/port-forwarding-using-iptables/

to port forward from public IP to local one for VM1:

# iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 30334 -j DNAT --to 192.168.122.101:30334
# iptables -A FORWARD -p tcp -d 192.168.122.101 --dport 30334 -j ACCEPT

This example assumes local and remote port both are 30334 and public interface name is eth0.