Unable to connect Ubuntu remote machine

1

In Ubuntu I've installed Tomcat and deployed the web application. I started tomcat and trying to access from Windows like below

http://54.85.125.1:8080/manager

Error

could not connect to 54.85.125.1:8080

In Ubuntu I executed the below command to enable the firewall in Ubuntu

sudo ufw enable

even though unable to connect to remote machine

I tried to ping from command prompt like below, but didn't get any response

    C:\>ping 54.85.125.1

Pinging 54.85.125.1 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 54.85.125.1:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss)

user3535043

Posted 2014-04-15T10:11:08.183

Reputation: 11

Usually, you would try a new server on the same local network first instead of an external IP address. Something like 192.168.0.*. Are both machines on the same local network? If not, has your router enabled port 8080? – jdh – 2014-04-15T11:13:08.987

Answers

0

The IP address you use suggests that you are using an Amazon EC2 instance. Did you set up the security groups properly for the instance?

  1. Log in to AWS console
  2. Select your EC2 instances
  3. Check if the security group associated with the instance has a rule for TCP 8080 inbound with the proper source address (or 0.0.0.0/0)

Also add a rule for port 8080 to ufw:

sudo ufw allow from 0.0.0.0/0 to any port 8080

You can check if it's in the iptables set with: iptables -nvL | grep 8080

mtak

Posted 2014-04-15T10:11:08.183

Reputation: 11 805

yes its an amazon instance. it is created using jclouds api. Is their any method to set security groups while creating the instance itself. I added port 8080 using "sudo ufw allow 8080/tcp" and i run "iptables -nvL | grep 8080", din't get any thing getting just new line – user3535043 – 2014-04-15T12:20:05.913

I don't know how set a security group with jclouds api, but from the Amazon CLI clients you can do it with the --security-groups parameter. However, you might want to check it in the Amazon console for debugging parameters. – mtak – 2014-04-15T12:24:30.130

My bad, I had the ufw syntax wrong. I've updated my answer. – mtak – 2014-04-15T12:26:26.077