0

Hello I am running AWS EC2 on centos. I have installed Webspehre liberty and started it.

When I run netstat -an | grep 9080

I see

tcp        0      0 ::ffff:127.0.0.1:9080       :::*      LISTEN

But when I go to my Public DNS: ec2-XX-XXX-XX-XXX.us-east2.compute.amazonaws.com:9080 in my web browser I get ERR_CONNECTION_REFUSED

In my security groups I have allowed Inbound traffic on all ports from anywhere Port: 0 - 65535 Source: 0.0.0.0/0

When I wget ec2-XX-XXX-XX-XXX.us-east2.compute.amazonaws.com:9080 on the server I get the home page downloaded onto the server, so the site is up but just not publicly accessible.

Also when I run

#service iptables status
iptables: Firewall is not running.

So the firewall is off.

What am I doing wrong?

Image of Security Group

Thank

asd asd
  • 3
  • 1
  • 3
  • Almost certainly a duplicate of https://serverfault.com/questions/725262/what-causes-the-connection-refused-message. – user9517 Jan 14 '18 at 06:59
  • Since wget works this is a connectivity issue. It's very likely security groups or Network ACLS (NACLs). You may have security groups set up incorrectly. Post a screenshot. You haven't given enough information to solve this. – Tim Jan 14 '18 at 07:02
  • @Tim I added a screenshot – asd asd Jan 14 '18 at 07:04

1 Answers1

2

The address ::ffff: is a subnet prefix that indicates an IPv4 address embedded in an IPv6 address. Thus, ::ffff:127.0.0.1:9080 indicates your service is only listening on the local loopback address 127.0.0.1 (localhost) and is therefore not accessible via your external address.

To make this work you need to cause your service to listen on the appropriate external address.

user9517
  • 114,104
  • 20
  • 206
  • 289
  • 1
    Naw, it's really not that hard, plugging ::ffff:127.0.0.1: into google gets you https://stackoverflow.com/a/33790357 and the linked duplicate above explains the rest. All it takes if a tiny bit of effort and the realisation that stuff needs to be read. – user9517 Jan 14 '18 at 07:32