AWS AMI Bitnami + Webmin can't access over https://publicip:10000 - amazon-web-services

I'm using an AWS AMI from Bitnami "NGinx Certified by Bitnami" and I have installed Webmin successfully as seen in this Gist. Including opening the port 10000 in the firewall. But I still cannot access WebMin at https://publicip:10000 - it just times out. I've rebuilt the server twice and tried with another Bitnami image but get the same result.
I've installed Webmin on other servers many times successfully. Although it's been a couple years.

I discovered I had to allow the port in Amazon's AWS interface.
Sign into the Amazon AWS
Console.
Select EC2.
Navigate to "Network & Security" > "Security Groups".
Select the Security Group you previously associated with your instance.
In the panel that appears / populates below select "Inbound"
Click the "Edit" button.
Click "Add Rule"
Choose "Custom TPC"
Enter "TCP" as the Protocol.
Enter "10000" as the port range.
Select "Custom" as the Source and enter "0.0.0.0/0" as the value.
(Optional) Enter "Webmin" as the Description.
Click and click save.

Related

How to enable access to a web service hosted on GCP VM instance

I built a web app, that runs and listens on port 5000 using .netcore (default app in VS).
I created a VM instance on GCP, and allowed http and https traffic in the configuration.
I ran the app, and used the exteral ip(which I succeeded to ping) to access it from the browser:
http://:5000
But I got no response, this should have opened the site.
I added a firewall rule to allow traffic but still didn't help:
I'm sure many people encountered this, any help?
I have the same opinion as #Iñigo, it could be the firewall.
You can create the rule with the following command:
gcloud compute --project=my-project firewall-rules create rule-for-netcore --direction=INGRESS --priority=1000 --network=default --action=ALLOW --rules=tcp:5000 --source-ranges=0.0.0.0/0
The output should be something like:
Creating firewall...⠹Created [https://www.googleapis.com/compute/v1/projects/my-project...l/firewalls/rule-for-netcore].
Creating firewall...done.
NAME NETWORK DIRECTION PRIORITY ALLOW DENY DISABLED
rule-for-netcore default INGRESS 1000 tcp:5000 False
Edit 1
Also you need to open the port in your windows firewall:
From the Start menu, click Control Panel, click System and Security, and then click Windows Firewall. Control Panel is not configured for 'Category' view, you only need to select Windows Firewall.
Click Advanced Settings.
Click Inbound Rules.
Click New Rule in the Actions window.
Click Rule Type of Port.
Click Next.
On the Protocol and Ports page click TCP.
Select Specific Local Ports and type a value something like 5000-5010 (this is only an example you need to add the ports needed)
Click Next.
On the Action page click Allow the connection.
Click Next.
On the Profile page click the appropriate options for your environment.
Click Next.
On the Name page enter a name of like “Open port for test”
Click Finish.
Restart the Instance.
At the end you would see the rule like this:
You can consult the following link for more information.
The firewall is dropping your traffic.
You should open port 5000, not http(port 80) or https(port 443).

How can I connect to my ubuntu server via http?

I have started using AWS t2.micro virtual machine. I installed apache2 and curl on it. If I type curl localhost on the ubuntu machine, it gives me the correct page. How do I now connect to the ubuntu machine with http from windows and fetch the same page?
Modify the security group of that instance(virtual machine) adding to inbound rules: port 80, Protocol tcp and source (IP to accept connection from) either the static IP address of the windows computer or 0.0.0.0/0 (any IP address).
I have fixed the issue by doing this in AWS:
Open EC 2 Dashboard
Open Instances
Click the instance I want to connect to
Scroll down to description and look at "Security Groups"
Look at the name of security group, mine was "launch-wizard 3"
On the sidebar, go to Network & Security > Security Groups
Find security group name (for me it was launch-wizard3), click on it and look down below where it says inbound, click on it.
Click edit
add rule
Type: HTTP, Source: anywhere
Save
Connect to your public ip and it should work.

Amazon 500150 : Unable to connect to Redshift Cluster

I followed all the steps mentioned on here
to connect to Redshift through Workbench J.
I am not using SSH to connect, so have left SSH settings alone.
When I select Security after selecting Redshift, I see :
Your account does not support the EC2-Classic Platform in this region. Cluster Security Groups are only available when the EC2-Classic Platform is supported. Instead, use VPC Security Groups to control access to your clusters. Go to the EC2 Console to view your VPC Security Groups. For more information, see Amazon Redshift Documentation on Supported Platforms and Managing Clusters in VPC.
My cluster is under a Security Group which has the following Inbound rule :
Type: Redshift
Protocol: TCP
Port Range: 5439
Source: Custom 0.0.0.0/0 (Experimental, just to test,
I will replace this with my IP address)
When I do a Netstat on the host from my machine with -Pn. I get a
Host is up.
PORT STATE SERVICE
5439/tcp filtered unknown
Nmap done: 1 IP address (1 host up) scanned in 2.22 seconds
I have already gone through several similar questions and none of these is working for me.
Double check your Security Group settings:
In the Redshift console, go to the Configuration tab.
Click on the link next to VPC security groups
Should take you to Security Groups in the EC2 console with the correct security group selected.
Select the Inbound tab for the security group and click the Edit button (a dialog box opens).
In the dialog box, click the Add Rule button then:
Select Redshift from the Type dropdown menu
Select Anywhere from the Source dropdown menu
Come back and change this to My Ip once your connection works!
Click the Save button (the dialog closes)
You now have 2 new Redshift rules (0.0.0.0/0 AND ::/0)
Then in SQL Workbench's "Select Connection Profile" dialog:
Click "Manage Drivers" at the bottom left and to add the Redshift JDBC driver.
SQL Workbench configures these automatically but check that Classname is like com.amazon.redshift.jdbc42.Driver and Sample URL is jdbc:redshift://host:port/name_of_database.
Next, configure the connection
Select the new Driver you just created from the drop down.
Copy the JDBC URL from the Redshift console Configuration tab and paste it into the URL field.
Must use the correct port: jdbc:redshift://my-cluster.asdfgh5jk8.us-east-1.redshift.amazonaws.com:5439/my-db
Add your Username and Password
Test the connection! (Bottom right)
Please let me know in the comments if this doesn't work for some reason and I'll help you get it working.

What is the most easiest way to configure between AWS server and custom domain

I am trying to hand shaking between my AWS server and domain. I purchased my domain from godday.com. Any one can help me.
First you need to create the static ip of the ec2 instance this is because ec2 ip is volatile every time you restarts ec2 the ip will change .In that case you have to create a static ip so follow the below step Login to your amaazon aws console then :
1.On EC2 Management console you will have a vertical menu on the left hand side.
2.Under “NETWORK & SECURITY” group click on “Elastic IPs”.
3.On the top menu you will see a blue button “Allocate New Address” click on it.
4.Just be sure “EIP used in” is set to “EC2” then click “Yes, Allocate”.
5.A new IP address will be created on the table, select it by clicking on the empty square by the left of the name.
6.Now click on “Associate Address” on the pop-up click on instance and select the instance you would like to associate to this IP.
7.Finally click “Associate” and that’s it. For now to access via SSH, FTP, etc. you will need to use the new elastic IP.
Next you need to point the static ip to the Godaddy domain name. Login to godaddy account:
1.Login into your godaddy account.
2.Under the upper menu click “Domains” and then click “Manage my Domains”.
3.Select the domain you would like to change by clicking the link to the domain on the table under “Domain Name” column.
4.In Domain Details there are three tabs, you should click on “DNS Zone File”.
5.Under A(Host) , click on “Edit Record (pick the one which is "#")” at the end in “Actions” column.
6.Now change the value on the field “Points to” with the elastic ip of your amazon ec2 instance.
Hope that helps you.

How can access AWS RDS by CLI / PUTTY?

I am new to AWS , I can access EC2 user by putty. Like this how can i connect AWS RDS by PUTTY ?
I have AWS RDS Endpoint , If i try like the below
mysql -h testing.cx2wamr3cbzm.us-west-2.rds.amazonaws.com -P 3306 -u Username -p
I am getting some error like
ERROR 2003 (HY000): Can't connect to MySQL server on 'testing.cx2wamr3cbzm.us-west-2.rds.amazonaws.com' (110)
I think there is a problem with security group.I searched more, but its difficult to understand for me.
I want to create database and assign rights ?
Thanks
RDS is not available to the world by default. It's also generally a bad idea to allow access to the RDS from anywhere except from inside your VPC. I recommend you do the following:
Create a security group that allows access to the RDS over port 3306 from your EC2 instance
Visit https://console.aws.amazon.com/ec2/home#s=SecurityGroups and create a new security group.
Switch to the inbound tab and choose MYSQL from the dropdown.
Erase the 0.0.0.0/0 in the source field then click the input field. It will present you with a list of existing security groups. Choose the one that your EC2 instance belongs to.
Click the apply rule changes button
Assign the security group to your RDS
Visit https://console.aws.amazon.com/rds/home#dbinstances: and select your RDS instance and under the Instance Actions menu select Modify
Change the RDS security group to the one you just created
Make sure to select the Apply immediately option at the bottom of this page
Click Continue and apply the new changes. (the change can sometimes take a couple of minutes)
SSH into your EC2 instance then run the mysql command in your question