Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Peer to peer communication from behind the NAT

Peer to peer communication from behind the NAT

Scheduled Pinned Locked Moved The Lounge
c++helpquestionworkspace
11 Posts 5 Posters 0 Views 1 Watching
  • 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.
  • V Offline
    V Offline
    Vagif Abilov
    wrote on last edited by
    #1

    Hello, My setup is probably not much different from many others: I have a router (LinkSys) at home that assigns home machines internal IP addresses. I have written an application that I would like to test from outside world. It's a vanilla socket communication: the application listens to a specific port. The problem is that the only public IP address I have is the one assigned to my DSL modem by my ISP, and all computers are connected to the net via a router. Is there a common technique to make a machine visible for peer-to-peer communication for such setup? Thanks in advance. Вагиф Абилов MCP (Visual C++) Oslo, Norway If you're in a war, instead of throwing a hand grenade at the enemy, throw one of those small pumpkins. Maybe it'll make everyone think how stupid war is, and while they are thinking, you can throw a real grenade at them. Jack Handey.

    C R 2 Replies Last reply
    0
    • V Vagif Abilov

      Hello, My setup is probably not much different from many others: I have a router (LinkSys) at home that assigns home machines internal IP addresses. I have written an application that I would like to test from outside world. It's a vanilla socket communication: the application listens to a specific port. The problem is that the only public IP address I have is the one assigned to my DSL modem by my ISP, and all computers are connected to the net via a router. Is there a common technique to make a machine visible for peer-to-peer communication for such setup? Thanks in advance. Вагиф Абилов MCP (Visual C++) Oslo, Norway If you're in a war, instead of throwing a hand grenade at the enemy, throw one of those small pumpkins. Maybe it'll make everyone think how stupid war is, and while they are thinking, you can throw a real grenade at them. Jack Handey.

      C Offline
      C Offline
      code frog 0
      wrote on last edited by
      #2

      In almost every firewall I've ever seen you can define traffic originating on certain ports to go to specific private IP addresses. So for example if your application listened on port 55044 and your listening machine had a private IP address of 192.168.0.100 you could (in the firewall) create a rule that allows traffic from the WAN on 55044 to be forwarded to 192.168.0.100 and you should be in business. You cannot do port translations on a linksys. For example traffice coming in on 80 gets translated to 8080. You need some higher end devices for that. - Rex

      I only read CP for the articles. Code-frog System Architects, Inc.

      V A 2 Replies Last reply
      0
      • C code frog 0

        In almost every firewall I've ever seen you can define traffic originating on certain ports to go to specific private IP addresses. So for example if your application listened on port 55044 and your listening machine had a private IP address of 192.168.0.100 you could (in the firewall) create a rule that allows traffic from the WAN on 55044 to be forwarded to 192.168.0.100 and you should be in business. You cannot do port translations on a linksys. For example traffice coming in on 80 gets translated to 8080. You need some higher end devices for that. - Rex

        I only read CP for the articles. Code-frog System Architects, Inc.

        V Offline
        V Offline
        Vagif Abilov
        wrote on last edited by
        #3

        Thanks! By saying that I can not do port translation on a LinkSys do you mean that I can still do firewall configuration that you mentioned (e.g. forward communicatino on port 55044 to private IP 192.168.0.100)? Or LinkSys routers is not capable of even this function? Вагиф Абилов MCP (Visual C++) Oslo, Norway If you're in a war, instead of throwing a hand grenade at the enemy, throw one of those small pumpkins. Maybe it'll make everyone think how stupid war is, and while they are thinking, you can throw a real grenade at them. Jack Handey.

        S 1 Reply Last reply
        0
        • C code frog 0

          In almost every firewall I've ever seen you can define traffic originating on certain ports to go to specific private IP addresses. So for example if your application listened on port 55044 and your listening machine had a private IP address of 192.168.0.100 you could (in the firewall) create a rule that allows traffic from the WAN on 55044 to be forwarded to 192.168.0.100 and you should be in business. You cannot do port translations on a linksys. For example traffice coming in on 80 gets translated to 8080. You need some higher end devices for that. - Rex

          I only read CP for the articles. Code-frog System Architects, Inc.

          A Offline
          A Offline
          Anders Molin
          wrote on last edited by
          #4

          code-frog wrote:

          You cannot do port translations on a linksys. For example traffice coming in on 80 gets translated to 8080. You need some higher end devices for that.

          Funny, works fine on my Linksys ;) - Anders

          V 1 Reply Last reply
          0
          • V Vagif Abilov

            Hello, My setup is probably not much different from many others: I have a router (LinkSys) at home that assigns home machines internal IP addresses. I have written an application that I would like to test from outside world. It's a vanilla socket communication: the application listens to a specific port. The problem is that the only public IP address I have is the one assigned to my DSL modem by my ISP, and all computers are connected to the net via a router. Is there a common technique to make a machine visible for peer-to-peer communication for such setup? Thanks in advance. Вагиф Абилов MCP (Visual C++) Oslo, Norway If you're in a war, instead of throwing a hand grenade at the enemy, throw one of those small pumpkins. Maybe it'll make everyone think how stupid war is, and while they are thinking, you can throw a real grenade at them. Jack Handey.

            R Offline
            R Offline
            Ryan Roberts
            wrote on last edited by
            #5

            There's also uPNP, which can be used for dynamicaly configuring port forwarding on compatible devices. My linksys supports it. Never done it myself, but this looks like a good guide[^]. Ryan

            "Michael Moore and Mel Gibson are the same person, except for a few sit-ups. Moore thought his cheesy political blooper reel was going to tell people how to vote. Mel thought that his little gay SM movie about his imaginary friend was going to help him get to heaven." - Penn Jillette

            V 1 Reply Last reply
            0
            • A Anders Molin

              code-frog wrote:

              You cannot do port translations on a linksys. For example traffice coming in on 80 gets translated to 8080. You need some higher end devices for that.

              Funny, works fine on my Linksys ;) - Anders

              V Offline
              V Offline
              Vagif Abilov
              wrote on last edited by
              #6

              What LinkSys do you have, Anders? WRT54G? Вагиф Абилов MCP (Visual C++) Oslo, Norway If you're in a war, instead of throwing a hand grenade at the enemy, throw one of those small pumpkins. Maybe it'll make everyone think how stupid war is, and while they are thinking, you can throw a real grenade at them. Jack Handey.

              A 1 Reply Last reply
              0
              • R Ryan Roberts

                There's also uPNP, which can be used for dynamicaly configuring port forwarding on compatible devices. My linksys supports it. Never done it myself, but this looks like a good guide[^]. Ryan

                "Michael Moore and Mel Gibson are the same person, except for a few sit-ups. Moore thought his cheesy political blooper reel was going to tell people how to vote. Mel thought that his little gay SM movie about his imaginary friend was going to help him get to heaven." - Penn Jillette

                V Offline
                V Offline
                Vagif Abilov
                wrote on last edited by
                #7

                Thanks, but my LinkSys does not have such configuration pages. I have only LinkSys WRT54G access point. Perhaps it's more limited. Вагиф Абилов MCP (Visual C++) Oslo, Norway If you're in a war, instead of throwing a hand grenade at the enemy, throw one of those small pumpkins. Maybe it'll make everyone think how stupid war is, and while they are thinking, you can throw a real grenade at them. Jack Handey.

                R 1 Reply Last reply
                0
                • V Vagif Abilov

                  Thanks, but my LinkSys does not have such configuration pages. I have only LinkSys WRT54G access point. Perhaps it's more limited. Вагиф Абилов MCP (Visual C++) Oslo, Norway If you're in a war, instead of throwing a hand grenade at the enemy, throw one of those small pumpkins. Maybe it'll make everyone think how stupid war is, and while they are thinking, you can throw a real grenade at them. Jack Handey.

                  R Offline
                  R Offline
                  Ryan Roberts
                  wrote on last edited by
                  #8

                  It may still support uPNP, try checking the "Show Icons for Networked UPnP Devices" in your connections explorer window. Or look on the box :) Ryan

                  "Michael Moore and Mel Gibson are the same person, except for a few sit-ups. Moore thought his cheesy political blooper reel was going to tell people how to vote. Mel thought that his little gay SM movie about his imaginary friend was going to help him get to heaven." - Penn Jillette

                  V 1 Reply Last reply
                  0
                  • R Ryan Roberts

                    It may still support uPNP, try checking the "Show Icons for Networked UPnP Devices" in your connections explorer window. Or look on the box :) Ryan

                    "Michael Moore and Mel Gibson are the same person, except for a few sit-ups. Moore thought his cheesy political blooper reel was going to tell people how to vote. Mel thought that his little gay SM movie about his imaginary friend was going to help him get to heaven." - Penn Jillette

                    V Offline
                    V Offline
                    Vagif Abilov
                    wrote on last edited by
                    #9

                    Thanks Ryan! I'll give it a try. Вагиф Абилов MCP (Visual C++) Oslo, Norway If you're in a war, instead of throwing a hand grenade at the enemy, throw one of those small pumpkins. Maybe it'll make everyone think how stupid war is, and while they are thinking, you can throw a real grenade at them. Jack Handey.

                    1 Reply Last reply
                    0
                    • V Vagif Abilov

                      What LinkSys do you have, Anders? WRT54G? Вагиф Абилов MCP (Visual C++) Oslo, Norway If you're in a war, instead of throwing a hand grenade at the enemy, throw one of those small pumpkins. Maybe it'll make everyone think how stupid war is, and while they are thinking, you can throw a real grenade at them. Jack Handey.

                      A Offline
                      A Offline
                      Anders Molin
                      wrote on last edited by
                      #10

                      WRT54GC - Anders

                      1 Reply Last reply
                      0
                      • V Vagif Abilov

                        Thanks! By saying that I can not do port translation on a LinkSys do you mean that I can still do firewall configuration that you mentioned (e.g. forward communicatino on port 55044 to private IP 192.168.0.100)? Or LinkSys routers is not capable of even this function? Вагиф Абилов MCP (Visual C++) Oslo, Norway If you're in a war, instead of throwing a hand grenade at the enemy, throw one of those small pumpkins. Maybe it'll make everyone think how stupid war is, and while they are thinking, you can throw a real grenade at them. Jack Handey.

                        S Offline
                        S Offline
                        Shog9 0
                        wrote on last edited by
                        #11

                        Vagif Abilov wrote:

                        I can still do firewall configuration that you mentioned

                        Yes.

                        Now taking suggestions for the next release of CPhog...

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups