Rails external access is not possible.

Asked 2 years ago, Updated 2 years ago, 31 views

I'm studying Ruby on Rails.

Ruby is using version 2.3.7 and Rails is using version 5.2.

After some development, I want to distribute it to AWS to allow external access, but even if I run the rails -b 0.0.0.0 command, I can only connect to devices using the same network, but I can't connect to devices using different networks.

I can't connect to other devices even if I run it with rails -b 0.0.0.0 command locally, not just AWS.

I thought it was a firewall problem, so I tried to turn it off, but I couldn't connect.

What's the problem?

When you run the server, it runs as follows.

=> Booting Puma

=> Rails 5.2.0 application starting in development

=> Run rails server -h for more startup options Puma starting in single mode...

Use Ctrl-C to stop

ruby-on-rails ruby

2022-09-22 18:49

1 Answers

The problem is more of a NAT problem than a DNS problem.

NAT has IP conversion on the router, so equipment using converted private IP starting with 10 or 172 cannot be accessed outside the router.

If you are using a router, you can bypass the router to the port forwarding setting or the dmz setting.

The same is true for AWS, which is basically not published on the Internet. You must receive and assign an Elastic IP (not mandatory) and set up an Internet gateway (required).


2022-09-22 18:49

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.