How to allow metabase work with instance IP on Linux - linux

I am relatively new to AWS and metabase. I am trying to setup metabase with AWS EC2 instance. I have been able to spin up the instance and ssh into the server from my local linux machine. I also tried http://localhost:3000/ and was able to access metabase homepage but now I want to use the EC2 instance public IP in this format: http://ec2ip:3000/ but it is not going through.
I have followed the following steps:
make sure the port 3000 is not blocked by the firewall
Ensured port is open in the inbound rules
Added port 3000 to my ufw locally.
But still I cannot access metabase home page from http://ec2ip:3000/. Please advise on how I can salvage the situation.
Thank you.

Related

Cannot access EC2 on specific port, even though I added security group

I created a web application and mounted it on an EC2 Windows instance.
Since it is created with Node.js Express and I didn't touch anything about localhost or port stuffs,
it is being listened on the port 3000 on npm start.
After I did npm start on the EC2 instance, then I can access it by "localhost:3000" within the EC2.
But when I try to access it from outside the EC2 with its public IP, like ip_address:3000, it keeps returning connection timed out error.
As I wrote in the title, I added a custom TCP security group that makes the instance opened for any IP addresses and with port 3000 but it still doesn't work.
What can I do? What am I possibly missing?
Thanks in advance.
Couple of things could be going wrong here.
Firstly - confirm your web application is actually running from within the instance.To do this on any recent windows in powershell: Invoke-WebRequest http://localhost:3000.
Secondly - confirm the security group on the instance allows incoming traffic for your designated port - HTTP(80) or HTTPS(443).
Thirdly - since you mentioned your instance has a Public IPv4 address, it must be located within a VPC and a Subnet. Navigate to the VPC service within the AWS Console and have a look at the Network ACL for that subnet. It's possibly denying all incoming traffic - rendering your security group settings unused.
If you're unsure on whether the subnet is blocking incoming traffic or not, have a look at these docs.

Access Ubuntu Server VM on Azure

I've setup an Ubuntu Server on Azure. On this server, an application is running on port 3000. I want to access this application external. Azure tells me my server has public ip 40.68.XXX.XXX.
When I ping this IP, there is no response, despite ssh works when connecting to this IP-address.
I want to access 40.68.XXX.XXX:3000 external, does somebody know how to get this work?
Yes, you need to open up a port on the Network Security Group (NSG) and open up the port on your firewall (on the VM itself).
Easiest way to open the port is using the portal:
https://learn.microsoft.com/en-us/azure/virtual-machines/virtual-machines-windows-nsg-quickstart-portal

Hosting web application on Amazon AWS EC2

I am developing a web application locally. However, I would like to host the final product on an Amazon EC2 instance. I have moved my web application to the EC2 instance and am able to run the application; it's now listening on port 8081.
What I don't understand is how to allow users on the internet to access the web application running on port 8081 of the EC2 instance. I have tried redirecting the domain name to the IP address of the EC2 instance on the NameCheap DNS (where we bought the domain) to no avail. I suspect one of the things I need to do is set the permissions of the EC2 permission group but what should I set it to?
Help is greatly appreciated!
Thanks!
You can setup a nginx server to proxy all request to the port 8081.
Read more information here: https://doesnotscale.com/deploying-node-js-with-pm2-and-nginx/
Generally speaking, for a public web application you will want to run on a standard port (e.g. 80 or 443). You could do that by just running your node app as a privileged user (required by most OS's to expose 80 or 443), but generally it's better to have a web server in front pass the traffic, treating your node app as an upstream server (even if it's on localhost). NGinX is a good choice for this.
Regardless of what port you want to run it on, you'll need to update your EC2 security policy for that instance to allow traffic on that port (80, 443, 8081, whatever). You'll also need to make sure it's exposing a public IP address. It's not a bad idea to assign it an Elastic IP, since you'll wnat it to have the same address across instance reboots.
Finally, depending on what AMI you're running from, there may be a host firewall configured that you'll need to check on and configure to allow the traffic.

how to make nodejs server available online from aws win

I have aws windows server 64bit
installed nodejs on it
uploaded nodejs project
run node server.js
on aws i can access my node application on url localhost:8080
i want to make it available online
in windows firewall every thing is green
I have created new inbound rule for port 8080 and allowed that is also green
You need to modify the instance's security group to permit inbound connections on port 8080. A security group acts as a virtual firewall for the instances associated with it. By default no inbound connections are permitted.

Elasticsearch installed on Azure Linux VM isnt't reachable

I have configured an Elasticsearch instance on an Azure Linux VM instance, as described here. The service is running smoothly as I can check by issuing a curl command.
But since this is an exploratory server instance I want to open 9200 port on the VM to be available for any external client. I opened 9200 and 9300 ports on the VM using iptables. In addition I created an Azure Endpoint, as described for example here, that maps TCP request on public port 9200 to a machine's private port 9200.
However, the machine and port is not reachable from outside. I am certainly missing either VM or VPN configuration, I just can't figure out what else to I need to configure.
After spending a few hours on this issue I decided to switch from Azure beta portal (portal.azure.com) to an old portal (manage.windowsazure.com) and created an endpoint there. And then it worked! So it must be something that malfunctions in the new Azure Portal pre-release.
Make sure you are using the latest java, and do the following:
You have to edit the elasticsearch config file by using:
sudo vi /etc/elasticsearch/elasticsearch.yml
And set the following parameters:
network.host: 0.0.0.0
http.port: 9200
Now add this directly under http.port:9200 headline:
script.engine.groovy.inline.search: on
Finally, make sure you open BOTH PORTS 9200 and 9300 from VM Endpoints or Network Security Group inbound.
I have it functioning normally using this config.

Resources