UDP packet and firewall












1














I notice when I send udp packets from computer A to computer B,
B can receive the upd packets correctly
but if I send udp packets from computer B to computer A
the udp packets are not received



A and B are not in the same network, and they are all with public IP, they are not behind NAT.



does this mean there is a firewall in between which prevents A from receiving udp packets from B? if A sends some udp packets to B before B sends udp packets to A, will the firewall remember this and then allow the udp packets from B to A ?



I know TCP is stateful and so firewall have a lot of measures to block some malicious TCP packets, like TCP SYN flooding, but how firewall block UDP packets? are there any good articles about this?



because A is my computer in a office. I want to build a system so that a UDP program on A can receive packets from outside. But it seems the firewall filters all the incoming udp packets. I'm wondering, if I use a commercial UDP-based program, like UDP-based video streaming tool or website, can I watch videos?



thanks










share|improve this question
















bumped to the homepage by Community 2 days ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.




















    1














    I notice when I send udp packets from computer A to computer B,
    B can receive the upd packets correctly
    but if I send udp packets from computer B to computer A
    the udp packets are not received



    A and B are not in the same network, and they are all with public IP, they are not behind NAT.



    does this mean there is a firewall in between which prevents A from receiving udp packets from B? if A sends some udp packets to B before B sends udp packets to A, will the firewall remember this and then allow the udp packets from B to A ?



    I know TCP is stateful and so firewall have a lot of measures to block some malicious TCP packets, like TCP SYN flooding, but how firewall block UDP packets? are there any good articles about this?



    because A is my computer in a office. I want to build a system so that a UDP program on A can receive packets from outside. But it seems the firewall filters all the incoming udp packets. I'm wondering, if I use a commercial UDP-based program, like UDP-based video streaming tool or website, can I watch videos?



    thanks










    share|improve this question
















    bumped to the homepage by Community 2 days ago


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.


















      1












      1








      1







      I notice when I send udp packets from computer A to computer B,
      B can receive the upd packets correctly
      but if I send udp packets from computer B to computer A
      the udp packets are not received



      A and B are not in the same network, and they are all with public IP, they are not behind NAT.



      does this mean there is a firewall in between which prevents A from receiving udp packets from B? if A sends some udp packets to B before B sends udp packets to A, will the firewall remember this and then allow the udp packets from B to A ?



      I know TCP is stateful and so firewall have a lot of measures to block some malicious TCP packets, like TCP SYN flooding, but how firewall block UDP packets? are there any good articles about this?



      because A is my computer in a office. I want to build a system so that a UDP program on A can receive packets from outside. But it seems the firewall filters all the incoming udp packets. I'm wondering, if I use a commercial UDP-based program, like UDP-based video streaming tool or website, can I watch videos?



      thanks










      share|improve this question















      I notice when I send udp packets from computer A to computer B,
      B can receive the upd packets correctly
      but if I send udp packets from computer B to computer A
      the udp packets are not received



      A and B are not in the same network, and they are all with public IP, they are not behind NAT.



      does this mean there is a firewall in between which prevents A from receiving udp packets from B? if A sends some udp packets to B before B sends udp packets to A, will the firewall remember this and then allow the udp packets from B to A ?



      I know TCP is stateful and so firewall have a lot of measures to block some malicious TCP packets, like TCP SYN flooding, but how firewall block UDP packets? are there any good articles about this?



      because A is my computer in a office. I want to build a system so that a UDP program on A can receive packets from outside. But it seems the firewall filters all the incoming udp packets. I'm wondering, if I use a commercial UDP-based program, like UDP-based video streaming tool or website, can I watch videos?



      thanks







      networking security firewall iptables udp






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 28 '13 at 11:42







      user1944267

















      asked Mar 28 '13 at 10:38









      user1944267user1944267

      10614




      10614





      bumped to the homepage by Community 2 days ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community 2 days ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
























          3 Answers
          3






          active

          oldest

          votes


















          0














          Sounds like computer B is behind a NAT router. If this is true, then every machine behind that router will look like it has the same IP address from computer A's point of view.



          When NAT is involved, outgoing traffic causes the NAT router to remember the originator of that traffic for that destination IP for a while, so that when traffic is received from that same destination IP address, the NAT router knows who to "give the traffic back to."



          When the NAT router receives unexpected traffic from the "outside", it doesn't know who to "give the traffic back to" unless you tell it with port forwarding rules.



          NAT isn't really concerned with the type of traffic, except that some protocols don't work well with NAT by default because IP addresses are coded into the payload of the protocols. NAT typically only modifies the source IP field of packets, but in the case of things like FTP a "helper" may be needed that modifies the actual payload of the packet.



          A firewall can "block" a packet, of any type by:




          • sending an ICMP message back saying the packet is rejected for a specific reason

          • simply not responding at all

          • then there's hacky stuff like tarpits.


          The only way "statefulness" affects that is that a firewall is going to usually treat new TCP connections very differently from existing ones - there will be "new" and "established" traffic.



          UDP by definition is NOT a connection-oriented protocol, so there is no state to keep track of as far as OSI layers 2-4 are concerned. All incoming UDP connections are treated as "new" or the same.



          The server or client that uses UDP to communicate may keep track of some state (a teensy bit of state is needed for things like TFTP to work - the TFTP client/server keep track of that on their own). But the TCP/IP stack isn't supposed to.






          share|improve this answer





















          • A and B are not in the same network, and they are all with public IP, they are not behind NAT.
            – user1944267
            Mar 28 '13 at 11:37



















          0














          Possible reasons are (1) firewalls (2) wrong routing information (3) NAT somewhere on the path, even if you don't know about it.



          Debug the network with traceroute and ping from both sides, see what is in between both computers, and see where the block is.



          (As the question is 5 years old, it's unlikely to get more details...)






          share|improve this answer





























            0














            Just go into both firewalls or advanced firewall settings and create a rule for incoming/outgoing UDP with specific machine info or ips. Can also access via PS but I recommend going directly to the MMC or firewall.






            share|improve this answer





















              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "3"
              };
              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%2fsuperuser.com%2fquestions%2f573643%2fudp-packet-and-firewall%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              0














              Sounds like computer B is behind a NAT router. If this is true, then every machine behind that router will look like it has the same IP address from computer A's point of view.



              When NAT is involved, outgoing traffic causes the NAT router to remember the originator of that traffic for that destination IP for a while, so that when traffic is received from that same destination IP address, the NAT router knows who to "give the traffic back to."



              When the NAT router receives unexpected traffic from the "outside", it doesn't know who to "give the traffic back to" unless you tell it with port forwarding rules.



              NAT isn't really concerned with the type of traffic, except that some protocols don't work well with NAT by default because IP addresses are coded into the payload of the protocols. NAT typically only modifies the source IP field of packets, but in the case of things like FTP a "helper" may be needed that modifies the actual payload of the packet.



              A firewall can "block" a packet, of any type by:




              • sending an ICMP message back saying the packet is rejected for a specific reason

              • simply not responding at all

              • then there's hacky stuff like tarpits.


              The only way "statefulness" affects that is that a firewall is going to usually treat new TCP connections very differently from existing ones - there will be "new" and "established" traffic.



              UDP by definition is NOT a connection-oriented protocol, so there is no state to keep track of as far as OSI layers 2-4 are concerned. All incoming UDP connections are treated as "new" or the same.



              The server or client that uses UDP to communicate may keep track of some state (a teensy bit of state is needed for things like TFTP to work - the TFTP client/server keep track of that on their own). But the TCP/IP stack isn't supposed to.






              share|improve this answer





















              • A and B are not in the same network, and they are all with public IP, they are not behind NAT.
                – user1944267
                Mar 28 '13 at 11:37
















              0














              Sounds like computer B is behind a NAT router. If this is true, then every machine behind that router will look like it has the same IP address from computer A's point of view.



              When NAT is involved, outgoing traffic causes the NAT router to remember the originator of that traffic for that destination IP for a while, so that when traffic is received from that same destination IP address, the NAT router knows who to "give the traffic back to."



              When the NAT router receives unexpected traffic from the "outside", it doesn't know who to "give the traffic back to" unless you tell it with port forwarding rules.



              NAT isn't really concerned with the type of traffic, except that some protocols don't work well with NAT by default because IP addresses are coded into the payload of the protocols. NAT typically only modifies the source IP field of packets, but in the case of things like FTP a "helper" may be needed that modifies the actual payload of the packet.



              A firewall can "block" a packet, of any type by:




              • sending an ICMP message back saying the packet is rejected for a specific reason

              • simply not responding at all

              • then there's hacky stuff like tarpits.


              The only way "statefulness" affects that is that a firewall is going to usually treat new TCP connections very differently from existing ones - there will be "new" and "established" traffic.



              UDP by definition is NOT a connection-oriented protocol, so there is no state to keep track of as far as OSI layers 2-4 are concerned. All incoming UDP connections are treated as "new" or the same.



              The server or client that uses UDP to communicate may keep track of some state (a teensy bit of state is needed for things like TFTP to work - the TFTP client/server keep track of that on their own). But the TCP/IP stack isn't supposed to.






              share|improve this answer





















              • A and B are not in the same network, and they are all with public IP, they are not behind NAT.
                – user1944267
                Mar 28 '13 at 11:37














              0












              0








              0






              Sounds like computer B is behind a NAT router. If this is true, then every machine behind that router will look like it has the same IP address from computer A's point of view.



              When NAT is involved, outgoing traffic causes the NAT router to remember the originator of that traffic for that destination IP for a while, so that when traffic is received from that same destination IP address, the NAT router knows who to "give the traffic back to."



              When the NAT router receives unexpected traffic from the "outside", it doesn't know who to "give the traffic back to" unless you tell it with port forwarding rules.



              NAT isn't really concerned with the type of traffic, except that some protocols don't work well with NAT by default because IP addresses are coded into the payload of the protocols. NAT typically only modifies the source IP field of packets, but in the case of things like FTP a "helper" may be needed that modifies the actual payload of the packet.



              A firewall can "block" a packet, of any type by:




              • sending an ICMP message back saying the packet is rejected for a specific reason

              • simply not responding at all

              • then there's hacky stuff like tarpits.


              The only way "statefulness" affects that is that a firewall is going to usually treat new TCP connections very differently from existing ones - there will be "new" and "established" traffic.



              UDP by definition is NOT a connection-oriented protocol, so there is no state to keep track of as far as OSI layers 2-4 are concerned. All incoming UDP connections are treated as "new" or the same.



              The server or client that uses UDP to communicate may keep track of some state (a teensy bit of state is needed for things like TFTP to work - the TFTP client/server keep track of that on their own). But the TCP/IP stack isn't supposed to.






              share|improve this answer












              Sounds like computer B is behind a NAT router. If this is true, then every machine behind that router will look like it has the same IP address from computer A's point of view.



              When NAT is involved, outgoing traffic causes the NAT router to remember the originator of that traffic for that destination IP for a while, so that when traffic is received from that same destination IP address, the NAT router knows who to "give the traffic back to."



              When the NAT router receives unexpected traffic from the "outside", it doesn't know who to "give the traffic back to" unless you tell it with port forwarding rules.



              NAT isn't really concerned with the type of traffic, except that some protocols don't work well with NAT by default because IP addresses are coded into the payload of the protocols. NAT typically only modifies the source IP field of packets, but in the case of things like FTP a "helper" may be needed that modifies the actual payload of the packet.



              A firewall can "block" a packet, of any type by:




              • sending an ICMP message back saying the packet is rejected for a specific reason

              • simply not responding at all

              • then there's hacky stuff like tarpits.


              The only way "statefulness" affects that is that a firewall is going to usually treat new TCP connections very differently from existing ones - there will be "new" and "established" traffic.



              UDP by definition is NOT a connection-oriented protocol, so there is no state to keep track of as far as OSI layers 2-4 are concerned. All incoming UDP connections are treated as "new" or the same.



              The server or client that uses UDP to communicate may keep track of some state (a teensy bit of state is needed for things like TFTP to work - the TFTP client/server keep track of that on their own). But the TCP/IP stack isn't supposed to.







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Mar 28 '13 at 11:23









              LawrenceCLawrenceC

              58.7k10102179




              58.7k10102179












              • A and B are not in the same network, and they are all with public IP, they are not behind NAT.
                – user1944267
                Mar 28 '13 at 11:37


















              • A and B are not in the same network, and they are all with public IP, they are not behind NAT.
                – user1944267
                Mar 28 '13 at 11:37
















              A and B are not in the same network, and they are all with public IP, they are not behind NAT.
              – user1944267
              Mar 28 '13 at 11:37




              A and B are not in the same network, and they are all with public IP, they are not behind NAT.
              – user1944267
              Mar 28 '13 at 11:37













              0














              Possible reasons are (1) firewalls (2) wrong routing information (3) NAT somewhere on the path, even if you don't know about it.



              Debug the network with traceroute and ping from both sides, see what is in between both computers, and see where the block is.



              (As the question is 5 years old, it's unlikely to get more details...)






              share|improve this answer


























                0














                Possible reasons are (1) firewalls (2) wrong routing information (3) NAT somewhere on the path, even if you don't know about it.



                Debug the network with traceroute and ping from both sides, see what is in between both computers, and see where the block is.



                (As the question is 5 years old, it's unlikely to get more details...)






                share|improve this answer
























                  0












                  0








                  0






                  Possible reasons are (1) firewalls (2) wrong routing information (3) NAT somewhere on the path, even if you don't know about it.



                  Debug the network with traceroute and ping from both sides, see what is in between both computers, and see where the block is.



                  (As the question is 5 years old, it's unlikely to get more details...)






                  share|improve this answer












                  Possible reasons are (1) firewalls (2) wrong routing information (3) NAT somewhere on the path, even if you don't know about it.



                  Debug the network with traceroute and ping from both sides, see what is in between both computers, and see where the block is.



                  (As the question is 5 years old, it's unlikely to get more details...)







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Aug 30 '18 at 6:25









                  dirktdirkt

                  9,09231221




                  9,09231221























                      0














                      Just go into both firewalls or advanced firewall settings and create a rule for incoming/outgoing UDP with specific machine info or ips. Can also access via PS but I recommend going directly to the MMC or firewall.






                      share|improve this answer


























                        0














                        Just go into both firewalls or advanced firewall settings and create a rule for incoming/outgoing UDP with specific machine info or ips. Can also access via PS but I recommend going directly to the MMC or firewall.






                        share|improve this answer
























                          0












                          0








                          0






                          Just go into both firewalls or advanced firewall settings and create a rule for incoming/outgoing UDP with specific machine info or ips. Can also access via PS but I recommend going directly to the MMC or firewall.






                          share|improve this answer












                          Just go into both firewalls or advanced firewall settings and create a rule for incoming/outgoing UDP with specific machine info or ips. Can also access via PS but I recommend going directly to the MMC or firewall.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Sep 30 '18 at 20:03









                          Rebellia RoseRebellia Rose

                          11




                          11






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Super User!


                              • 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.





                              Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                              Please pay close attention to the following guidance:


                              • 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%2fsuperuser.com%2fquestions%2f573643%2fudp-packet-and-firewall%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?

                              Is this a new Fibonacci Identity?

                              19世紀