...
yum install fail2ban cockpit cockpit-machines python3 make git-core
Server config based on:
Data Replication between servers https://www.programmersought.com/article/92226036787/
Virtual machine hosting https://www.tecmint.com/install-kvm-on-ubuntu/
cockpit https://www.techrepublic.com/article/how-to-enable-cockpit-on-centos-8/ , https://www.tecmint.com/manage-kvm-virtual-machines-using-cockpit-web-console/
firewalld https://www.liquidweb.com/kb/how-to-start-and-enable-firewalld-on-centos-7/
...
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]
}
}
} |