Switched to nftables, modified the default SSH port and removed fail2ban
This commit is contained in:
@@ -21,14 +21,14 @@ printf '%s\n' '#cloud-config' 'runcmd: ["ssh-import-id gh:hectorm"]' > "${USERDA
|
||||
cloud-localds "${USERDATA_DISK:?}" "${USERDATA_YAML:?}"
|
||||
|
||||
# Remove keys from the known_hosts file
|
||||
ssh-keygen -R '[127.0.0.1]:2222'
|
||||
ssh-keygen -R '[localhost]:2222'
|
||||
ssh-keygen -R '[127.0.0.1]:1122'
|
||||
ssh-keygen -R '[localhost]:1122'
|
||||
|
||||
# Launch VM
|
||||
kvm \
|
||||
-smp 1 -m 512 \
|
||||
-nographic -serial mon:stdio \
|
||||
-device e1000,netdev=n0 \
|
||||
-netdev user,id=n0,hostfwd=tcp::2222-:22,hostfwd=udp::51820-:51820 \
|
||||
-netdev user,id=n0,hostfwd=tcp::1122-:122,hostfwd=udp::51820-:51820 \
|
||||
-drive file="${SNAPSHOT_DISK:?}",if=virtio,format=qcow2 \
|
||||
-drive file="${USERDATA_DISK:?}",if=virtio,format=raw
|
||||
|
Reference in New Issue
Block a user