Skip to content

Instantly share code, notes, and snippets.

@Ruzzz
Created May 20, 2017 23:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ruzzz/70dfb7af2c0a1bc0111ed162e0914616 to your computer and use it in GitHub Desktop.
Save Ruzzz/70dfb7af2c0a1bc0111ed162e0914616 to your computer and use it in GitHub Desktop.
#!/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