Omega Onion Localhost issue
-
Hello everybody hope you are fine so I am developing a localhost server using flask in Onion it is working fine as in the terminal it showing me the URL of local host with the port 4242 but when I click that link the window appear showed This site can’t be reached and when I transfer anything from my website to this localhost omega the website told me your machine refused transferred object so I am confused everything is working fine so why omega not able to access me this? Please any suggestion or changing I want in my code?
-
@bilaljavaid01 Localhost is a special case. Your Omega2 has a localhost, every one of your Omega2 has a local host. Each of these localhost points to themselves, so if from my machine I try to ping localhost, it will ping my machine, not your Omega2.
If you want any machine to be able to connect to your Omega2, you need to have your flask app listen on the externally accessible IP address, otherwise, no other machine will be able to access it.
Use the command ifconfig to find the externally accessible address you can see here, my IP for the apcli0 interface is 192.168.1.219:
apcli0 Link encap:Ethernet HWaddr 40:A3:6B:C3:22:61 inet addr:192.168.1.219 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::42a3:6bff:fec3:2261/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:1629 overruns:0 frame:0
So I would configure my server to listen on that address so other machines can connect to it. Your IP will be something different.