Transfer files to/from windows server on aws (lightsail) - amazon-web-services

I created a windows server 2019 instance using lightsail. Using the rdp client on my home windows 10 machine, I am able to connect.
However, file transfer is disabled. I tried these instructions without success using both fileZilla and winSCP - mainly with SFTP with a downloaded private key.
Has anyone managed to connect and transfer files from these clients to a windows server instance? I would prefer a direct connection via FTP in case SFTP for Windows server requires the setup of a dedicated SFTP server to reduce costs.
By the way, I opened all protocols on the machine

In order to be able to transfer files, you need to install a FTP service and use a FTP client to be able to connect and exchange files.
You could use Filezilla for both.
You install the server.
Then you need to configure protocols specifications (use a certificate - you can generate one), users (with virtual path and local path).

Related

Visual Studio - connect to AWS instance via bastion server

I am developing some machine learning code and I just got an AWS instance for that. To access the instance, I need to
ssh from the local machine to a bastion server (which is also an AWS instance).
ssh from the bastion server to the development machine.
For development, I would like to attach Visual Studio to the remote machine. Is there a way for doing that? I tried adding a ~/.ssh/config file with the login credentials in the bastion server, but that does not change the available hosts listed by Visual Studio.
I think you need to use this plugin and follow this blog:
https://code.visualstudio.com/blogs/2019/10/03/remote-ssh-tips-and-tricks#_proxycommand
For a quick description, it will open a connection to the bastion in the background, and then it will connect to your development instance

proxy(?) server for connecting to cloud sql instance (GCP)

I have a postgresql database on the google cloud platform (cloud SQL). I'm currently managing this database through pgadmin, installed on my laptop. I've added the IP address of my laptop to the whitelist on the cloud sql settings page. This all works.
The problem is: when I go somewhere else and I connect to a different network, the IP address changes and I cannot connect to the postgresql database (through pgadmin) from my laptop.
Is there someone who knows a (secure) solution, involving a proxy server (or something else), to connect from my laptop (and only my laptop) to my postgresql database, even if I'm not on a whitelisted network (IP address)? Maybe I can set up a VM instance and install a proxy server and use this? But I have no clue where to start (or search for).
You have many options for connecting to a Cloud SQL instance from an external applications such a Public IP address with SSL, Public IP address without SSL, Cloud SQL proxy, etc. You can see all of them here.
Between all connection options there exists Cloud SQL Proxy, it basically provides secure access to your instances without the need for Authorized networks or configuring SSL on your part.
You only need to follow the steps listed here and you will be able to connect your Cloud SQL instance using the proxy.
Enable Cloud SQL Admin API on your console.
Install the proxy client on your local machine (Linux):
wget https://dl.google.com/cloudsql/cloud_sql_proxy.linux.amd64 -O cloud_sql_proxy
chmod +x cloud_sql_proxy
Determine how you will authenticate the proxy. You can use use a service account or let Cloud SDK take care of the authentication.
However, if required by your authentication method, create a service account.
Determine how you will specify your instances for the proxy. Your options for instance specification depend on your operating system and environment
Start the proxy using either TCP sockets or Unix sockets.
Take note that as of this writing, Cloud SQL Proxy does not support Unix sockets on Windows.
Update your application to connect to Cloud SQL using the proxy.

Unable to access sftp server directly from browser

I have created a sftp server for linux ec2 instance on aws. I have also mount the s3 bucket on linux using s3fs.
Now, any third party is able to access the sftp server using WinSCP. However, I am looking for the ways to access this server using browser url.
I have tried something like:
sftp://username:password#hostip
But it opens through the WinScp applocation and not through the browser directly.
Are they any ways to achieve it directly from browser?
skip the Linux layer and allow direct access to the bucket from the web
as described here
https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html

Cannot list or download files from AWS EC2 FTP server from Heroku app

I have an AWS EC2 instance acting an FTP server as described here:
https://www.xadmin.net/how-to-setup-ftp-on-aws-ec2-instance/
The EC2 instance has a security group with custom TCP rules to allow connections from any IP.
Connections via FileZilla and other FTP clients are successful.
I have a Spring Boot app that connects to this EC2 FTP server and it works locally. However, when deployed to Heroku, attempts at listing files or getting specific files hangs without any error.
The Spring Boot app uses the full public URL to the EC2 instance as the FTP host (ec2-xx-xxx-xxx-xxx.compute-1.amazonaws.com).
How do I allow the Heroku app to access the EC2 FTP server?
Most probably the server is misconfigured and sends its internal IP address in the FTP PASV command response.
While FileZilla and many other FTP clients can workaround that, Heroku probably cannot.
Check FileZilla log file for:
Server sent passive reply with unroutable address in FileZilla.
If this is the case, you will need to fix your FTP server.

Restrict access to Website/IP to specific OpenVPN client

I have a digitalocean droplet running Ubuntu 18.04.2 and nginx, and an API built with the Django Rest Framework on it. The specs of the project I'm working on require a VPN to be set up, so I've set up OpenVPN on the droplet. I've also generated a config file to send to the client that will be connecting to my API.
My API is currently still accessible by anyone who has the IP address and the username/password combination I've created. My question is: how can I configure my server/OpenVPN to allow access only to the client that I am going to give the configuration file to?