Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    UPnP support

    Scheduled Pinned Locked Moved Expired/Withdrawn Bounties
    363 Posts 28 Posters 398.8k Views
    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.
    • A
      auwts
      last edited by

      Thanks for your reply, I just ( ::)) figured out what my problem was. I had my xbox configured with a manual IP address, and then it doesn't seem to send a M-SEARCH broadcast. When using automatic it does. So now the xbox live test utility sees my NAT as open. Thanks for all the work! (BTW: Any plans to submit it as a FreeBSD port?)

      1 Reply Last reply Reply Quote 0
      • R
        rsw686
        last edited by

        Updated to miniupnpd version 20061017. Full installs you just need to reinstall the package. Embeddeds I will get to you soon.

        From the miniupnpd20061027.tar.gz changelog

        2006/10/27:
          Thanks to a patch sent by Michael van Tellingen, miniupnpd is
          now ignoring NOTIFY packets sent by other devices and is
          writing is own pid to /var/run/miniupnpd.pi

        1 Reply Last reply Reply Quote 0
        • S
          sullrich
          last edited by

          This package is really coming together!  Nice work!

          1 Reply Last reply Reply Quote 0
          • R
            rsw686
            last edited by

            Embedded users here are the update instructions. Upload the following file using the command prompt page under diagnostics on the webgui.

            http://wgnrs.dynalias.com:81/pfsense/miniupnpd/sh-update-miniupnpd.sh

            Afterwards either use the console terminal or ssh into the box. Select option 8 shell. Enter the following commands

            
            cd /tmp
            chmod +x sh-update-miniupnpd.sh
            ./sh-update-miniupnpd.sh
            
            

            The results should like similar to below.

            
            rules cleared
            nat cleared
            /usr/local/sbin/miniupnpd                     100% of   45 kB  344 kBps
            /usr/local/pkg/miniupnpd.inc                  100% of 3285  B  413 kBps
            /usr/local/pkg/miniupnpd.xml                  100% of 2081  B  647 kBps
            /usr/local/www/status_upnp.php                100% of 4185  B 1018 kBps
            Syncing packages: miniupnpd.
            
            

            Otherwise if you want to reflash the image is

            http://wgnrs.dynalias.com:81/pfsense/pfSense-Embedded-1.0-RELEASE-Miniupnpd.img.gz

            1 Reply Last reply Reply Quote 0
            • R
              rsw686
              last edited by

              I just commited version 20061028. I found a memory leak in all the previous versions so its highly recommend that you upgrade.

              WinXP now shows connected for the Internet Connection Gateway and you can double-click on it and view the status. Although only the uptime is correct, the bytes sent and received are fixed currently.

              Full installs just reinstall the package, embedded the above post has the instructions for you. I updated the sh-update-miniupnpd.sh script to show the md5sum after the update. That way you're sure you have the correct version.

              md5sum miniupnpd: B47F17A416847945F1BBCFA9C2A45052

              1 Reply Last reply Reply Quote 0
              • R
                rsw686
                last edited by

                This thread has gotten relatively quiet. I'm almost done adding the ability to enable/disable logging of packets passed by miniupnpd rules. That way if your running bittorent or another app which fills the firewall log you can stop that and see packets being passed by other rules. I just need to see if Thomas will include it in the official miniupnpd source and release a new version or not?

                Any other suggestions or complaints?

                1 Reply Last reply Reply Quote 0
                • R
                  rsw686
                  last edited by

                  I just committed version 20061029 which includes selectable logging of rules handled by miniupnpd. Embeddeds you can download the image below which is pfSense 1.0.1 with miniupnpd and the corporate theme files added.

                  http://wgnrs.dynalias.com:81/pfsense/pfSense-1.0.1-Embedded-Miniupnpd.img.gz
                  md5sum: EC25DF20C1B6B296480A480D1EE57FD2

                  For those wondering about the corporate theme see the following. I found it too nice a theme to not include. I personally use it on my box and its easier to not have to change the script when building the image to post here. However if theres objection I can drop it from future versions.

                  http://forum.pfsense.org/index.php/topic,2501.msg15220.html#new

                  Or if you go back a few posts you can upgrade your existing embedded install using the instructions provided.
                  md5sum miniupnpd: 0A42E0752ADBA5AFE94CF89C702F8609

                  1 Reply Last reply Reply Quote 0
                  • Z
                    ZPrime
                    last edited by

                    @rsw686:

                    I just committed version 20061029 which includes selectable logging of rules handled by miniupnpd. Embeddeds you can download the image below which is pfSense 1.0.1 with miniupnpd and the corporate theme files added.

                    http://wgnrs.dynalias.com:81/pfsense/pfSense-1.0.1-Embedded-Miniupnpd.img.gz
                    md5sum: EC25DF20C1B6B296480A480D1EE57FD2

                    Should I be able to flash this from within a running pf?  Or is this a pull-card-and-re-write image only?

                    I propose that you start a fresh thread in one of the other sections that is embedded-specific…  I like your modifications (adding upnp, the extra theme) and frequent updates, but I wouldn't want to clutter this thread up with irrelevant information...

                    1 Reply Last reply Reply Quote 0
                    • R
                      rsw686
                      last edited by

                      @bradenmcg:

                      Should I be able to flash this from within a running pf?  Or is this a pull-card-and-re-write image only?

                      I propose that you start a fresh thread in one of the other sections that is embedded-specific…  I like your modifications (adding upnp, the extra theme) and frequent updates, but I wouldn't want to clutter this thread up with irrelevant information...

                      No you need to pull the card and rewrite the image. Or you can update within your current version if you read back a few posts.

                      I could start another thread however frequent updates are for full installs (can reinstall from the package manager) and embeddeds. I just post the embedded image link alongside. The last two updates adressed major issues (one major memory leak, one small, and selectable logging so your firewall log doesn't fill).

                      I won't be adding anything else other than miniupnpd and the coporate theme (if theres no objections) to the image. Otherwise it becomes to specific.

                      1 Reply Last reply Reply Quote 0
                      • Z
                        ZPrime
                        last edited by

                        Gotcha.  I already patched myself using your script (very handy!) and I'm going to go grab the corporate theme "the hard way," although it looks like I may have a fresh reflash coming since 1.0.1 seems to have broken the serial console on embedded.  :(

                        1 Reply Last reply Reply Quote 0
                        • R
                          rsw686
                          last edited by

                          Been working on miniupnpd lately and now have the bytes/packets in/out implemented. I am waiting on Thomas to include this in his source and put out a new version. That way I'm not branching off from his source. Anyways for those who would like to have the latest and greatest here ya go.

                          http://wgnrs.dynalias.com:81/pfsense/miniupnpd/devel/miniupnpd
                          md5: CB9C843FD9A01CFD55AD280F497A45E2

                          http://wgnrs.dynalias.com:81/pfsense/miniupnpd/sh-replace-binary.sh

                          To install on full installs or embedded install upload the above two files. Then from ssh or the console enter the shell - option 8. Run the following commands. The resulting md5 should match above.

                          cd /tmp
                          chmod +x sh-replace-binary.sh
                          ./sh-replace-binary.sh miniupnpd

                          1 Reply Last reply Reply Quote 0
                          • S
                            sullrich
                            last edited by

                            Nice work :)

                            1 Reply Last reply Reply Quote 0
                            • R
                              rsw686
                              last edited by

                              @sullrich:

                              Nice work :)

                              Thanks!! I worked on this some more and have added the ability to set the maximum downstream and upstream bitrates, and the option to use the pfSense system uptime instead of the daemon uptime. I am going to talk to Thomas and see if he will include these options. If not I will most likely add just include them in his future releases (reasons follow).

                              I like the option of seeing the pfSense system uptime as the dhcp renewal on the wan interface restarts miniupnpd every 12 hours (varying on your ISP) so its uptime serves no purpose to me. Maybe I should just have it default this way and not give the option in the package gui? I'm sure others have this same issue as well. The above post with the WinXP screenshot where is says duration is the uptime.

                              Also the bitrate is currently hard coded. I have a feeling some UPnP programs use this to determine the ideal amount of bandwidth to use for downloading, etc.

                              Heres a screenshot of the package gui. I'm debating on how the downstream and upstream bandwidths should be inputed, in bitrate as shown, Mbps, etc. I'm thinking bitrates are hard to read quickly as the values shown are 5Mbps down/2Mbps up. Then again if I do it in Mbps people on 768/128 DSL would be fractional. So maybe the best option is Kbps.

                              Of course these fields are all optional. The only required field is the interface. If the bitrates are omitted miniupnpd will use the nic link speed which most likely would be 100Mbps maybe 10Mbps.

                              Comments and suggestions are appreciated.

                              1 Reply Last reply Reply Quote 0
                              • B
                                billm
                                last edited by

                                Auto fill in the bitrate from the shaper settings (in kbps) if set :)

                                –Bill

                                pfSense core developer
                                blog - http://www.ucsecurity.com/
                                twitter - billmarquette

                                1 Reply Last reply Reply Quote 0
                                • S
                                  sullrich
                                  last edited by

                                  @billm:

                                  Auto fill in the bitrate from the shaper settings (in kbps) if set :)

                                  –Bill

                                  Yes, please!  I know for a fact a lot of folks are entering the WRONG values for the shaper.  Hell, if it bit me, I know it is biting others!

                                  bits to kilobytes to megabytes to petabytes… Who needs this burden to do math...  This is one of the things I hope to fix before 2.0 comes out.

                                  1 Reply Last reply Reply Quote 0
                                  • R
                                    rsw686
                                    last edited by

                                    @sullrich:

                                    @billm:

                                    Auto fill in the bitrate from the shaper settings (in kbps) if set :)

                                    –Bill

                                    Yes, please!  I know for a fact a lot of folks are entering the WRONG values for the shaper.  Hell, if it bit me, I know it is biting others!

                                    bits to kilobytes to megabytes to petabytes… Who needs this burden to do math...  This is one of the things I hope to fix before 2.0 comes out.

                                    Sure I can do that. Is there a way to hide the xml fields if using the shaper values and show them otherwise? I don't see how there is, but figured I'd ask.

                                    Otherwise I think the best option is to hide the fields and use the traffic shaper values behind the scenes. Showing them would just confuse people and they might start changing them. I did some testing with the traffic shaper setup and even if the user doesn't want the traffic shaper if they just go through the first page and define the lan and wan speeds it will save that to the config. Then they can just click next and click the pfSense logo and it will leave the shaper disabled.

                                    Only thing left is how to inform the user of the above. I didn't see a field type I could put in the xml file to just show text on the configuration page.

                                    1 Reply Last reply Reply Quote 0
                                    • S
                                      sullrich
                                      last edited by

                                      @rsw686:

                                      @sullrich:

                                      @billm:

                                      Auto fill in the bitrate from the shaper settings (in kbps) if set :)

                                      –Bill

                                      Yes, please!  I know for a fact a lot of folks are entering the WRONG values for the shaper.  Hell, if it bit me, I know it is biting others!

                                      bits to kilobytes to megabytes to petabytes… Who needs this burden to do math...  This is one of the things I hope to fix before 2.0 comes out.

                                      Sure I can do that. Is there a way to hide the xml fields if using the shaper values and show them otherwise? I don't see how there is, but figured I'd ask.

                                      Otherwise I think the best option is to hide the fields and use the traffic shaper values behind the scenes. Showing them would just confuse people. I did some testing with the traffic shaper setup and even if the user doesn't want the traffic shaper if they just go through the first page and define the lan and wan speeds it will save that to the config. Then they can just click next and click the pfSense logo and it will leave the shaper disabled.

                                      Only thing left is how to inform the user of the above. I didn't see a field type I could put in the xml file to just show text on the configuration page.

                                      Sure.  Simply unset the items from the xml array in the pre processing functions.  I'd have to look at which one it is but IIRC its something like before_form or something or other.  Grep should find it.

                                      1 Reply Last reply Reply Quote 0
                                      • R
                                        rsw686
                                        last edited by

                                        @sullrich:

                                        Sure.  Simply unset the items from the xml array in the pre processing functions.  I'd have to look at which one it is but IIRC its something like before_form or something or other.  Grep should find it.

                                        Sounds like a plan. I will look into that.

                                        Alright I got it all working. When the shaper values are defined the fields are hidden and the values from the shaper are used. Otherwise the user can fill in the values. Thomas got back to me and theres a few things I still need to resolve. I should have the new version committed Wednesday night.

                                        1 Reply Last reply Reply Quote 0
                                        • R
                                          rsw686
                                          last edited by

                                          I just committed version 20061107. Full installs reinstall the package via the package manager. Embedded install you can use the sh-update-miniupnpd.sh talked about a few posts back or reflash.

                                          http://wgnrs.dynalias.com:81/pfsense/miniupnpd/sh-update-miniupnpd.sh
                                          http://wgnrs.dynalias.com:81/pfsense/pfSense-1.0.1-Embedded-Miniupnpd.img.gz

                                          miniupnpd 20061107: CB9C843FD9A01CFD55AD280F497A45E2

                                          1 Reply Last reply Reply Quote 0
                                          • Z
                                            ZPrime
                                            last edited by

                                            spectacular stuff.  Looking back at last Feb. I'm amazed at how far this project has come.  :)  My continued thanks to all of you who have put effort into UPnP as it has made my life at home a lot easier.  (No more screwing around with port forwards for random IM clients and stuff…)  Plus, I can have 2 xbox 360s under one roof without any problems.  ;D

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.