开发者

Listening for packets directed to my WAN IP?

开发者 https://www.devze.com 2023-02-07 09:11 出处:网络
Currently I\'m experimenting with sockets and UDP packets. I created a UDP soc开发者_运维知识库ket and binded it to 127.0.0.1, and when sending a UDP packet to 127.0.0.1, the server successfully rece

Currently I'm experimenting with sockets and UDP packets.

I created a UDP soc开发者_运维知识库ket and binded it to 127.0.0.1, and when sending a UDP packet to 127.0.0.1, the server successfully received it.

But I want to be able to send UDP packets from external locations to my server and receive them. How would I do this?


That depends on your network topology and may be more of a question for http://serverfault.com.

Assuming your server is behind a NAT device, i.e. a router, you'd need to configure said device to forward a certain port to your server. Any packet reaching the NAT device on the public IP address on that port will be forwarded to the server as if it had been sent to the server directly.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号