UDP hole Punching

后端 未结 2 1178
说谎
说谎 2021-02-09 02:37

I\'ve got some questions regarding hole punching with UDP. Based on the wiki http://en.wikipedia.org/wiki/UDP_hole_punching

1) To set up a UDP session between two partie

2条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-09 03:11

    1) Yes. However, you don't need hole punching if you're contacting a non-NATted server. Your client application just behaves normally.

    2) Yes.

    3) Some NATs do indeed restrict a public port to just one sender-receiver pair. If you need to hole-punch in such a scenario, your only chance is to guess the public port the NAT will choose for the direct connection.

    However, NAT is not a security feature. Therefore, accepting any packets to the public port is not a security hole as there is no difference to the simple case of a client directly connected to the internet.

提交回复
热议问题