I've two private networks (each of them behind a typical dsl router). The routers are connected to the WWW. The extern interface of each router have one dynamic IP address. I want to stream data via UDP directly between one client in private network A and one client in private network B.
I've already tried a lot of things (see: http://en.wikipedia.org/wiki/UDP_hole_punching, or STUN). But it wasn't possible for me to transfer data between the two clients.
It's possible to use a server (located in the WWW, with static IP) to transfer the extern IPs (and extern ports) from the routers between the clients. So imagine client A knows client B's external IP and client B's external port assigned by his router.
I simply tried sending UDP packet to the receivers external IP/port combination, but without any result. So does anyone know what do to communicate via UDP throw the two NAT routers? It must be possible??? Or does Skype, for example, not directly communicate between the clients when the call eachother (voice over ip).
I am sorry for my bad English! If something is confusing don't mind asking me!!!
Thanks for your help in advance.
I can't get pwnat or chownat working.
I tried it with my own dsl-gateway -> didn't work.
Then I set up a complete virtual environment using VMWare.
C1 (Client 1, WinXP Prof SP3): 172.16.16.100/24, GW 172.16.16.1
C2 (Client 2, WinXP Prof SP3): 10.0.0.100/24, GW 10.0.0.1
C3 (Client 3, WinXP Prof SP3): 188.8.131.52/24, GW 184.108.40.206
S1 (Ubuntu 10.04 x64 Server): eth0: 172.16.16.1/24, eth1: 220.127.116.11/24 GW 18.104.22.168
S2 (Ubuntu 10.04 x64 Server): eth0: 10.0.0.1/24, eth1: 22.214.171.124/24 GW 126.96.36.199
S3 (Ubuntu 10.04 x64 Server): eth0: 188.8.131.52/24, eth1: 184.108.40.206/24, eth2: 220.127.116.11/24
+--+ +--+ +--+ +--+ +--+ |C1|-----|S1|-----|S3|-----|S2|-----|C2| +--+ +--+ +--+ +--+ +--+ | +--+ |C3| +--+
Server S1 and S2 provide NAT functionality. (they have routing enabled and provide a firewall, which allows trafic from the internal net and provide the nat functionality) Server S3 has routing enabled. The client firewalls are turned off.
C1 and C2 are able to ping C3, e.g. visit C3's webserver. They are also able to send UDP Packets to C3 (C3 successful receives them)!
C1 and C2 have also webservers running for test reasons.
I run ""chownat -s 80 18.104.22.168"" at C1, and ""chownat -c 8000 22.214.171.124"" at C2. Then I tried to access the Webpage from C1 via webbrower localhost at port 8000. It didn't work.
Can anybody help me? Any suggestions? If you have any questions to my question, please ask!