Since I received a email warning letter from google says "Action required: Critical problem with My First Project" saying my server has some abnormal outgoing activity , I tried to implemented ufw in my debian server.
For my ufw setting, I've done the following:
sudo ufw default deny incoming
sudo ufw default deny outgoing
sudo ufw allow ssh
sudo ufw allow 22
sudo ufw allow http
sudo ufw allow https
After I restart my server , I can't connect to my server with the error "Connection Failed: We are unable to connect to the VM on port 22. Learn more about possible causes of this issue."
I tried the answer I found in this forum : Google cloud unable to connect to the VM on port 22
I followed the following instruction but it still not working:
- Shut down the instance
- Click 'Edit' for the instance
- Under 'Custom Metadata' section, add 'startup-script' key, with value:
#! /bin/bash
sudo ufw allow 22
- Click 'Save'
Can anyone help, I'll be appreciate!