I'm tring to do something called "Port Forwarding" using UPnP Com assemply in c# , the following code works fine and map new external ip and port number to my device , but it seems that the ip is not my correct external ip number , because it is different from the one I get in IP-lookup websites like (whatismyipaddress.com and whatismyip.com) .
this is my c# code (for the mapping) :
NATUPNPLib.UPnPNATClass upnpnat = new NATUPNPLib.UPnPNATClass();
NATUPNPLib.IStaticPortMappingCollection mappings = upnpnat.StaticPortMappingCollection;
mappings.Add(20000, "UDP", 20000, "192.168.8.102", true, "Local Web Server");
foreach (NATUPNPLib.IStaticPortMapping portMapping in mappings)
Console.WriteLine(portMapping.Description); //gives me "Local Web Server"
Console.WriteLine(portMapping.ExternalIPAddress); // gives me "10.178.196.123"
Console.WriteLine(portMapping.Enabled); // gives me "True"
in Ip-looking websites I got another external IP (22.214.171.124) , I tried to map my device with additional tools like UPnP Wizard and I got the same problem .
can you help me please ?
Pint-size luxury and funky style
Shopping for a new car this weekend? See how the BMW X2 stacks up against the Volvo XC40 in our side-by-side comparison.