Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
# Step 1:
# Enable UPnP in Linksys E900
# Step 2:
# sudo nano /usr/sbin/wanip_linksys_e900_upnp.sh
# sudo chmod +x /usr/sbin/wanip_linksys_e900_upnp.sh
curl -H "SOAPAction: urn:schemas-upnp-org:service:WANIPConnection:1#GetExternalIPAddress" -d "<?xml version="1.0"?><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"></u:GetExternalIPAddress></s:Body></s:Envelope>" http://192.168.1.1:1780/control?WANIPConnection
# Step 3:
# Add to file:
# [/etc/ddclient/]ddclient.conf
# Line:
# use=cmd, cmd=/usr/sbin/wanip_linksys_e900_upnp.sh, cmd-skip=NewExternalIPAddress
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment