Port Knocking with Shortcuts

Hi All

Is it possible and how could I do this if it is. Currently our vpn’s are locked down and are only open for 30 seconds after accessing different ports in order quickly 5 seconds between each one. Currently I am just hitting the router with curl commands as ish supports this. It’s just about hitting the ports

I have been using the script below using a Beta bit of software on ios called ish but find it all a bit clunky and o guarantee it will stay around. It would be nice if I could get this working in a shortcut so I can try press a button.



using curl

curl --connect-timeout 1 --retry 1 $KnockHost:$KnockPort1
curl --connect-timeout 1 --retry 1 $KnockHost:$KnockPort2
curl --connect-timeout 1 --retry 1 $KnockHost:$KnockPort3


How does the port knocking happen in the supported way?

Hi Powerfool

I don’t follow what you mean

As much as I like the idea iSH will almost certainly never be approved for distribution in the App Store, which means it doesn’t have much of a future,

I would try either/both of these options in Shortcuts and see if either/both work:

  • “Get Contents of Webpage”
  • “Get Headers of URL”

I’m assuming both of those will accept a port designation in a URL, something like this: 

Let us know if it works! (Or doesn’t!)

I agree ref ish which is why I need an alternative. This is one of the few time I find iOS too restrictive.

I did try your suggestion but it takes to long to complete each step to the option to access the 2nd has already been closed by the firewall as it takes too long to go to step two… I need to find a way to hit the router the jump to the next and so on

You could try to do the knocking in javascript in a webpage with XMLHttpRequest. Then you would just need a shortcut that opens this page.

1 Like