Created
August 26, 2018 07:29
-
-
Save meeDamian/d92bcc3f596e7ebf5b55cf2e834f283f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
LN_PORT=9735 | |
ROUTER_UPNP=http://192.168.0.1:1900/gatedesc.xml | |
IP="$(ip route get 1 | awk '{print $NF;exit}')" | |
SSH_PORT="22$(echo ${IP} | cut -d '.' -f4)" | |
# ssh | |
upnpc -u "${ROUTER_UPNP}" -e "$(hostname): ssh" -a ${IP} 22 ${SSH_PORT} TCP | |
# c-lightning | |
upnpc -u "${ROUTER_UPNP}" -e "$(hostname): c-lightning" -a ${IP} ${LN_PORT} ${LN_PORT} TCP |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
LN_PORT=9735 | |
IP="$(ip route get 1 | awk '{print $NF;exit}')" | |
SSH_PORT="22$(echo ${IP} | cut -d '.' -f4)" | |
# ssh | |
upnpc -e "$(hostname): ssh" -a ${IP} 22 ${SSH_PORT} TCP | |
# c-lightning | |
upnpc -e "$(hostname): c-lightning" -a ${IP} ${LN_PORT} ${LN_PORT} TCP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment