i am working on a remote control program so i need to create connecting to the server(the remote pc) by MAC address (i cant go by ip because he is behind NAT)
Asked
Active
Viewed 82 times
-2
-
If you find a way to do it, please let us know so we can block it off. – Martin James Aug 10 '14 at 08:11
1 Answers
1
It is not possible to connect to a TCP/UDP server by its MAC address, you must use its IP address. Every TCP/UDP server has an IP address, even behind a NAT. TCP/UDP are designed around IP and are transport-agnostic so they can run on networks that are not based on Ethernet/MAC to begin with.
Since your server is behind a NAT, you must connect to the NAT's IP address, and the NAT must be configured to forward that connection to the server's IP address. You cannot avoid that, that is simply how NATs work. If the NAT supports uPNP, the server can programmably configure a port forwarding rule on the NAT. Otherwise the NAT admin must configure it manually.

Remy Lebeau
- 555,201
- 31
- 458
- 770