ansible-tunsafe icon indicating copy to clipboard operation
ansible-tunsafe copied to clipboard

Direction on how to edit hosts file

Open NamamiShanker opened this issue 1 year ago • 1 comments

Hello devs! Thanks for making this playbook. I am trying to set up a TunSafe VPN server on an AWS EC2 instance. I am having difficulty understanding and editing the hosts, Specifically the lines:

[tunsafe]
#Pick and adjust ONE of the three connection string options listed below.

#Option 1 - Uncomment and adjust the example below when using password-based auth to connect to your server
#123.123.123.123 ansible_user=demo ansible_password=P@$$w0rd

#Option 2 - Uncomment and adjust the example below when using key based auth to connect to your server
#123.123.123.123 ansible_user=namami_tunsafe ansible_ssh_private_key_file=/home/namami_tunsafe/.ssh/privkey.pem

#Option 3 - Uncomment and use the example below when running Ansible locally on the server.
#127.0.0.1 ansible_connection=local

My questions are:

  1. Does this playbook create a TunSafe VPN server?
  2. I currently connect to my EC2 instance with a privatekey.pem file. That file is located on my laptop which is the client, not on the server. So do I need to scp my private key to the server. Also, should the IP address be replaced by external IP of my EC2 instance?

NamamiShanker avatar Mar 28 '23 17:03 NamamiShanker

Hi,

  1. Yes
  2. No, never copy your privatekey to the server, only the public key. Yes, the IP address needs to be replaced by the external IP of your EC2 instance.

Freekers avatar May 01 '23 08:05 Freekers