Hi,
I’ve got a small program I wrote myself whose purpose is to query the router’s external IP address via uPNP and update some external systems (e.g. IPv6 Tunnel Broker config). On my old router this worked perfectly, but after replacing it with a Mikrotik 951-2n today and configuring it I can’t get it to work.
I have configured two uPNP interfaces - bridge-local (internal) and ether1-gateway (external). All other settings are defaults.
My program does the SSDP discovery and then attempts to make the SOAP request to the /upnp/control/wanipconn-1 endpoint as follows:
POST /upnp/control/wanipconn-1 HTTP/1.1
Host: 192.168.1.254:2828
User-Agent: Go 1.1 package http
Content-Length: 279
Soapaction: urn:schemas-upnp-org:service:WANIPConnection:1#GetExternalIPAddress
Accept-Encoding: gzip
<?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body> <u:GetExternalIPAddress xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1" /></s:Body></s:Envelope>
And it gets this back from the router:
HTTP/1.1 400 Bad Request
Any ideas what I might be doing wrong, or some config I’m missing?