Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

yum install fail2ban cockpit cockpit-machines python3 make git-core

Server config based on:

...

Code Block
<network>
  <name>default</name>
  <uuid>aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeee</uuid>
  <forward mode='nat'/>
  <bridge name='virbr0' stp='on' delay='0'/>
  <mac address='XX:XX:XX:XX:XX:XX'/>
  <domain name='default'/>
  <ip address='AAA.BBB.CCC.DDD' netmask='255.255.255.0'>
  </ip>
 <dhcp>
      <range start='AAA.BBB.CCC.DDD' end='AAA.BBB.CCC.DDD'/></network>

Qemu Hooks

https://forums.centos.org/viewtopic.php?f=50&t=71454&start=10

make the hook tool

Code Block
cd /usr/local/src
git clone https://github.com/saschpe/libvirt-hook-qemu.git
cd libvirt-hook-qemu
make install
rm -rf libvirt-hook-qemu

make the hook config

vi /etc/libvirt/hooks/hooks.json

Code Block
{
    "k3OS": {
        "interface": "my-bridge-name",           
        "private_ip": "A.B.C.D",   // IP of the VM
       

...

 "port_map": {
            "tcp": [[5022,22]] // port mapping
        }
    },
    "linux.2.1": {
        "interface": "my-bridge-name",
        "private_ip": "A.B.C.D",   // IP of the VM
       

...

 "port_map": {
            "tcp": [[1022,22]]
        }
    },
    "OPNsense.2.1": {
        "interface": "my-bridge-name",         
        "private_ip": "A.B.C.D",   // IP of the VM
       

...

 "port_map": {
            "tcp": [80,443,4443]
        }
    },
    "Windows": {
        "interface": "my-bridge-name",           
        "private_ip": "A.B.C.D",   // IP of the VM
        "port_map": {
            "tcp": [1433,3389]
        }
    }
}