I started the default rails server by default of 3000 on my AWS Ubuntu instance and allowed this port in the security group, the inbound section, but still I was not able to access my application using this.
http: // public_ip: 3000
I searched a lot and the answer helped me. An explanation of the answer. We need to make the firewall flexible so that our firewall allows port 3000.
You can use this command to check if this port is allowed in the firewall or not.
$ sudo iptables -L | grep :3000
If you do not see anything, this means that we must resolve this with this command.
$ sudo iptables -A INPUT -p tcp --dport 3000 -j ACCEPT
This helped me access my rails on port 3000.
source share