I have a Ubuntu server which needs to only do the following:
Allow SSH access from me. I'm thinking of using a combination of private key + password for this. I would mainly be pulling code from Github and updating software on the server. The solution for this seems to be AuthenticationMethods.
Allow connections to an external RabbitMQ server. (There would be a local node app connecting to the RabbitMQ server).
Allow connections to an external MongoDB database. (There would be a local node app connecting to the MongoDB database).
All other connections should be blocked.
How can I accomplish this?
Thank you.
Put a firewall, allow only:
rabbitmq-ip:rabbitmq-port
mongodb-ip:mongodb-port
all-ips:ssh-port
And use a private key for SSH. This way, you can use that key for SSH connections and only people who have that key can do SSH to the server.
You also have to use SSH for git pulls as this configuration does not allow HTTPS connections to the server.