Click here to Skip to main content
15,887,910 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am able to Port Forward my own Laptop ip if defined in the NewInternalClient parameter of AddPortMapping SOAP request for UPnP Router.

Is it not possible to Port Forward another Laptop's IP through AddPortMapping SOAP command ?


First I tried to my Laptop IP (192.168.250.205) and it was successful by the given below request:

C++
<?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:AddPortMapping xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1"><NewRemoteHost></NewRemoteHost><NewExternalPort>3123</NewExternalPort><NewProtocol>UDP</NewProtocol><NewInternalPort>9153</NewInternalPort><NewInternalClient>192.168.250.205</NewInternalClient><NewEnabled>1</NewEnabled><NewPortMappingDescription>PM_3123</NewPortMappingDescription><NewLeaseDuration>0</NewLeaseDuration></u:AddPortMapping></s:Body></s:Envelope>


But i am getting Error Code = 718 with Error Description as ConflictInMappingEntry. If i try to Port Forward another device/PC IP (192.168.250.201) in the NewInternalClient parameter - the request is given below:

C++
<?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:AddPortMapping xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1"><NewRemoteHost></NewRemoteHost><NewExternalPort>3124</NewExternalPort><NewProtocol>UDP</NewProtocol><NewInternalPort>9154</NewInternalPort><NewInternalClient>192.168.250.201</NewInternalClient><NewEnabled>1</NewEnabled><NewPortMappingDescription>PM_3124</NewPortMappingDescription><NewLeaseDuration>0</NewLeaseDuration></u:AddPortMapping></s:Body></s:Envelope>


I am getting the below response:

C++
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><s:Fault><faultcode>s:Client</faultcode><faultstring>UPnPError</faultstring><detail><UPnPError xmlns="urn:schemas-upnp-org:control-1-0"><errorCode>718</errorCode><errorDescription>ConflictInMappingEntry</errorDescription></UPnPError></detail></s:Fault></s:Body></s:Envelope>


any help would be greatly appreciated.. Thanks in advance.
Posted
Updated 1-Jan-15 19:41pm
v3
Comments
Kornfeld Eliyahu Peter 1-Jan-15 3:38am    
What port do you use to access SOAP from outside? What port the service mapped to on the inside?
Kornfeld Eliyahu Peter 1-Jan-15 14:09pm    
Can you show the part where you map the ports?
mahendran.j 4-Jan-15 22:55pm    
Yes i have updated/edited in the question.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900