iotcreators.com web
    • Login
    • Search
    • forum.iotcreators.com
    • docs.iotcreators.com
    • Tags
    • Popular
    • Recent
    • Register

    Unable to reach TCP server externally (from internet)

    Network & Coverage
    tcp-server firewall
    4
    7
    161
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      Reinier Hasper last edited by

      Fellow iot enthusiasts,

      I’m trying to set up a tcp server on my embedded device so that I can connect to it from the internet. My setup consists a HL7800 modem (running zephyr) and a starterkit configured as “Via the public internet”.

      it seems like everything works well, it fetches an ip-address through DHCP (10.207.152.99) and I’m able to connect to 8.8.8.8:53 without any problems. When configuring the modem as a TCP server however it seems like i’m blocked by a firewall or something.

      I tested the TCP server by letting the modem connect to itself, which works perfect, but I’m not able to reach my device from the internet.

      Anyone who can help me out with this?

      Regards,

      Reinier

      afzal_m 1 Reply Last reply Reply Quote 0
      • afzal_m
        afzal_m iotcreators.com team @Reinier Hasper last edited by

        @Reinier-Hasper are you very sure you are using the APN m2m.public.nl?

        If I look at your IP address it really looks like you are using one of the other APNs.

        R 1 Reply Last reply Reply Quote 0
        • R
          Reinier Hasper @afzal_m last edited by

          @afzal_m

          Based on the logs I’m quite sure we’re using the right aan:

          [00:00:10.720,367] <dbg> modem_hl7800: on_cmd_atcmdinfo_ipaddr: IP info: 1,5,"m2m.public.nl.mnc040.mcc901.gprs",10.207.80.32.255.255.255.192,10.207.80.1,10,
          [00:00:10.742,797] <dbg> modem_hl7800: on_cmd_atcmdinfo_ipaddr: IPv6 DNS addr: 2a01:598:7ff:0:10:74:210:210
          
          F 1 Reply Last reply Reply Quote 0
          • F
            fm @Reinier Hasper last edited by fm

            Hello @Reinier-Hasper

            I am not sure, but I think a lot (if not all) provider use some kind of corporate NAT. That means 10.207.152.99 is not an IP reachable from the Internet.

            In my experience APN m2m.public.nl allows the modem to reach a server on the Internet, but not the other way round.

            Can you ping 10.207.152.99 from the Internet?

            As a test you could try to make a TCP connection (as client) from your modem to a TCP sever on the Internet and then check the client IP address in the log of the TCP server. If it is different from the above IP address then you know your provider is using a corporate NAT.

            Thanks
            Felix

            1 Reply Last reply Reply Quote 1
            • M
              MarcoPeli iotcreators.com team last edited by

              hi @Reinier-Hasper , generally speaking, you cannot be reached from the internet even with the public apn. That is how basically all mobile carriers work, you are effectively behind a private network and thus cannot be reached from the external world.

              Hope this clarifies,

              BR
              Marco Peli

              R 1 Reply Last reply Reply Quote 0
              • R
                Reinier Hasper @MarcoPeli last edited by

                @MarcoPeli So there is no way this can be done? only with lets say reverse tcp?

                M 1 Reply Last reply Reply Quote 0
                • M
                  MarcoPeli iotcreators.com team @Reinier Hasper last edited by

                  @Reinier-Hasper yes exactly, your device under mobile connectivity can open a tcp socket with the remote server and have a bidirectional channel in this way, but not viceversa

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  • First post
                    Last post