ufw application profile to allow for specific source ports












0















I have UFW and PlexMediaServer setup on my server. I have a UFW profile for PMS as so:



[PlexMediaServer]
title=Plex Media Server
description=This opens up PlexMediaServer for http (32400), upnp, and autodiscovery.
ports=32469/tcp|32413/udp|1900/udp|32400/tcp|32412/udp|32410/udp|32414/udp|32400/udp


This is almost working. When I check my UFW logs I see entries like this:



Mar 28 19:57:03 nook kernel: [331212.683123] [UFW BLOCK] IN=eno1 OUT= MAC=[redacted] SRC=[IP of another computer] DST=[IP of my server] LEN=282 TOS=0x00 PREC=0x00 TTL=64 ID=56639 DF PROTO=UDP SPT=1900 DPT=60721 LEN=262
Mar 28 19:57:28 nook kernel: [331236.942353] [UFW BLOCK] IN=eno1 OUT= MAC=[redacted] SRC=[IP of another computer] DST=[IP of my server] LEN=282 TOS=0x00 PREC=0x00 TTL=64 ID=57752 DF PROTO=UDP SPT=1900 DPT=60721 LEN=262
Mar 28 19:57:47 nook kernel: [331255.970736] [UFW BLOCK] IN=eno1 OUT= MAC=[redacted] SRC=[IP of another computer] DST=[IP of my server] LEN=282 TOS=0x00 PREC=0x00 TTL=64 ID=58572 DF PROTO=UDP SPT=1900 DPT=60721 LEN=262
Mar 28 19:58:07 nook kernel: [331276.296187] [UFW BLOCK] IN=eno1 OUT= MAC=[redacted] SRC=[IP of another computer] DST=[IP of my server] LEN=282 TOS=0x00 PREC=0x00 TTL=64 ID=59969 DF PROTO=UDP SPT=1900 DPT=60721 LEN=262


I have concluded this is because of PMS. It looks like PMS is trying to do discovery on other devices on my network and those devices are replying but then UFW is blocking them.



So I want to add something to my PMS profile for UFW that allows these requests. I think I need to add something that says allow where source IP matches 192.168.1.X and source port is 1900.



How can I do this?










share|improve this question























  • Useful information here: askubuntu.com/questions/409013/…

    – TooManyPets
    Mar 29 '18 at 16:58













  • Thanks. I saw that but couldn't figure out how to do what I am trying to.

    – IMTheNachoMan
    Mar 30 '18 at 1:28
















0















I have UFW and PlexMediaServer setup on my server. I have a UFW profile for PMS as so:



[PlexMediaServer]
title=Plex Media Server
description=This opens up PlexMediaServer for http (32400), upnp, and autodiscovery.
ports=32469/tcp|32413/udp|1900/udp|32400/tcp|32412/udp|32410/udp|32414/udp|32400/udp


This is almost working. When I check my UFW logs I see entries like this:



Mar 28 19:57:03 nook kernel: [331212.683123] [UFW BLOCK] IN=eno1 OUT= MAC=[redacted] SRC=[IP of another computer] DST=[IP of my server] LEN=282 TOS=0x00 PREC=0x00 TTL=64 ID=56639 DF PROTO=UDP SPT=1900 DPT=60721 LEN=262
Mar 28 19:57:28 nook kernel: [331236.942353] [UFW BLOCK] IN=eno1 OUT= MAC=[redacted] SRC=[IP of another computer] DST=[IP of my server] LEN=282 TOS=0x00 PREC=0x00 TTL=64 ID=57752 DF PROTO=UDP SPT=1900 DPT=60721 LEN=262
Mar 28 19:57:47 nook kernel: [331255.970736] [UFW BLOCK] IN=eno1 OUT= MAC=[redacted] SRC=[IP of another computer] DST=[IP of my server] LEN=282 TOS=0x00 PREC=0x00 TTL=64 ID=58572 DF PROTO=UDP SPT=1900 DPT=60721 LEN=262
Mar 28 19:58:07 nook kernel: [331276.296187] [UFW BLOCK] IN=eno1 OUT= MAC=[redacted] SRC=[IP of another computer] DST=[IP of my server] LEN=282 TOS=0x00 PREC=0x00 TTL=64 ID=59969 DF PROTO=UDP SPT=1900 DPT=60721 LEN=262


I have concluded this is because of PMS. It looks like PMS is trying to do discovery on other devices on my network and those devices are replying but then UFW is blocking them.



So I want to add something to my PMS profile for UFW that allows these requests. I think I need to add something that says allow where source IP matches 192.168.1.X and source port is 1900.



How can I do this?










share|improve this question























  • Useful information here: askubuntu.com/questions/409013/…

    – TooManyPets
    Mar 29 '18 at 16:58













  • Thanks. I saw that but couldn't figure out how to do what I am trying to.

    – IMTheNachoMan
    Mar 30 '18 at 1:28














0












0








0








I have UFW and PlexMediaServer setup on my server. I have a UFW profile for PMS as so:



[PlexMediaServer]
title=Plex Media Server
description=This opens up PlexMediaServer for http (32400), upnp, and autodiscovery.
ports=32469/tcp|32413/udp|1900/udp|32400/tcp|32412/udp|32410/udp|32414/udp|32400/udp


This is almost working. When I check my UFW logs I see entries like this:



Mar 28 19:57:03 nook kernel: [331212.683123] [UFW BLOCK] IN=eno1 OUT= MAC=[redacted] SRC=[IP of another computer] DST=[IP of my server] LEN=282 TOS=0x00 PREC=0x00 TTL=64 ID=56639 DF PROTO=UDP SPT=1900 DPT=60721 LEN=262
Mar 28 19:57:28 nook kernel: [331236.942353] [UFW BLOCK] IN=eno1 OUT= MAC=[redacted] SRC=[IP of another computer] DST=[IP of my server] LEN=282 TOS=0x00 PREC=0x00 TTL=64 ID=57752 DF PROTO=UDP SPT=1900 DPT=60721 LEN=262
Mar 28 19:57:47 nook kernel: [331255.970736] [UFW BLOCK] IN=eno1 OUT= MAC=[redacted] SRC=[IP of another computer] DST=[IP of my server] LEN=282 TOS=0x00 PREC=0x00 TTL=64 ID=58572 DF PROTO=UDP SPT=1900 DPT=60721 LEN=262
Mar 28 19:58:07 nook kernel: [331276.296187] [UFW BLOCK] IN=eno1 OUT= MAC=[redacted] SRC=[IP of another computer] DST=[IP of my server] LEN=282 TOS=0x00 PREC=0x00 TTL=64 ID=59969 DF PROTO=UDP SPT=1900 DPT=60721 LEN=262


I have concluded this is because of PMS. It looks like PMS is trying to do discovery on other devices on my network and those devices are replying but then UFW is blocking them.



So I want to add something to my PMS profile for UFW that allows these requests. I think I need to add something that says allow where source IP matches 192.168.1.X and source port is 1900.



How can I do this?










share|improve this question














I have UFW and PlexMediaServer setup on my server. I have a UFW profile for PMS as so:



[PlexMediaServer]
title=Plex Media Server
description=This opens up PlexMediaServer for http (32400), upnp, and autodiscovery.
ports=32469/tcp|32413/udp|1900/udp|32400/tcp|32412/udp|32410/udp|32414/udp|32400/udp


This is almost working. When I check my UFW logs I see entries like this:



Mar 28 19:57:03 nook kernel: [331212.683123] [UFW BLOCK] IN=eno1 OUT= MAC=[redacted] SRC=[IP of another computer] DST=[IP of my server] LEN=282 TOS=0x00 PREC=0x00 TTL=64 ID=56639 DF PROTO=UDP SPT=1900 DPT=60721 LEN=262
Mar 28 19:57:28 nook kernel: [331236.942353] [UFW BLOCK] IN=eno1 OUT= MAC=[redacted] SRC=[IP of another computer] DST=[IP of my server] LEN=282 TOS=0x00 PREC=0x00 TTL=64 ID=57752 DF PROTO=UDP SPT=1900 DPT=60721 LEN=262
Mar 28 19:57:47 nook kernel: [331255.970736] [UFW BLOCK] IN=eno1 OUT= MAC=[redacted] SRC=[IP of another computer] DST=[IP of my server] LEN=282 TOS=0x00 PREC=0x00 TTL=64 ID=58572 DF PROTO=UDP SPT=1900 DPT=60721 LEN=262
Mar 28 19:58:07 nook kernel: [331276.296187] [UFW BLOCK] IN=eno1 OUT= MAC=[redacted] SRC=[IP of another computer] DST=[IP of my server] LEN=282 TOS=0x00 PREC=0x00 TTL=64 ID=59969 DF PROTO=UDP SPT=1900 DPT=60721 LEN=262


I have concluded this is because of PMS. It looks like PMS is trying to do discovery on other devices on my network and those devices are replying but then UFW is blocking them.



So I want to add something to my PMS profile for UFW that allows these requests. I think I need to add something that says allow where source IP matches 192.168.1.X and source port is 1900.



How can I do this?







firewall ufw plex






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 29 '18 at 0:05









IMTheNachoManIMTheNachoMan

257212




257212













  • Useful information here: askubuntu.com/questions/409013/…

    – TooManyPets
    Mar 29 '18 at 16:58













  • Thanks. I saw that but couldn't figure out how to do what I am trying to.

    – IMTheNachoMan
    Mar 30 '18 at 1:28



















  • Useful information here: askubuntu.com/questions/409013/…

    – TooManyPets
    Mar 29 '18 at 16:58













  • Thanks. I saw that but couldn't figure out how to do what I am trying to.

    – IMTheNachoMan
    Mar 30 '18 at 1:28

















Useful information here: askubuntu.com/questions/409013/…

– TooManyPets
Mar 29 '18 at 16:58







Useful information here: askubuntu.com/questions/409013/…

– TooManyPets
Mar 29 '18 at 16:58















Thanks. I saw that but couldn't figure out how to do what I am trying to.

– IMTheNachoMan
Mar 30 '18 at 1:28





Thanks. I saw that but couldn't figure out how to do what I am trying to.

– IMTheNachoMan
Mar 30 '18 at 1:28










1 Answer
1






active

oldest

votes


















0














This is probably the router trying to discover devices in your specific subnet. You need to use "port number" after the "from IP or subnet of origin" to allow the specific source port.



In my particular use case I use the following command



# ufw allow proto udp from 192.168.0.0/24 port 1900 to any comment UPnP


Hope it helps you and the people searching this specific problem.






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "89"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1020123%2fufw-application-profile-to-allow-for-specific-source-ports%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    This is probably the router trying to discover devices in your specific subnet. You need to use "port number" after the "from IP or subnet of origin" to allow the specific source port.



    In my particular use case I use the following command



    # ufw allow proto udp from 192.168.0.0/24 port 1900 to any comment UPnP


    Hope it helps you and the people searching this specific problem.






    share|improve this answer




























      0














      This is probably the router trying to discover devices in your specific subnet. You need to use "port number" after the "from IP or subnet of origin" to allow the specific source port.



      In my particular use case I use the following command



      # ufw allow proto udp from 192.168.0.0/24 port 1900 to any comment UPnP


      Hope it helps you and the people searching this specific problem.






      share|improve this answer


























        0












        0








        0







        This is probably the router trying to discover devices in your specific subnet. You need to use "port number" after the "from IP or subnet of origin" to allow the specific source port.



        In my particular use case I use the following command



        # ufw allow proto udp from 192.168.0.0/24 port 1900 to any comment UPnP


        Hope it helps you and the people searching this specific problem.






        share|improve this answer













        This is probably the router trying to discover devices in your specific subnet. You need to use "port number" after the "from IP or subnet of origin" to allow the specific source port.



        In my particular use case I use the following command



        # ufw allow proto udp from 192.168.0.0/24 port 1900 to any comment UPnP


        Hope it helps you and the people searching this specific problem.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Feb 15 at 17:42









        Emilio AburtoEmilio Aburto

        11




        11






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Ask Ubuntu!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1020123%2fufw-application-profile-to-allow-for-specific-source-ports%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How to make a Squid Proxy server?

            第一次世界大戦

            Touch on Surface Book