Skip to main content

 none
what the EndPoints should be used to access teredo interface from outside the LAN ? RRS feed

  • General discussion

  • I'm trying to build a UDP-based p2p c# application using Teredo , and I managed to enable this interface on my windows 7 OS using the command :

    netsh interface teredo>set state client teredo.remlab.net 60 23456


    and after activating it the command (netsh interface teredo show state printed :

    Type                    : client
    Server Name             : teredo.remlab.net
    Client Refresh Interval : 60 seconds
    Client Port             : 23456
    State                   : qualified
    Client Type             : teredo client
    Network                 : unmanaged
    NAT                     : symmetric (port)
    NAT Special Behaviour   : UPNP: Yes, PortPreserving: No
    Local Mapping           : 192.168.8.100:23456
    External NAT Mapping    : 188.247.74.161:37457

    and pinging google ipv6-based host using the command (ping -t -6 www.google.com) printed :


    Pinging www.google.com [2a00:1450:4007:807::2004] with 32 bytes of data:
    Request timed out.
    Reply from 2a00:1450:4007:807::2004: time=123ms
    Reply from 2a00:1450:4007:807::2004: time=121ms
    Reply from 2a00:1450:4007:807::2004: time=127ms

    now my question is : is this enough to say that I'm accessible from outside my Lan using teredo ? and if so .. what my external End points that will let other peers to access me ?

    this is my c# code for listen to the teredo interface (correct me if something wrong with it) :

    UdpClient Client = new UdpClient(23456, AddressFamily.InterNetworkV6);
    Client.AllowNatTraversal(true);
    Client.Client.SetIPProtectionLevel(IPProtectionLevel.Unrestricted);
    int counter = 0;
    while(true)
    {
        IPEndPoint RemoteIpEndPoint = new IPEndPoint(IPAddress.Any,0);
        Byte[] receiveBytes = Client.Receive(ref RemoteIpEndPoint);
        string returnData = Encoding.ASCII.GetString(receiveBytes);
        Console.WriteLine(RemoteIpEndPoint.Address.ToString() + ":" + returnData.ToString() + " -" + counter);
        counter++;
    }

    and this is my code for send a message from a peer to my pc (here I got confused) :

    UdpClient client = new UdpClient(AddressFamily.InterNetworkV6);
    byte[] Message = Encoding.ASCII.GetBytes("Hello my fiend");
    //not sure what to put here .. but the following works and print results in the listener console from within my LAN 
    client.Send(Message, Message.Length, new IPEndPoint(IPAddress.Parse("2001:0:53aa:64c:3057:6dae:4308:b55e"), 23456));
    System.Threading.Thread.Sleep(1000);





    • Changed type Mahmoud AL_sarhan Friday, June 3, 2016 10:49 PM It cover more than one topic
    Friday, June 3, 2016 10:48 PM