[Ruby] [Windows10+ESET] Confirm the Rails application with the localhost connection on the actual iPhone

1 minute read

Background

I wanted to confirm the operation of the Rails application developed on windows10 on iPhone. However, I was unable to connect due to ESET security software and Windows Firewall. Although I’ll look it up for a while, only articles about “Mac OS environment and real Android devices”. That’s not what I want to know! !! Windows and iPhone environment! By the way, this article is quite limited to readers, but I will explain how to hope that it can help those who are troubled in the same environment.

Execution environment

Rails v6.0.3.2 OS: windows10 64bit Real machine: iPhoneX

  • Security software: eset Internet Security 13.1.21.0*

ESET filtering setting change

Go to “Automatic mode with rules (default)” ➡ “Interactive mode”.

Launch ESET software and click “Set”

Capture1.PNG

Click “Network protection”

Capture2.PNG

Click the gear of “Network Attack Protection (IDS)” and change to “Interactive Mode”

Capture3.PNG

Launch Rails server

The Rails application will not release port 3000 unless specified. Start with option -b 0.0.0.0 and pass 3000.

``


rails s -b 0.0.0.0

Access localhost from iPhone

1. Check the IP address of the local host PC

If you open a command prompt and type, the IP configuration will be displayed in a row. “IPv4 address” will be the IP of your PC.

``


> Ipconfig
Ethernet Adapter Ethernet:
   Connection-specific DNS suffix .. .. .:
   IPv6 address .. .. .. .. .. .. .: xxxx:xxxx:xxxx:x:xxxx:xxx:xxxx:xxxx
   Temporary IPv6 address .. .. .. .. .. .: xxxx:xxxx:xxxx:x:xxxx:xxxx:xxxx:xxxx
   Link Local IPv6 Address .. .. .: xxxx::xxxx:xxx:xxxx:xxxxxxx
   IPv4 address .. .. .. .. .. .. .: 192.168.x.x
   Subnet mask .. .. .. .. .. .: 255.255.255.0
   Default gateway .. .. .. .: xxxx::xxxx:xxxx:xxxx:xxxxxxx
                                          192.168.x.x

2. Open the browser from iPhone to Safari or Chrome

Enter the IP address you checked in the address field to access. At this time, the localhost port is 3000 by default, so don’t forget to specify the port. For example: Example:) 192.168.x.x:3000

3. Allow and save access from Ruby apps

Check “Create a rule and remember it forever” and click “Allow” Capture 4.PNG

4. Change ESET filtering settings

Make sure that the connection is correct, Follow the procedure at the beginning to return to “Interactive mode” ➡ “Automatic mode with rules (default)”.