Menu

Port forwarding

Help
2008-12-28
2015-08-25
  • Tamar Badichi

    Tamar Badichi - 2008-12-28

    Hi,
    where in the code should i find port forwarding?
    I tried to extract the PortMapper but I can't see the files

    Best Regards

    Tamar Badichi

     
    • Tamar Badichi

      Tamar Badichi - 2008-12-29

      Hi Christoph,

      I want to make P2P connection between two remote PC's
      because I want to make it more easier I want to enable port forwarding to the router but only through my software not by the user.
      and I heard that UPnP contain port forwarding.
      and there is linux open source that implement it.
      so I want to see if the open source working well with any kind of router or if its limited.

      Bests

      Tamar

       
    • Tamar Badichi

      Tamar Badichi - 2008-12-29

      Hi agian Christoph.
      I want to ask you also if there is any source code for port forwarding that implemted in c/c++ and not in java.
      thank you very much for all the links

      Tamar

       
      • Christoph

        Christoph - 2008-12-29

        Hello Tamar,

        I am sorry, but I don't have any experiences with C++. Platinum ( http://www.plutinosoft.com/blog/goodies/platinum ) seems to be a good UPnP library for C++, but you will have to implement the logic to create port mappings on your own.

        You could also try http://miniupnp.free.fr/ as it seems to provide an interface for the internet gateway device.

        HTH & Kind regards,

        Christoph.

         
    • Christoph

      Christoph - 2008-12-28

      Hi Tamar,

      What do you want to achieve?

      If you want to enable your program to create port forwardings, you will need a library like UPNPLib ( http://www.sbbi.net/site/upnp/index.html ) which is used by PortMapper.

      PortMapper is not distributed with source code, so you will have to look at the code in SVN ( https://sourceforge.net/svn/?group_id=213879 ) for examples. The logic that communicates with the router is encapsulated in class org.chris.portmapper.router.Router (see http://upnp-portmapper.svn.sourceforge.net/viewvc/upnp-portmapper/tags/v1.5.0/src/org/chris/portmapper/router/Router.java?view=markup ).

      HTH,

      Christoph.

       
  • Jeevan B M

    Jeevan B M - 2015-08-25

    Getting Error while adding router to port mapping. Madem : DSL-2730U (Airtel). This error got in Windows 8.1.

    Log :
    1. When you click "Connect"
    INFO Searching for routers...
    INFO Connected to router DSL-2730U
    INFO Got internal host name '192.168.1.1' for router.
    INFO Got external IP address 122.171.158.156 for router.
    INFO Found 0 mappings, 0 mappings returned as null.
    INFO Found 0 mappings

    1. When you click "Create" in PortMapping Presets
      INFO Got internal host name '192.168.1.1' for router.
      INFO Got internal host name '192.168.1.1' for router.
      INFO Got internal host name '192.168.1.1' for router.
      INFO Got internal host name '192.168.1.1' for router.
      INFO Saved preset 'gg'.

    2. When you click "Use" in PortMapping Presets
      INFO Adding port mapping TCP :8085 -> 192.168.1.4:1 enabled gg
      INFO 1 port mapping added successfully
      INFO Found 0 mappings, 0 mappings returned as null.
      INFO Found 0 mappings

    3. When you click "Update"
      INFO Found 0 mappings, 0 mappings returned as null.
      INFO Found 0 mappings

    Please help immediately. This required for my project.

    Thank You.

     

Log in to post a comment.