Access specific port run by services using elastic ip - windows

I have windows server 2008 R2 running in AWS (with Elastic IP)where i am running Apache service to host one of website which i can easily access using various method like
Like "localhost:port" works fine
Using server NIC ip address:port works fine.
In my current use case where i want to expose this website on my elastic IP i am not able to do so.
However if i host any website on my IIS i can access or view using my elastic IP but i am unable to host apache website on IIS.
Whenever i try to access apache one it never worked.
I tweaked firewall setting
I also updated conf file of apache whenever i try to give elastic IP address it will not start.
Failed with following error message
The Apache service named reported the following error:
>>> (OS 10049)The requested address is not valid in its context. : make_sock: could not bind to address 52.xx.xx.xx:8888
Following is my service details of apache on services.msc
C:\Program Files (x86)\vcollapp\apache\bin\Apache.exe -k runservice
Now how can i expose my site which is running on apache service inside windows to elastic ip of AWS.
Thanks in Advance for your help and time.

Try binding to 0.0.0.0? This will accept connections from all interfaces, not just localhost.
If you check your network interfaces, do you see an interface with the Elastic IP? Or do you just have your Private IP?
There are different ways of using Elastic IP's, and my assumption here is that the IP is not physically attached to your machine, but instead, you have a private IP that all traffic from the Elastic IP is routed through.
WAN -> Elastic -> Private

Related

how to connect to external ip of google cloud platform from local browser

I have created VM instance on google cloud platform in which I have installed NiFi. There are two types of Ip addresses:
1) Internal IP
2) External IP
Now, when I start NiFi services it is hosting its services on Internal IP but when I try to access external IP via local browser I am unable to access it since its a private IP. I tried creating a firewall rule with Ingress option and which will listen to all IP's and port number 8080 but of no use.
So where am I going wrong?? I tried searching for relevant solutions but no luck.
Attaching screenshot of the firewall config:
Please help me with some links / solutions.
Your issue is a misunderstanding of how ip works in google cloud.
You have two types of ip as you stated, internal ip is for communication between the computes instances and services inside the google cloud vpc. The important part is that it works only in google cloud on your project and that is the internal ip of your instance.
External ip is an optional ip that is attributed to the instance to allow external communication, so not from google cloud, as from your browser for example. But this external IP is not really known to your instance, that's what confused you, but don't worry, if you try to access your 8080 port on the external ip you won't have any errors and should see your app.
I solved my problem in below ways:
1) I edited my VM and unchecked allow https traffic option.
2) I changed my NiFi listener port from 8080 to 80 since 8080 is blocked in my organization.
No firewalls added. Atleast it worked for me

SonarQube on windows - can only view locally

I have a windows server 2016 machine which I have Jenkins running on. I wanted to install SonarQube. So have downloaded v7.1
I have managed to start sonarqube on the machine and can view the webserver at http://localhost:9000
I tried to view the page on a different machine using the IP address and port 9000, but this doesn't connect. Looking in the sonar.properties file I can see
Binding IP address. For servers with more than one IP address, this property specifies which
address will be used for listening on the specified ports.
By default, ports will be used on all IP addresses associated with the server. sonar.web.host=http://xx.xxx.xxxx.xxx
If I use http:// then sonarqube starts, but I can't see sonarqube from any other machine, if I don't use http:// (so just the ip) then it won't start with a bind error.
Has anyone experience of setting this up on windows?
Turns out it was something a lot simpler, the machine is being run on azure and there was no port 9000 endpoint

Which IP address I have to use to access Ratchet server

I have setup ratchet on amazon EC2 instance.
It is running fine, but I am not able to connect with the public IP address of the instance as well as the url.
Following is the screenshot showing ratchet is running.
You need to make sure that the service is running on the right IP address (not only on 127.0.0.1) and that you enabled access in the security group to that particular port.

Configuring Amazon EC2 for a dynamic website

I am curious about Amazon webservices and so I thought of creating a dynamic webpage with Amazon EC2. I created an instance, installed apache and php and made sure it is working in EC2(using remote access). I have assigned a elastic IP to the instance. My question is how to access the webpage that I created in the instance. I am not sure what to give the servername in httpd.conf. My goal is access the page like http://amazonaddress/test.php
I am using windows server, but I think it is basically the same. My documents are in the same folder as mentioned in conf file. But when I use my elastic IP, it isn't working . Not even the basic index page in the apache htdocs(that's the home folder according to conf). To throw more light I will explain what I have done till now.
I have created a micro instance(EC2) and logged into it using remote desktop. I have installed apache msi file and php after that. I have created a elasticIP and attached the instance and to my security group I have added http service to port 80. I have tested if localhost is working in my remote machine(points to index.html). After that I have tried accessing it using elastic IP and it just times out. Is there any step I have missed?
You can access it via http://255.255.255.255 where you replace the 255.255.255.255 with your elastic IP address.
Then you want to setup DNS for your domain name. So you'll need to create an A Record mapping www.yourdomain.com to whatever your elastic IP address is. You can usually do this via your domain name registrar as most of them also run basic DNS services for free.
You can access an ec2 instance using it's public DNS name (or elastic IP since you already have one of those), which can be seen in the instances description tab. Configuring your personal domain name to point to that server will involve creating an A Record mapping to that public IP.
Assuming apache has been setup correctly, that's all you should need to do to get started (and your test.php page is in /var/www/). For your purposes, you probably shouldn't even need to modify the httpd.conf file at all.
Also, be sure to remember to open a port on the security group (under Network & Security from the EC2 Console) that the instance belongs to. In your example, you will want to open port 80 inbound with source 0.0.0.0/0 (unless you want to limit access to a specific IP range).
Hope this helps.

xampp configuration in windows server 2008 r2 ec2 instance

i am trying to set up a site with xampp. i have succesfully connected to the instance via remote desktop and installed xampp and python (needed for my php script). now i am trying to find a way to connect to the instance's localhost via a browser in my local computer with the provided private and elastic IPs but no succefull attempt yet. i would like to configure that with a static IP or domain name (i suppose the elastic or private IP?) because my site will be used for http requests.
did you allow port 80/443 in your security group?
did you start the xampp server?
when logged in via remote desktop, are you able the open 'http://localhost' in a remote browser?
your elastic IP is the address reachable from public
private IP is the address reachable from within the availability zone

Resources