views:

50

answers:

1

I wanted to write a program with could send and receive data over a NAT router without having to set up port forwarding first. Do i need to use the bittorrent protocol or is there something better?

+2  A: 

BitTorrent is not a NAT traversal technology but a P2P file sharing protocol. Unless you want to transfer files BitTorrent probably won't help much.

Some routers will let you setup a port mapping using UPnP. (see this other question to find a Python UPnP client library)

An alternative would be to setup Teredo tunneling on your machine. That will hopefully take care of NAT traversal and give you a real unfirewalled IPv6 address behind your IPv4 NAT router.

Alexandre Jasmin