Which IP address I have to use to access Ratchet server - amazon-ec2

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.

Related

Prevent EC2 IP address redirecting for testing purposes

I'm trying to move my website over to AWS. I set up EC2 but I can't find a way to access the dev site I've set up to allow me to test it works before I switch over. The stack is Laravel/Forge and Nginx.
I have assigned an Elastic IP address, and I've enabled HTTP access via port 80. But when I go to the IP address it redirects to the live domain itself.
Same thing when I use the Public IPv4 DNS (ec2-<IP address>.compute-1.amazonaws.com).
I've been battling with it for some time. Can anyone advise what I'm doing wrong.

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

Access specific port run by services using elastic ip

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

How to use server IP as proxy

I have full access to a server which is located in some other country. My IP address has been blocked blocked by a website and I need to use my server IP as proxy to access that particular website. I tried out with the server IP address in LAN Setting->use Proxies in my Chrome Browser but I am unable access the internet when i use that IP. How can I do this?
Just entering the server address on client side isn't sufficient. You need to set up your server to behave as a proxy server using something like squid or other alternative.

Connect to Amazon (AWS) EC2 instance via browser

I am having trouble connecting to an Amazon Elastic Cloud Computer Instance via a browser.
I attempted going to ********.compute-1.amazonaws.com , but the browser returns that the connection has timed out.
I can connect via ssh and winscp. That is how I uploaded a web app I developer. I have also created a security group and added rules to open ports 22 and 80.
Do I have to assign the security group to the instance somehow?
The security group's rules also do not have a source IP, well they do its 0.0.0.0/0
I would really appreciate any and all help in getting this site ' viewable ' via a browser.
By default, your instances will only be in the default security group. If it's an EC2 instance you cannot change security groups while the instance is running, you'll have to specify them in advance. If it's a VPC instance you can change security groups at runtime.
Add the rule to the default group
You can however add the rule to allow port 80 to that default security group; just don't create a new security group as it can not be associated with the running instance.
Is the web server up?
Also, make sure that your web server is up and running. From your instance (using SSH shell access), check if the right process is listening on port 80, using the command netstat -lnp. You should then see a row with proto tcp and a Local Address ending in :80. The IP Address listed should be either 0.0.0.0 (meaning 'any IP') or a specific IP of a listening network interface.
Web server not up
If you are in need of a web server, take a look at Apache or Nginx. They both support PHP.
Hope this helps.
I had also faced similar issue with ec2 micro instance. I was using Red-Hat AMI. Despite of opening ports 8081 in security group, I was not able to a telnet to the host port. Disabling the iptable did the trick for me:
sudo /etc/init.d/iptables stop
Do not forget to disable firewall if you use windows for your server.
I faced the same issue while setting up redash AMI image on AWS. Inbound security rules should be changed when instance is not running. Let's say if the instance is running (meaning it's active and started); If you change the inbound rules of that machine you'll still face firewall issue. So Stop the machine on which you want to change the inbound rules on. Change the inbound rules. Start the machine now. Now you can hit the machine url from the ip you just opened the access to the machine to.
The EC2 instance firewall is maybe enabled.
Check it with this command:
sudo systemctl status firewalld
if enabled you can disable it with :
sudo systemctl disable firewalld
or setup rules to allow port 80 trafic

Resources