Issues with curl and script syntax
by PROBLEMCHYLD from LinuxQuestions.org on (#5RNP1)
I went on a journey to see if I could get UPNP to work without 3 party libs/software and I did!!!!
I use this method which works without issues https://coolaj86.com/articles/advent...rl-and-netcat/ and then I reversed the script, so that it would close the open ports to the router http://www.upnp-hacks.org/futurehacks.html replacing AddPortMapping with DeletePortMapping. Now in the script, I run this command Code:ip -o route get to 192.168.0.1 | sed -n 's/.*src \([0-9.]\+\).*/\1/p' to get my local lan ip but it does not work inside the script. I think I have some syntax wrong or something. The command is suppose to replace <NewInternalClient>ip from command</NewInternalClient>
I use this method which works without issues https://coolaj86.com/articles/advent...rl-and-netcat/ and then I reversed the script, so that it would close the open ports to the router http://www.upnp-hacks.org/futurehacks.html replacing AddPortMapping with DeletePortMapping. Now in the script, I run this command Code:ip -o route get to 192.168.0.1 | sed -n 's/.*src \([0-9.]\+\).*/\1/p' to get my local lan ip but it does not work inside the script. I think I have some syntax wrong or something. The command is suppose to replace <NewInternalClient>ip from command</NewInternalClient>