I’ve been able to set up sending and listening to http requests locally using 127.0.0.1:8000. I want to try doing it using the internet now.

I have a VPN with port forwarding enabled, but sending requests to that IP address and port does not yield a response like it did when doing it locally.

Can anyone clarify which address I should be listening on in order to receive http requests from the internet? I tried 0.0.0.0 and a few inet addresses from ip add, but none of them work.

  • Dave@lemmy.nz
    link
    fedilink
    English
    arrow-up
    3
    ·
    2 days ago

    I think you need to explain in more detail how your “listening” is set up. You don’t normally “listen” on an IP address, if it gets as far as the program you’re listening with then it’s already arrived at the correct network address before your program knows about it.

    • atzanteol@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      3
      ·
      edit-2
      2 days ago

      You don’t normally “listen” on an IP address

      You can bind to an IP when you open a port, it lets you limit your listening to a particular device if there are more than one interfaces. 0.0.0.0 means to listen on “all available” devices.

      • Dave@lemmy.nz
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 day ago

        Yeah I guess that fits their explanation, but I still don’t get what they are trying to do.